diff --git a/equinix-openapi-metal/.github/workflows/maven.yml b/equinix-openapi-metal/.github/workflows/maven.yml deleted file mode 100644 index 218d12f87..000000000 --- a/equinix-openapi-metal/.github/workflows/maven.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -# -# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) - -name: Java CI with Maven - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - build: - name: Build Metal API - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '8' ] - steps: - - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.java }} - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/equinix-openapi-metal/.gitignore b/equinix-openapi-metal/.gitignore deleted file mode 100644 index a530464af..000000000 --- a/equinix-openapi-metal/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# exclude jar for gradle wrapper -!gradle/wrapper/*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build diff --git a/equinix-openapi-metal/.openapi-generator-ignore b/equinix-openapi-metal/.openapi-generator-ignore deleted file mode 100644 index 7484ee590..000000000 --- a/equinix-openapi-metal/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/equinix-openapi-metal/.openapi-generator/FILES b/equinix-openapi-metal/.openapi-generator/FILES deleted file mode 100644 index 9b4c3908b..000000000 --- a/equinix-openapi-metal/.openapi-generator/FILES +++ /dev/null @@ -1,884 +0,0 @@ -.github/workflows/maven.yml -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -build.gradle -build.sbt -docs/ActivateHardwareReservationRequest.md -docs/Address.md -docs/Attribute.md -docs/AttributeData.md -docs/AuthToken.md -docs/AuthTokenInput.md -docs/AuthTokenList.md -docs/AuthTokenProject.md -docs/AuthTokenUser.md -docs/AuthenticationApi.md -docs/BGPSessionInput.md -docs/Batch.md -docs/BatchesApi.md -docs/BatchesList.md -docs/BgpApi.md -docs/BgpConfig.md -docs/BgpConfigRequestInput.md -docs/BgpDynamicNeighbor.md -docs/BgpDynamicNeighborCreateInput.md -docs/BgpDynamicNeighborList.md -docs/BgpNeighborData.md -docs/BgpRoute.md -docs/BgpSession.md -docs/BgpSessionList.md -docs/BgpSessionNeighbors.md -docs/BondPortData.md -docs/CapacityApi.md -docs/CapacityCheckPerFacilityInfo.md -docs/CapacityCheckPerFacilityList.md -docs/CapacityCheckPerMetroInfo.md -docs/CapacityCheckPerMetroList.md -docs/CapacityInput.md -docs/CapacityLevelPerBaremetal.md -docs/CapacityList.md -docs/Component.md -docs/ConsoleLogDetailsApi.md -docs/Coordinates.md -docs/CreateDeviceRequest.md -docs/CreateEmailInput.md -docs/CreateMetalGatewayRequest.md -docs/CreateOrganizationInterconnectionRequest.md -docs/CreateSelfServiceReservationRequest.md -docs/CreateSelfServiceReservationRequestPeriod.md -docs/DedicatedPortCreateInput.md -docs/Device.md -docs/DeviceActionInput.md -docs/DeviceActionsInner.md -docs/DeviceCreateInFacilityInput.md -docs/DeviceCreateInMetroInput.md -docs/DeviceCreateInput.md -docs/DeviceCreatedBy.md -docs/DeviceHealthRollup.md -docs/DeviceList.md -docs/DeviceMetro.md -docs/DeviceProject.md -docs/DeviceProjectLite.md -docs/DeviceUpdateInput.md -docs/DeviceUsage.md -docs/DeviceUsageList.md -docs/DevicesApi.md -docs/Disk.md -docs/Email.md -docs/EmailInput.md -docs/EmailsApi.md -docs/Entitlement.md -docs/Error.md -docs/Event.md -docs/EventList.md -docs/EventsApi.md -docs/FabricServiceToken.md -docs/FacilitiesApi.md -docs/Facility.md -docs/FacilityInput.md -docs/FacilityList.md -docs/Filesystem.md -docs/FindIPAddressById200Response.md -docs/FindMetalGatewayById200Response.md -docs/FindTrafficTimeframeParameter.md -docs/FirmwareSet.md -docs/FirmwareSetListResponse.md -docs/FirmwareSetResponse.md -docs/FirmwareSetsApi.md -docs/GlobalBgpRange.md -docs/GlobalBgpRangeList.md -docs/HardwareReservation.md -docs/HardwareReservationList.md -docs/HardwareReservationsApi.md -docs/Href.md -docs/IPAddress.md -docs/IPAssignment.md -docs/IPAssignmentInput.md -docs/IPAssignmentList.md -docs/IPAssignmentMetro.md -docs/IPAssignmentUpdateInput.md -docs/IPAvailabilitiesList.md -docs/IPReservation.md -docs/IPReservationFacility.md -docs/IPReservationList.md -docs/IPReservationListIpAddressesInner.md -docs/IPReservationMetro.md -docs/IPReservationOrHref.md -docs/IPReservationRequestInput.md -docs/IncidentsApi.md -docs/InstancesBatchCreateInput.md -docs/InstancesBatchCreateInputBatchesInner.md -docs/Interconnection.md -docs/InterconnectionList.md -docs/InterconnectionPort.md -docs/InterconnectionPortList.md -docs/InterconnectionUpdateInput.md -docs/InterconnectionsApi.md -docs/Invitation.md -docs/InvitationInput.md -docs/InvitationList.md -docs/InvitationsApi.md -docs/Invoice.md -docs/InvoiceList.md -docs/InvoicesApi.md -docs/IpAddressesApi.md -docs/License.md -docs/LicenseCreateInput.md -docs/LicenseList.md -docs/LicenseUpdateInput.md -docs/LicensesApi.md -docs/LineItem.md -docs/Membership.md -docs/MembershipInput.md -docs/MembershipList.md -docs/MembershipsApi.md -docs/Meta.md -docs/Metadata.md -docs/MetadataNetwork.md -docs/MetadataNetworkNetwork.md -docs/MetadataNetworkNetworkBonding.md -docs/MetalGateway.md -docs/MetalGatewayCreateInput.md -docs/MetalGatewayElasticIpCreateInput.md -docs/MetalGatewayList.md -docs/MetalGatewayListMetalGatewaysInner.md -docs/MetalGatewayLite.md -docs/MetalGatewaysApi.md -docs/Metro.md -docs/MetroInput.md -docs/MetroList.md -docs/MetrosApi.md -docs/Mount.md -docs/MoveHardwareReservationRequest.md -docs/NewPassword.md -docs/OperatingSystem.md -docs/OperatingSystemList.md -docs/OperatingSystemsApi.md -docs/Organization.md -docs/OrganizationInput.md -docs/OrganizationList.md -docs/OrganizationsApi.md -docs/OtpsApi.md -docs/ParentBlock.md -docs/Partition.md -docs/PasswordResetTokensApi.md -docs/PaymentMethod.md -docs/PaymentMethodBillingAddress.md -docs/PaymentMethodCreateInput.md -docs/PaymentMethodList.md -docs/PaymentMethodUpdateInput.md -docs/PaymentMethodsApi.md -docs/Plan.md -docs/PlanAvailableInInner.md -docs/PlanAvailableInInnerPrice.md -docs/PlanAvailableInMetrosInner.md -docs/PlanList.md -docs/PlanSpecs.md -docs/PlanSpecsCpusInner.md -docs/PlanSpecsDrivesInner.md -docs/PlanSpecsFeatures.md -docs/PlanSpecsMemory.md -docs/PlanSpecsNicsInner.md -docs/PlansApi.md -docs/Port.md -docs/PortAssignInput.md -docs/PortConvertLayer3Input.md -docs/PortConvertLayer3InputRequestIpsInner.md -docs/PortData.md -docs/PortVlanAssignment.md -docs/PortVlanAssignmentBatch.md -docs/PortVlanAssignmentBatchCreateInput.md -docs/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.md -docs/PortVlanAssignmentBatchList.md -docs/PortVlanAssignmentBatchVlanAssignmentsInner.md -docs/PortVlanAssignmentList.md -docs/PortsApi.md -docs/Project.md -docs/ProjectCreateFromRootInput.md -docs/ProjectCreateInput.md -docs/ProjectIdName.md -docs/ProjectList.md -docs/ProjectUpdateInput.md -docs/ProjectUsage.md -docs/ProjectUsageList.md -docs/ProjectsApi.md -docs/Raid.md -docs/RecoveryCodeList.md -docs/RequestIPReservation201Response.md -docs/RequestIPReservationRequest.md -docs/SSHKey.md -docs/SSHKeyCreateInput.md -docs/SSHKeyInput.md -docs/SSHKeyList.md -docs/SelfServiceReservationItemRequest.md -docs/SelfServiceReservationItemResponse.md -docs/SelfServiceReservationList.md -docs/SelfServiceReservationResponse.md -docs/SelfServiceReservationsApi.md -docs/ServerInfo.md -docs/SpotMarketApi.md -docs/SpotMarketPricesList.md -docs/SpotMarketPricesPerMetroList.md -docs/SpotMarketPricesPerMetroReport.md -docs/SpotMarketRequest.md -docs/SpotMarketRequestCreateInput.md -docs/SpotMarketRequestCreateInputInstanceParameters.md -docs/SpotMarketRequestList.md -docs/SpotMarketRequestMetro.md -docs/SpotPricesDatapoints.md -docs/SpotPricesHistoryReport.md -docs/SpotPricesPerBaremetal.md -docs/SpotPricesPerFacility.md -docs/SpotPricesPerNewFacility.md -docs/SpotPricesReport.md -docs/SshKeysApi.md -docs/Storage.md -docs/SupportRequestApi.md -docs/SupportRequestInput.md -docs/TransferRequest.md -docs/TransferRequestInput.md -docs/TransferRequestList.md -docs/TransferRequestsApi.md -docs/TwoFactorAuthApi.md -docs/UpdateEmailInput.md -docs/UsagesApi.md -docs/User.md -docs/UserCreateInput.md -docs/UserLimited.md -docs/UserList.md -docs/UserLite.md -docs/UserUpdateInput.md -docs/UserVerificationTokensApi.md -docs/Userdata.md -docs/UserdataApi.md -docs/UsersApi.md -docs/VerifyEmail.md -docs/VirtualCircuit.md -docs/VirtualCircuitCreateInput.md -docs/VirtualCircuitList.md -docs/VirtualCircuitUpdateInput.md -docs/VirtualNetwork.md -docs/VirtualNetworkCreateInput.md -docs/VirtualNetworkList.md -docs/VlanFabricVcCreateInput.md -docs/VlanVirtualCircuit.md -docs/VlanVirtualCircuitCreateInput.md -docs/VlanVirtualCircuitType.md -docs/VlanVirtualCircuitUpdateInput.md -docs/VlansApi.md -docs/Vrf.md -docs/VrfCreateInput.md -docs/VrfFabricVcCreateInput.md -docs/VrfIpReservation.md -docs/VrfIpReservationCreateInput.md -docs/VrfIpReservationList.md -docs/VrfIpReservationOrHref.md -docs/VrfList.md -docs/VrfMetalGateway.md -docs/VrfMetalGatewayCreateInput.md -docs/VrfRoute.md -docs/VrfRouteCreateInput.md -docs/VrfRouteList.md -docs/VrfRouteUpdateInput.md -docs/VrfUpdateInput.md -docs/VrfVirtualCircuit.md -docs/VrfVirtualCircuitCreateInput.md -docs/VrfVirtualCircuitType.md -docs/VrfVirtualCircuitUpdateInput.md -docs/VrfsApi.md -git_push.sh -gradle.properties -gradle/wrapper/gradle-wrapper.jar -gradle/wrapper/gradle-wrapper.properties -gradlew -gradlew.bat -pom.xml -settings.gradle -src/main/AndroidManifest.xml -src/main/java/com/equinix/openapi/ApiCallback.java -src/main/java/com/equinix/openapi/ApiClient.java -src/main/java/com/equinix/openapi/ApiException.java -src/main/java/com/equinix/openapi/ApiResponse.java -src/main/java/com/equinix/openapi/Configuration.java -src/main/java/com/equinix/openapi/GzipRequestInterceptor.java -src/main/java/com/equinix/openapi/JSON.java -src/main/java/com/equinix/openapi/Pair.java -src/main/java/com/equinix/openapi/ProgressRequestBody.java -src/main/java/com/equinix/openapi/ProgressResponseBody.java -src/main/java/com/equinix/openapi/ServerConfiguration.java -src/main/java/com/equinix/openapi/ServerVariable.java -src/main/java/com/equinix/openapi/StringUtil.java -src/main/java/com/equinix/openapi/auth/ApiKeyAuth.java -src/main/java/com/equinix/openapi/auth/Authentication.java -src/main/java/com/equinix/openapi/auth/HttpBasicAuth.java -src/main/java/com/equinix/openapi/auth/HttpBearerAuth.java -src/main/java/com/equinix/openapi/metal/v1/api/AuthenticationApi.java -src/main/java/com/equinix/openapi/metal/v1/api/BatchesApi.java -src/main/java/com/equinix/openapi/metal/v1/api/BgpApi.java -src/main/java/com/equinix/openapi/metal/v1/api/CapacityApi.java -src/main/java/com/equinix/openapi/metal/v1/api/ConsoleLogDetailsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/DevicesApi.java -src/main/java/com/equinix/openapi/metal/v1/api/EmailsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/EventsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/FacilitiesApi.java -src/main/java/com/equinix/openapi/metal/v1/api/FirmwareSetsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/IncidentsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/InterconnectionsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/InvitationsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/InvoicesApi.java -src/main/java/com/equinix/openapi/metal/v1/api/IpAddressesApi.java -src/main/java/com/equinix/openapi/metal/v1/api/LicensesApi.java -src/main/java/com/equinix/openapi/metal/v1/api/MembershipsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApi.java -src/main/java/com/equinix/openapi/metal/v1/api/MetrosApi.java -src/main/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/OrganizationsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/OtpsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApi.java -src/main/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/PlansApi.java -src/main/java/com/equinix/openapi/metal/v1/api/PortsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/ProjectsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/SpotMarketApi.java -src/main/java/com/equinix/openapi/metal/v1/api/SshKeysApi.java -src/main/java/com/equinix/openapi/metal/v1/api/SupportRequestApi.java -src/main/java/com/equinix/openapi/metal/v1/api/TransferRequestsApi.java -src/main/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApi.java -src/main/java/com/equinix/openapi/metal/v1/api/UsagesApi.java -src/main/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApi.java -src/main/java/com/equinix/openapi/metal/v1/api/UserdataApi.java -src/main/java/com/equinix/openapi/metal/v1/api/UsersApi.java -src/main/java/com/equinix/openapi/metal/v1/api/VlansApi.java -src/main/java/com/equinix/openapi/metal/v1/api/VrfsApi.java -src/main/java/com/equinix/openapi/metal/v1/model/AbstractOpenApiSchema.java -src/main/java/com/equinix/openapi/metal/v1/model/ActivateHardwareReservationRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/Address.java -src/main/java/com/equinix/openapi/metal/v1/model/Attribute.java -src/main/java/com/equinix/openapi/metal/v1/model/AttributeData.java -src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java -src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java -src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java -src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java -src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java -src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java -src/main/java/com/equinix/openapi/metal/v1/model/Batch.java -src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighbor.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborList.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpRoute.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java -src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java -src/main/java/com/equinix/openapi/metal/v1/model/BondPortData.java -src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java -src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java -src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java -src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java -src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java -src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java -src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java -src/main/java/com/equinix/openapi/metal/v1/model/Component.java -src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java -src/main/java/com/equinix/openapi/metal/v1/model/CreateDeviceRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java -src/main/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/CreateOrganizationInterconnectionRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java -src/main/java/com/equinix/openapi/metal/v1/model/DedicatedPortCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/Device.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionInput.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInFacilityInput.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInMetroInput.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceHealthRollup.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java -src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java -src/main/java/com/equinix/openapi/metal/v1/model/Disk.java -src/main/java/com/equinix/openapi/metal/v1/model/Email.java -src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java -src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java -src/main/java/com/equinix/openapi/metal/v1/model/Error.java -src/main/java/com/equinix/openapi/metal/v1/model/Event.java -src/main/java/com/equinix/openapi/metal/v1/model/EventList.java -src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java -src/main/java/com/equinix/openapi/metal/v1/model/Facility.java -src/main/java/com/equinix/openapi/metal/v1/model/FacilityInput.java -src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java -src/main/java/com/equinix/openapi/metal/v1/model/Filesystem.java -src/main/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200Response.java -src/main/java/com/equinix/openapi/metal/v1/model/FindMetalGatewayById200Response.java -src/main/java/com/equinix/openapi/metal/v1/model/FindTrafficTimeframeParameter.java -src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSet.java -src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSetListResponse.java -src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSetResponse.java -src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java -src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java -src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java -src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java -src/main/java/com/equinix/openapi/metal/v1/model/Href.java -src/main/java/com/equinix/openapi/metal/v1/model/IPAddress.java -src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java -src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java -src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java -src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java -src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java -src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java -src/main/java/com/equinix/openapi/metal/v1/model/IPReservationFacility.java -src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java -src/main/java/com/equinix/openapi/metal/v1/model/IPReservationListIpAddressesInner.java -src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java -src/main/java/com/equinix/openapi/metal/v1/model/IPReservationOrHref.java -src/main/java/com/equinix/openapi/metal/v1/model/IPReservationRequestInput.java -src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java -src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java -src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java -src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java -src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java -src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java -src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java -src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java -src/main/java/com/equinix/openapi/metal/v1/model/Invoice.java -src/main/java/com/equinix/openapi/metal/v1/model/InvoiceList.java -src/main/java/com/equinix/openapi/metal/v1/model/License.java -src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java -src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/LineItem.java -src/main/java/com/equinix/openapi/metal/v1/model/Membership.java -src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java -src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java -src/main/java/com/equinix/openapi/metal/v1/model/Meta.java -src/main/java/com/equinix/openapi/metal/v1/model/Metadata.java -src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetwork.java -src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetwork.java -src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkBonding.java -src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java -src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayElasticIpCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java -src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayListMetalGatewaysInner.java -src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java -src/main/java/com/equinix/openapi/metal/v1/model/Metro.java -src/main/java/com/equinix/openapi/metal/v1/model/MetroInput.java -src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java -src/main/java/com/equinix/openapi/metal/v1/model/Mount.java -src/main/java/com/equinix/openapi/metal/v1/model/MoveHardwareReservationRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java -src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java -src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java -src/main/java/com/equinix/openapi/metal/v1/model/Organization.java -src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java -src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java -src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java -src/main/java/com/equinix/openapi/metal/v1/model/Partition.java -src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java -src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java -src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java -src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/Plan.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInner.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerPrice.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecs.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsCpusInner.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsDrivesInner.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsFeatures.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsMemory.java -src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsNicsInner.java -src/main/java/com/equinix/openapi/metal/v1/model/Port.java -src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java -src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java -src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java -src/main/java/com/equinix/openapi/metal/v1/model/PortData.java -src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java -src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java -src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java -src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java -src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java -src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java -src/main/java/com/equinix/openapi/metal/v1/model/Project.java -src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java -src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/ProjectIdName.java -src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java -src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java -src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java -src/main/java/com/equinix/openapi/metal/v1/model/Raid.java -src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java -src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservation201Response.java -src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java -src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java -src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java -src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java -src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java -src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java -src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceParameters.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java -src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java -src/main/java/com/equinix/openapi/metal/v1/model/Storage.java -src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java -src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java -src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java -src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java -src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java -src/main/java/com/equinix/openapi/metal/v1/model/User.java -src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/UserLimited.java -src/main/java/com/equinix/openapi/metal/v1/model/UserList.java -src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java -src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/Userdata.java -src/main/java/com/equinix/openapi/metal/v1/model/VerifyEmail.java -src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java -src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java -src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java -src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java -src/main/java/com/equinix/openapi/metal/v1/model/VlanFabricVcCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuit.java -src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitType.java -src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfFabricVcCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservation.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationList.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationOrHref.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGateway.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfRoute.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteList.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitType.java -src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java -src/test/java/com/equinix/openapi/metal/v1/api/AuthenticationApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/BatchesApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/BgpApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/CapacityApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/ConsoleLogDetailsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/DevicesApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/EmailsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/EventsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/FacilitiesApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/FirmwareSetsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/IncidentsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/InterconnectionsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/InvitationsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/InvoicesApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/IpAddressesApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/LicensesApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/MembershipsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/MetrosApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/OrganizationsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/OtpsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/PlansApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/PortsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/ProjectsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/SpotMarketApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/SshKeysApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/SupportRequestApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/TransferRequestsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/UsagesApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/UserdataApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/UsersApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/VlansApiTest.java -src/test/java/com/equinix/openapi/metal/v1/api/VrfsApiTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ActivateHardwareReservationRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/AddressTest.java -src/test/java/com/equinix/openapi/metal/v1/model/AttributeDataTest.java -src/test/java/com/equinix/openapi/metal/v1/model/AttributeTest.java -src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenProjectTest.java -src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenTest.java -src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenUserTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BGPSessionInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BatchTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BatchesListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpRouteTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighborsTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionTest.java -src/test/java/com/equinix/openapi/metal/v1/model/BondPortDataTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfoTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfoTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CapacityInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetalTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CapacityListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ComponentTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CoordinatesTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CreateDeviceRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CreateEmailInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CreateOrganizationInterconnectionRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriodTest.java -src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DedicatedPortCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionsInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInFacilityInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInMetroInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreatedByTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceHealthRollupTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceMetroTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectLiteTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageTest.java -src/test/java/com/equinix/openapi/metal/v1/model/DiskTest.java -src/test/java/com/equinix/openapi/metal/v1/model/EmailInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/EmailTest.java -src/test/java/com/equinix/openapi/metal/v1/model/EntitlementTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ErrorTest.java -src/test/java/com/equinix/openapi/metal/v1/model/EventListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/EventTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FabricServiceTokenTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FacilityInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FacilityListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FacilityTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FilesystemTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200ResponseTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FindMetalGatewayById200ResponseTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FindTrafficTimeframeParameterTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetListResponseTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetResponseTest.java -src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetTest.java -src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeTest.java -src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationTest.java -src/test/java/com/equinix/openapi/metal/v1/model/HrefTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPAddressTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetroTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPReservationFacilityTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListIpAddressesInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPReservationMetroTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPReservationOrHrefTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPReservationRequestInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/IPReservationTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InvitationInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InvitationListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InvitationTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InvoiceListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/InvoiceTest.java -src/test/java/com/equinix/openapi/metal/v1/model/LicenseCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/LicenseListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/LicenseTest.java -src/test/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/LineItemTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MembershipInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MembershipListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MembershipTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetaTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkBondingTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetadataTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayElasticIpCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListMetalGatewaysInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayLiteTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetroInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetroListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MetroTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MountTest.java -src/test/java/com/equinix/openapi/metal/v1/model/MoveHardwareReservationRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/NewPasswordTest.java -src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemTest.java -src/test/java/com/equinix/openapi/metal/v1/model/OrganizationInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/OrganizationListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/OrganizationTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ParentBlockTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PartitionTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddressTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerPriceTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsCpusInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsDrivesInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsFeaturesTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsMemoryTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsNicsInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PlanTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortAssignInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortDataTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInnerTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ProjectIdNameTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ProjectListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ProjectTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageTest.java -src/test/java/com/equinix/openapi/metal/v1/model/RaidTest.java -src/test/java/com/equinix/openapi/metal/v1/model/RecoveryCodeListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservation201ResponseTest.java -src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponseTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponseTest.java -src/test/java/com/equinix/openapi/metal/v1/model/ServerInfoTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReportTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceParametersTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetroTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapointsTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReportTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetalTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacilityTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacilityTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesReportTest.java -src/test/java/com/equinix/openapi/metal/v1/model/StorageTest.java -src/test/java/com/equinix/openapi/metal/v1/model/SupportRequestInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestTest.java -src/test/java/com/equinix/openapi/metal/v1/model/UpdateEmailInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/UserCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/UserLimitedTest.java -src/test/java/com/equinix/openapi/metal/v1/model/UserListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/UserLiteTest.java -src/test/java/com/equinix/openapi/metal/v1/model/UserTest.java -src/test/java/com/equinix/openapi/metal/v1/model/UserUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/UserdataTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VerifyEmailTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VlanFabricVcCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTypeTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfFabricVcCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationOrHrefTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteListTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfUpdateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInputTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTypeTest.java -src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInputTest.java diff --git a/equinix-openapi-metal/.openapi-generator/VERSION b/equinix-openapi-metal/.openapi-generator/VERSION deleted file mode 100644 index 412252180..000000000 --- a/equinix-openapi-metal/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.0 \ No newline at end of file diff --git a/equinix-openapi-metal/.travis.yml b/equinix-openapi-metal/.travis.yml deleted file mode 100644 index 1b6741c08..000000000 --- a/equinix-openapi-metal/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -# -# Generated by OpenAPI Generator: https://openapi-generator.tech -# -# Ref: https://docs.travis-ci.com/user/languages/java/ -# -language: java -jdk: - - openjdk12 - - openjdk11 - - openjdk10 - - openjdk9 - - openjdk8 -before_install: - # ensure gradlew has proper permission - - chmod a+x ./gradlew -script: - # test using maven - #- mvn test - # test using gradle - - gradle test - # test using sbt - # - sbt test diff --git a/equinix-openapi-metal/README.md b/equinix-openapi-metal/README.md deleted file mode 100644 index eb6b04e13..000000000 --- a/equinix-openapi-metal/README.md +++ /dev/null @@ -1,695 +0,0 @@ -# equinix-openapi-metal - -Metal API -- API version: 1.0.0 - -# Introduction -Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. - -The API allows you to programmatically interact with all -of your Equinix Metal resources, including devices, networks, addresses, organizations, -projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. - -The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . - -# Common Parameters - -The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. - -## Pagination - -Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. - -The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. - -## Sorting - -Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). - -## Filtering - -Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. - -For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: - -```sh -curl -H 'X-Auth-Token: my_authentication_token' \\ - https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 -``` - -Only IP addresses with the `type` field set to `public_ipv4` will be returned. - -## Searching - -Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. - -To search resources you can use the `search` query parameter. - -## Include and Exclude - -For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. - -```json -{ - ... - \"project\": { - \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" - } -} -``` - -If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. - -For example: - -```sh -curl -H 'X-Auth-Token: my_authentication_token' \\ - https://api.equinix.com/metal/v1/user?include=projects -``` - -The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. - -To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). - -```sh -curl -H 'X-Auth-Token: my_authentication_token' \\ - https://api.equinix.com/metal/v1/user?include=emails,projects,memberships -``` - -You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): - -```sh -curl -H 'X-Auth-Token: my_authentication_token' \\ - https://api.equinix.com/metal/v1/user?include=memberships.projects -``` - -To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - - - -*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* - - -## Requirements - -Building the API client library requires: -1. Java 1.8+ -2. Maven (3.8.3+)/Gradle (7.2+) - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn clean install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn clean deploy -``` - -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - com.equinix - equinix-openapi-metal - 0.10.1 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy - repositories { - mavenCentral() // Needed if the 'equinix-openapi-metal' jar has been published to maven central. - mavenLocal() // Needed if the 'equinix-openapi-metal' jar has been published to the local maven repo. - } - - dependencies { - implementation "com.equinix:equinix-openapi-metal:0.10.1" - } -``` - -### Others - -At first generate the JAR by executing: - -```shell -mvn clean package -``` - -Then manually install the following JARs: - -* `target/equinix-openapi-metal-0.10.1.jar` -* `target/lib/*.jar` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following Java code: - -```java - -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.AuthenticationApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); - AuthTokenInput authTokenInput = new AuthTokenInput(); // AuthTokenInput | API key to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - AuthToken result = apiInstance.createAPIKey(authTokenInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#createAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.equinix.com/metal/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AuthenticationApi* | [**createAPIKey**](docs/AuthenticationApi.md#createAPIKey) | **POST** /user/api-keys | Create an API key -*AuthenticationApi* | [**createProjectAPIKey**](docs/AuthenticationApi.md#createProjectAPIKey) | **POST** /projects/{id}/api-keys | Create an API key for a project. -*AuthenticationApi* | [**deleteAPIKey**](docs/AuthenticationApi.md#deleteAPIKey) | **DELETE** /api-keys/{id} | Delete the API key -*AuthenticationApi* | [**deleteUserAPIKey**](docs/AuthenticationApi.md#deleteUserAPIKey) | **DELETE** /user/api-keys/{id} | Delete the API key -*AuthenticationApi* | [**findAPIKeys**](docs/AuthenticationApi.md#findAPIKeys) | **GET** /user/api-keys | Retrieve all user API keys -*AuthenticationApi* | [**findProjectAPIKeys**](docs/AuthenticationApi.md#findProjectAPIKeys) | **GET** /projects/{id}/api-keys | Retrieve all API keys for the project. -*BatchesApi* | [**createDeviceBatch**](docs/BatchesApi.md#createDeviceBatch) | **POST** /projects/{id}/devices/batch | Create a devices batch -*BatchesApi* | [**deleteBatch**](docs/BatchesApi.md#deleteBatch) | **DELETE** /batches/{id} | Delete the Batch -*BatchesApi* | [**findBatchById**](docs/BatchesApi.md#findBatchById) | **GET** /batches/{id} | Retrieve a Batch -*BatchesApi* | [**findBatchesByProject**](docs/BatchesApi.md#findBatchesByProject) | **GET** /projects/{id}/batches | Retrieve all batches by project -*BgpApi* | [**deleteBgpSession**](docs/BgpApi.md#deleteBgpSession) | **DELETE** /bgp/sessions/{id} | Delete the BGP session -*BgpApi* | [**findBgpConfigByProject**](docs/BgpApi.md#findBgpConfigByProject) | **GET** /projects/{id}/bgp-config | Retrieve a bgp config -*BgpApi* | [**findBgpSessionById**](docs/BgpApi.md#findBgpSessionById) | **GET** /bgp/sessions/{id} | Retrieve a BGP session -*BgpApi* | [**findGlobalBgpRanges**](docs/BgpApi.md#findGlobalBgpRanges) | **GET** /projects/{id}/global-bgp-ranges | Retrieve all global bgp ranges -*BgpApi* | [**findProjectBgpSessions**](docs/BgpApi.md#findProjectBgpSessions) | **GET** /projects/{id}/bgp/sessions | Retrieve all BGP sessions for project -*BgpApi* | [**requestBgpConfig**](docs/BgpApi.md#requestBgpConfig) | **POST** /projects/{id}/bgp-configs | Requesting bgp config -*BgpApi* | [**updateBgpSession**](docs/BgpApi.md#updateBgpSession) | **PUT** /bgp/sessions/{id} | Update the BGP session -*CapacityApi* | [**checkCapacityForFacility**](docs/CapacityApi.md#checkCapacityForFacility) | **POST** /capacity | Check capacity -*CapacityApi* | [**checkCapacityForMetro**](docs/CapacityApi.md#checkCapacityForMetro) | **POST** /capacity/metros | Check capacity for a metro -*CapacityApi* | [**findCapacityForFacility**](docs/CapacityApi.md#findCapacityForFacility) | **GET** /capacity | View capacity -*CapacityApi* | [**findCapacityForMetro**](docs/CapacityApi.md#findCapacityForMetro) | **GET** /capacity/metros | View capacity for metros -*CapacityApi* | [**findOrganizationCapacityPerFacility**](docs/CapacityApi.md#findOrganizationCapacityPerFacility) | **GET** /organizations/{id}/capacity | View available hardware plans per Facility for given organization -*CapacityApi* | [**findOrganizationCapacityPerMetro**](docs/CapacityApi.md#findOrganizationCapacityPerMetro) | **GET** /organizations/{id}/capacity/metros | View available hardware plans per Metro for given organization -*ConsoleLogDetailsApi* | [**captureScreenshot**](docs/ConsoleLogDetailsApi.md#captureScreenshot) | **GET** /devices/{id}/diagnostics/screenshot | -*DevicesApi* | [**createBgpSession**](docs/DevicesApi.md#createBgpSession) | **POST** /devices/{id}/bgp/sessions | Create a BGP session -*DevicesApi* | [**createDevice**](docs/DevicesApi.md#createDevice) | **POST** /projects/{id}/devices | Create a device -*DevicesApi* | [**createIPAssignment**](docs/DevicesApi.md#createIPAssignment) | **POST** /devices/{id}/ips | Create an ip assignment -*DevicesApi* | [**deleteDevice**](docs/DevicesApi.md#deleteDevice) | **DELETE** /devices/{id} | Delete the device -*DevicesApi* | [**findBgpSessions**](docs/DevicesApi.md#findBgpSessions) | **GET** /devices/{id}/bgp/sessions | Retrieve all BGP sessions -*DevicesApi* | [**findDeviceById**](docs/DevicesApi.md#findDeviceById) | **GET** /devices/{id} | Retrieve a device -*DevicesApi* | [**findDeviceCustomdata**](docs/DevicesApi.md#findDeviceCustomdata) | **GET** /devices/{id}/customdata | Retrieve the custom metadata of an instance -*DevicesApi* | [**findDeviceMetadataByID**](docs/DevicesApi.md#findDeviceMetadataByID) | **GET** /devices/{id}/metadata | Retrieve metadata -*DevicesApi* | [**findDeviceUserdataByID**](docs/DevicesApi.md#findDeviceUserdataByID) | **GET** /devices/{id}/userdata | Retrieve userdata -*DevicesApi* | [**findIPAssignmentCustomdata**](docs/DevicesApi.md#findIPAssignmentCustomdata) | **GET** /devices/{instance_id}/ips/{id}/customdata | Retrieve the custom metadata of an IP Assignment -*DevicesApi* | [**findIPAssignments**](docs/DevicesApi.md#findIPAssignments) | **GET** /devices/{id}/ips | Retrieve all ip assignments -*DevicesApi* | [**findInstanceBandwidth**](docs/DevicesApi.md#findInstanceBandwidth) | **GET** /devices/{id}/bandwidth | Retrieve an instance bandwidth -*DevicesApi* | [**findOrganizationDevices**](docs/DevicesApi.md#findOrganizationDevices) | **GET** /organizations/{id}/devices | Retrieve all devices of an organization -*DevicesApi* | [**findProjectDevices**](docs/DevicesApi.md#findProjectDevices) | **GET** /projects/{id}/devices | Retrieve all devices of a project -*DevicesApi* | [**findTraffic**](docs/DevicesApi.md#findTraffic) | **GET** /devices/{id}/traffic | Retrieve device traffic -*DevicesApi* | [**getBgpNeighborData**](docs/DevicesApi.md#getBgpNeighborData) | **GET** /devices/{id}/bgp/neighbors | Retrieve BGP neighbor data for this device -*DevicesApi* | [**getDeviceFirmwareSets**](docs/DevicesApi.md#getDeviceFirmwareSets) | **GET** /devices/{id}/firmware-sets | Get Device's associated Firmware Set -*DevicesApi* | [**getDeviceHealthRollup**](docs/DevicesApi.md#getDeviceHealthRollup) | **GET** /devices/{id}/diagnostics/health/rollup | Get Device's Health Status -*DevicesApi* | [**performAction**](docs/DevicesApi.md#performAction) | **POST** /devices/{id}/actions | Perform an action -*DevicesApi* | [**updateDevice**](docs/DevicesApi.md#updateDevice) | **PUT** /devices/{id} | Update the device -*EmailsApi* | [**createEmail**](docs/EmailsApi.md#createEmail) | **POST** /emails | Create an email -*EmailsApi* | [**deleteEmail**](docs/EmailsApi.md#deleteEmail) | **DELETE** /emails/{id} | Delete the email -*EmailsApi* | [**findEmailById**](docs/EmailsApi.md#findEmailById) | **GET** /emails/{id} | Retrieve an email -*EmailsApi* | [**updateEmail**](docs/EmailsApi.md#updateEmail) | **PUT** /emails/{id} | Update the email -*EventsApi* | [**findDeviceEvents**](docs/EventsApi.md#findDeviceEvents) | **GET** /devices/{id}/events | Retrieve device's events -*EventsApi* | [**findEventById**](docs/EventsApi.md#findEventById) | **GET** /events/{id} | Retrieve an event -*EventsApi* | [**findEvents**](docs/EventsApi.md#findEvents) | **GET** /events | Retrieve current user's events -*EventsApi* | [**findInterconnectionEvents**](docs/EventsApi.md#findInterconnectionEvents) | **GET** /connections/{connection_id}/events | Retrieve interconnection events -*EventsApi* | [**findInterconnectionPortEvents**](docs/EventsApi.md#findInterconnectionPortEvents) | **GET** /connections/{connection_id}/ports/{id}/events | Retrieve interconnection port events -*EventsApi* | [**findOrganizationEvents**](docs/EventsApi.md#findOrganizationEvents) | **GET** /organizations/{id}/events | Retrieve organization's events -*EventsApi* | [**findProjectEvents**](docs/EventsApi.md#findProjectEvents) | **GET** /projects/{id}/events | Retrieve project's events -*EventsApi* | [**findVirtualCircuitEvents**](docs/EventsApi.md#findVirtualCircuitEvents) | **GET** /virtual-circuits/{id}/events | Retrieve virtual circuit events -*EventsApi* | [**findVrfRouteEvents**](docs/EventsApi.md#findVrfRouteEvents) | **GET** /routes/{id}/events | Retrieve VRF route events -*FacilitiesApi* | [**findFacilities**](docs/FacilitiesApi.md#findFacilities) | **GET** /facilities | Retrieve all facilities -*FacilitiesApi* | [**findFacilitiesByOrganization**](docs/FacilitiesApi.md#findFacilitiesByOrganization) | **GET** /organizations/{id}/facilities | Retrieve all facilities visible by the organization -*FacilitiesApi* | [**findFacilitiesByProject**](docs/FacilitiesApi.md#findFacilitiesByProject) | **GET** /projects/{id}/facilities | Retrieve all facilities visible by the project -*FirmwareSetsApi* | [**getOrganizationFirmwareSets**](docs/FirmwareSetsApi.md#getOrganizationFirmwareSets) | **GET** /organizations/{id}/firmware-sets | Get Organization's Firmware Sets -*FirmwareSetsApi* | [**getProjectFirmwareSets**](docs/FirmwareSetsApi.md#getProjectFirmwareSets) | **GET** /projects/{id}/firmware-sets | Get Project's Firmware Sets -*HardwareReservationsApi* | [**activateHardwareReservation**](docs/HardwareReservationsApi.md#activateHardwareReservation) | **POST** /hardware-reservations/{id}/activate | Activate a spare hardware reservation -*HardwareReservationsApi* | [**findHardwareReservationById**](docs/HardwareReservationsApi.md#findHardwareReservationById) | **GET** /hardware-reservations/{id} | Retrieve a hardware reservation -*HardwareReservationsApi* | [**findProjectHardwareReservations**](docs/HardwareReservationsApi.md#findProjectHardwareReservations) | **GET** /projects/{id}/hardware-reservations | Retrieve all hardware reservations for a given project -*HardwareReservationsApi* | [**moveHardwareReservation**](docs/HardwareReservationsApi.md#moveHardwareReservation) | **POST** /hardware-reservations/{id}/move | Move a hardware reservation -*IncidentsApi* | [**findIncidents**](docs/IncidentsApi.md#findIncidents) | **GET** /incidents | Retrieve the number of incidents -*InterconnectionsApi* | [**createInterconnectionPortVirtualCircuit**](docs/InterconnectionsApi.md#createInterconnectionPortVirtualCircuit) | **POST** /connections/{connection_id}/ports/{port_id}/virtual-circuits | Create a new Virtual Circuit -*InterconnectionsApi* | [**createOrganizationInterconnection**](docs/InterconnectionsApi.md#createOrganizationInterconnection) | **POST** /organizations/{organization_id}/connections | Request a new interconnection for the organization -*InterconnectionsApi* | [**createProjectInterconnection**](docs/InterconnectionsApi.md#createProjectInterconnection) | **POST** /projects/{project_id}/connections | Request a new interconnection for the project's organization -*InterconnectionsApi* | [**deleteInterconnection**](docs/InterconnectionsApi.md#deleteInterconnection) | **DELETE** /connections/{connection_id} | Delete interconnection -*InterconnectionsApi* | [**deleteVirtualCircuit**](docs/InterconnectionsApi.md#deleteVirtualCircuit) | **DELETE** /virtual-circuits/{id} | Delete a virtual circuit -*InterconnectionsApi* | [**getInterconnection**](docs/InterconnectionsApi.md#getInterconnection) | **GET** /connections/{connection_id} | Get interconnection -*InterconnectionsApi* | [**getInterconnectionPort**](docs/InterconnectionsApi.md#getInterconnectionPort) | **GET** /connections/{connection_id}/ports/{id} | Get a interconnection port -*InterconnectionsApi* | [**getVirtualCircuit**](docs/InterconnectionsApi.md#getVirtualCircuit) | **GET** /virtual-circuits/{id} | Get a virtual circuit -*InterconnectionsApi* | [**listInterconnectionPortVirtualCircuits**](docs/InterconnectionsApi.md#listInterconnectionPortVirtualCircuits) | **GET** /connections/{connection_id}/ports/{port_id}/virtual-circuits | List a interconnection port's virtual circuits -*InterconnectionsApi* | [**listInterconnectionPorts**](docs/InterconnectionsApi.md#listInterconnectionPorts) | **GET** /connections/{connection_id}/ports | List a interconnection's ports -*InterconnectionsApi* | [**listInterconnectionVirtualCircuits**](docs/InterconnectionsApi.md#listInterconnectionVirtualCircuits) | **GET** /connections/{connection_id}/virtual-circuits | List a interconnection's virtual circuits -*InterconnectionsApi* | [**organizationListInterconnections**](docs/InterconnectionsApi.md#organizationListInterconnections) | **GET** /organizations/{organization_id}/connections | List organization connections -*InterconnectionsApi* | [**projectListInterconnections**](docs/InterconnectionsApi.md#projectListInterconnections) | **GET** /projects/{project_id}/connections | List project connections -*InterconnectionsApi* | [**updateInterconnection**](docs/InterconnectionsApi.md#updateInterconnection) | **PUT** /connections/{connection_id} | Update interconnection -*InterconnectionsApi* | [**updateVirtualCircuit**](docs/InterconnectionsApi.md#updateVirtualCircuit) | **PUT** /virtual-circuits/{id} | Update a virtual circuit -*InvitationsApi* | [**acceptInvitation**](docs/InvitationsApi.md#acceptInvitation) | **PUT** /invitations/{id} | Accept an invitation -*InvitationsApi* | [**declineInvitation**](docs/InvitationsApi.md#declineInvitation) | **DELETE** /invitations/{id} | Decline an invitation -*InvitationsApi* | [**findInvitationById**](docs/InvitationsApi.md#findInvitationById) | **GET** /invitations/{id} | View an invitation -*InvoicesApi* | [**findOrganizationInvoices**](docs/InvoicesApi.md#findOrganizationInvoices) | **GET** /organizations/{id}/invoices | Retrieve all invoices for an organization -*InvoicesApi* | [**getInvoiceById**](docs/InvoicesApi.md#getInvoiceById) | **GET** /invoices/{id} | Retrieve an invoice -*IpAddressesApi* | [**deleteIPAddress**](docs/IpAddressesApi.md#deleteIPAddress) | **DELETE** /ips/{id} | Unassign an ip address -*IpAddressesApi* | [**findIPAddressById**](docs/IpAddressesApi.md#findIPAddressById) | **GET** /ips/{id} | Retrieve an ip address -*IpAddressesApi* | [**findIPAddressCustomdata**](docs/IpAddressesApi.md#findIPAddressCustomdata) | **GET** /ips/{id}/customdata | Retrieve the custom metadata of an IP Reservation or IP Assignment -*IpAddressesApi* | [**findIPAvailabilities**](docs/IpAddressesApi.md#findIPAvailabilities) | **GET** /ips/{id}/available | Retrieve all available subnets of a particular reservation -*IpAddressesApi* | [**findIPReservations**](docs/IpAddressesApi.md#findIPReservations) | **GET** /projects/{id}/ips | Retrieve all ip reservations -*IpAddressesApi* | [**requestIPReservation**](docs/IpAddressesApi.md#requestIPReservation) | **POST** /projects/{id}/ips | Requesting IP reservations -*IpAddressesApi* | [**updateIPAddress**](docs/IpAddressesApi.md#updateIPAddress) | **PATCH** /ips/{id} | Update an ip address -*LicensesApi* | [**createLicense**](docs/LicensesApi.md#createLicense) | **POST** /projects/{id}/licenses | Create a License -*LicensesApi* | [**deleteLicense**](docs/LicensesApi.md#deleteLicense) | **DELETE** /licenses/{id} | Delete the license -*LicensesApi* | [**findLicenseById**](docs/LicensesApi.md#findLicenseById) | **GET** /licenses/{id} | Retrieve a license -*LicensesApi* | [**findProjectLicenses**](docs/LicensesApi.md#findProjectLicenses) | **GET** /projects/{id}/licenses | Retrieve all licenses -*LicensesApi* | [**updateLicense**](docs/LicensesApi.md#updateLicense) | **PUT** /licenses/{id} | Update the license -*MembershipsApi* | [**deleteMembership**](docs/MembershipsApi.md#deleteMembership) | **DELETE** /memberships/{id} | Delete the membership -*MembershipsApi* | [**findMembershipById**](docs/MembershipsApi.md#findMembershipById) | **GET** /memberships/{id} | Retrieve a membership -*MembershipsApi* | [**updateMembership**](docs/MembershipsApi.md#updateMembership) | **PUT** /memberships/{id} | Update the membership -*MetalGatewaysApi* | [**createMetalGateway**](docs/MetalGatewaysApi.md#createMetalGateway) | **POST** /projects/{project_id}/metal-gateways | Create a metal gateway -*MetalGatewaysApi* | [**createMetalGatewayElasticIp**](docs/MetalGatewaysApi.md#createMetalGatewayElasticIp) | **POST** /metal-gateways/{id}/ips | Create a Metal Gateway Elastic IP -*MetalGatewaysApi* | [**deleteMetalGateway**](docs/MetalGatewaysApi.md#deleteMetalGateway) | **DELETE** /metal-gateways/{id} | Deletes the metal gateway -*MetalGatewaysApi* | [**findMetalGatewayById**](docs/MetalGatewaysApi.md#findMetalGatewayById) | **GET** /metal-gateways/{id} | Returns the metal gateway -*MetalGatewaysApi* | [**findMetalGatewaysByProject**](docs/MetalGatewaysApi.md#findMetalGatewaysByProject) | **GET** /projects/{project_id}/metal-gateways | Returns all metal gateways for a project -*MetalGatewaysApi* | [**getMetalGatewayElasticIps**](docs/MetalGatewaysApi.md#getMetalGatewayElasticIps) | **GET** /metal-gateways/{id}/ips | List Metal Gateway Elastic IPs -*MetrosApi* | [**findMetros**](docs/MetrosApi.md#findMetros) | **GET** /locations/metros | Retrieve all metros -*MetrosApi* | [**getMetro**](docs/MetrosApi.md#getMetro) | **GET** /locations/metros/{id} | Retrieve a specific Metro's details -*OperatingSystemsApi* | [**findOperatingSystemVersion**](docs/OperatingSystemsApi.md#findOperatingSystemVersion) | **GET** /operating-system-versions | Retrieve all operating system versions -*OperatingSystemsApi* | [**findOperatingSystems**](docs/OperatingSystemsApi.md#findOperatingSystems) | **GET** /operating-systems | Retrieve all operating systems -*OrganizationsApi* | [**createOrganization**](docs/OrganizationsApi.md#createOrganization) | **POST** /organizations | Create an organization -*OrganizationsApi* | [**createOrganizationInvitation**](docs/OrganizationsApi.md#createOrganizationInvitation) | **POST** /organizations/{id}/invitations | Create an invitation for an organization -*OrganizationsApi* | [**createOrganizationProject**](docs/OrganizationsApi.md#createOrganizationProject) | **POST** /organizations/{id}/projects | Create a project for the organization -*OrganizationsApi* | [**createPaymentMethod**](docs/OrganizationsApi.md#createPaymentMethod) | **POST** /organizations/{id}/payment-methods | Create a payment method for the given organization -*OrganizationsApi* | [**deleteOrganization**](docs/OrganizationsApi.md#deleteOrganization) | **DELETE** /organizations/{id} | Delete the organization -*OrganizationsApi* | [**findOperatingSystemsByOrganization**](docs/OrganizationsApi.md#findOperatingSystemsByOrganization) | **GET** /organizations/{id}/operating-systems | Retrieve all operating systems visible by the organization -*OrganizationsApi* | [**findOrganizationById**](docs/OrganizationsApi.md#findOrganizationById) | **GET** /organizations/{id} | Retrieve an organization's details -*OrganizationsApi* | [**findOrganizationCustomdata**](docs/OrganizationsApi.md#findOrganizationCustomdata) | **GET** /organizations/{id}/customdata | Retrieve the custom metadata of an organization -*OrganizationsApi* | [**findOrganizationInvitations**](docs/OrganizationsApi.md#findOrganizationInvitations) | **GET** /organizations/{id}/invitations | Retrieve organization invitations -*OrganizationsApi* | [**findOrganizationPaymentMethods**](docs/OrganizationsApi.md#findOrganizationPaymentMethods) | **GET** /organizations/{id}/payment-methods | Retrieve all payment methods of an organization -*OrganizationsApi* | [**findOrganizationProjects**](docs/OrganizationsApi.md#findOrganizationProjects) | **GET** /organizations/{id}/projects | Retrieve all projects of an organization -*OrganizationsApi* | [**findOrganizationTransfers**](docs/OrganizationsApi.md#findOrganizationTransfers) | **GET** /organizations/{id}/transfers | Retrieve all project transfer requests from or to an organization -*OrganizationsApi* | [**findOrganizations**](docs/OrganizationsApi.md#findOrganizations) | **GET** /organizations | Retrieve all organizations -*OrganizationsApi* | [**findPlansByOrganization**](docs/OrganizationsApi.md#findPlansByOrganization) | **GET** /organizations/{id}/plans | Retrieve all plans visible by the organization -*OrganizationsApi* | [**updateOrganization**](docs/OrganizationsApi.md#updateOrganization) | **PUT** /organizations/{id} | Update the organization -*OtpsApi* | [**findEnsureOtp**](docs/OtpsApi.md#findEnsureOtp) | **POST** /user/otp/verify/{otp} | Verify user by providing an OTP -*OtpsApi* | [**findRecoveryCodes**](docs/OtpsApi.md#findRecoveryCodes) | **GET** /user/otp/recovery-codes | Retrieve my recovery codes -*OtpsApi* | [**receiveCodes**](docs/OtpsApi.md#receiveCodes) | **POST** /user/otp/sms/receive | Receive an OTP per sms -*OtpsApi* | [**regenerateCodes**](docs/OtpsApi.md#regenerateCodes) | **POST** /user/otp/recovery-codes | Generate new recovery codes -*PasswordResetTokensApi* | [**createPasswordResetToken**](docs/PasswordResetTokensApi.md#createPasswordResetToken) | **POST** /reset-password | Create a password reset token -*PasswordResetTokensApi* | [**resetPassword**](docs/PasswordResetTokensApi.md#resetPassword) | **DELETE** /reset-password | Reset current user password -*PaymentMethodsApi* | [**deletePaymentMethod**](docs/PaymentMethodsApi.md#deletePaymentMethod) | **DELETE** /payment-methods/{id} | Delete the payment method -*PaymentMethodsApi* | [**findPaymentMethodById**](docs/PaymentMethodsApi.md#findPaymentMethodById) | **GET** /payment-methods/{id} | Retrieve a payment method -*PaymentMethodsApi* | [**updatePaymentMethod**](docs/PaymentMethodsApi.md#updatePaymentMethod) | **PUT** /payment-methods/{id} | Update the payment method -*PlansApi* | [**findPlans**](docs/PlansApi.md#findPlans) | **GET** /plans | Retrieve all plans -*PlansApi* | [**findPlansByProject**](docs/PlansApi.md#findPlansByProject) | **GET** /projects/{id}/plans | Retrieve all plans visible by the project -*PortsApi* | [**assignNativeVlan**](docs/PortsApi.md#assignNativeVlan) | **POST** /ports/{id}/native-vlan | Assign a native VLAN -*PortsApi* | [**assignPort**](docs/PortsApi.md#assignPort) | **POST** /ports/{id}/assign | Assign a port to virtual network -*PortsApi* | [**bondPort**](docs/PortsApi.md#bondPort) | **POST** /ports/{id}/bond | Enabling bonding -*PortsApi* | [**convertLayer2**](docs/PortsApi.md#convertLayer2) | **POST** /ports/{id}/convert/layer-2 | Convert to Layer 2 -*PortsApi* | [**convertLayer3**](docs/PortsApi.md#convertLayer3) | **POST** /ports/{id}/convert/layer-3 | Convert to Layer 3 -*PortsApi* | [**createPortVlanAssignmentBatch**](docs/PortsApi.md#createPortVlanAssignmentBatch) | **POST** /ports/{id}/vlan-assignments/batches | Create a new Port-VLAN Assignment management batch -*PortsApi* | [**deleteNativeVlan**](docs/PortsApi.md#deleteNativeVlan) | **DELETE** /ports/{id}/native-vlan | Remove native VLAN -*PortsApi* | [**disbondPort**](docs/PortsApi.md#disbondPort) | **POST** /ports/{id}/disbond | Disabling bonding -*PortsApi* | [**findPortById**](docs/PortsApi.md#findPortById) | **GET** /ports/{id} | Retrieve a port -*PortsApi* | [**findPortVlanAssignmentBatchByPortIdAndBatchId**](docs/PortsApi.md#findPortVlanAssignmentBatchByPortIdAndBatchId) | **GET** /ports/{id}/vlan-assignments/batches/{batch_id} | Retrieve a VLAN Assignment Batch's details -*PortsApi* | [**findPortVlanAssignmentBatches**](docs/PortsApi.md#findPortVlanAssignmentBatches) | **GET** /ports/{id}/vlan-assignments/batches | List the VLAN Assignment Batches for a port -*PortsApi* | [**findPortVlanAssignmentByPortIdAndAssignmentId**](docs/PortsApi.md#findPortVlanAssignmentByPortIdAndAssignmentId) | **GET** /ports/{id}/vlan-assignments/{assignment_id} | Show a particular Port VLAN assignment's details -*PortsApi* | [**findPortVlanAssignments**](docs/PortsApi.md#findPortVlanAssignments) | **GET** /ports/{id}/vlan-assignments | List Current VLAN assignments for a port -*PortsApi* | [**unassignPort**](docs/PortsApi.md#unassignPort) | **POST** /ports/{id}/unassign | Unassign a port -*ProjectsApi* | [**createProject**](docs/ProjectsApi.md#createProject) | **POST** /projects | Create a project -*ProjectsApi* | [**createProjectInvitation**](docs/ProjectsApi.md#createProjectInvitation) | **POST** /projects/{project_id}/invitations | Create an invitation for a project -*ProjectsApi* | [**createTransferRequest**](docs/ProjectsApi.md#createTransferRequest) | **POST** /projects/{id}/transfers | Create a transfer request -*ProjectsApi* | [**deleteProject**](docs/ProjectsApi.md#deleteProject) | **DELETE** /projects/{id} | Delete the project -*ProjectsApi* | [**findIPReservationCustomdata**](docs/ProjectsApi.md#findIPReservationCustomdata) | **GET** /projects/{project_id}/ips/{id}/customdata | Retrieve the custom metadata of an IP Reservation -*ProjectsApi* | [**findProjectById**](docs/ProjectsApi.md#findProjectById) | **GET** /projects/{id} | Retrieve a project -*ProjectsApi* | [**findProjectCustomdata**](docs/ProjectsApi.md#findProjectCustomdata) | **GET** /projects/{id}/customdata | Retrieve the custom metadata of a project -*ProjectsApi* | [**findProjectInvitations**](docs/ProjectsApi.md#findProjectInvitations) | **GET** /projects/{project_id}/invitations | Retrieve project invitations -*ProjectsApi* | [**findProjectMemberships**](docs/ProjectsApi.md#findProjectMemberships) | **GET** /projects/{project_id}/memberships | Retrieve project memberships -*ProjectsApi* | [**findProjects**](docs/ProjectsApi.md#findProjects) | **GET** /projects | Retrieve all projects -*ProjectsApi* | [**updateProject**](docs/ProjectsApi.md#updateProject) | **PUT** /projects/{id} | Update the project -*SelfServiceReservationsApi* | [**createSelfServiceReservation**](docs/SelfServiceReservationsApi.md#createSelfServiceReservation) | **POST** /projects/{project_id}/self-service/reservations | Create a reservation -*SelfServiceReservationsApi* | [**findSelfServiceReservation**](docs/SelfServiceReservationsApi.md#findSelfServiceReservation) | **GET** /projects/{project_id}/self-service/reservations/{id} | Retrieve a reservation -*SelfServiceReservationsApi* | [**findSelfServiceReservations**](docs/SelfServiceReservationsApi.md#findSelfServiceReservations) | **GET** /projects/{project_id}/self-service/reservations | Retrieve all reservations -*SpotMarketApi* | [**createSpotMarketRequest**](docs/SpotMarketApi.md#createSpotMarketRequest) | **POST** /projects/{id}/spot-market-requests | Create a spot market request -*SpotMarketApi* | [**deleteSpotMarketRequest**](docs/SpotMarketApi.md#deleteSpotMarketRequest) | **DELETE** /spot-market-requests/{id} | Delete the spot market request -*SpotMarketApi* | [**findMetroSpotMarketPrices**](docs/SpotMarketApi.md#findMetroSpotMarketPrices) | **GET** /market/spot/prices/metros | Get current spot market prices for metros -*SpotMarketApi* | [**findSpotMarketPrices**](docs/SpotMarketApi.md#findSpotMarketPrices) | **GET** /market/spot/prices | Get current spot market prices -*SpotMarketApi* | [**findSpotMarketPricesHistory**](docs/SpotMarketApi.md#findSpotMarketPricesHistory) | **GET** /market/spot/prices/history | Get spot market prices for a given period of time -*SpotMarketApi* | [**findSpotMarketRequestById**](docs/SpotMarketApi.md#findSpotMarketRequestById) | **GET** /spot-market-requests/{id} | Retrieve a spot market request -*SpotMarketApi* | [**listSpotMarketRequests**](docs/SpotMarketApi.md#listSpotMarketRequests) | **GET** /projects/{id}/spot-market-requests | List spot market requests -*SshKeysApi* | [**createProjectSSHKey**](docs/SshKeysApi.md#createProjectSSHKey) | **POST** /projects/{id}/ssh-keys | Create a ssh key for the given project -*SshKeysApi* | [**createSSHKey**](docs/SshKeysApi.md#createSSHKey) | **POST** /ssh-keys | Create a ssh key for the current user -*SshKeysApi* | [**deleteSSHKey**](docs/SshKeysApi.md#deleteSSHKey) | **DELETE** /ssh-keys/{id} | Delete the ssh key -*SshKeysApi* | [**findDeviceSSHKeys**](docs/SshKeysApi.md#findDeviceSSHKeys) | **GET** /devices/{id}/ssh-keys | Retrieve a device's ssh keys -*SshKeysApi* | [**findProjectSSHKeys**](docs/SshKeysApi.md#findProjectSSHKeys) | **GET** /projects/{id}/ssh-keys | Retrieve a project's ssh keys -*SshKeysApi* | [**findSSHKeyById**](docs/SshKeysApi.md#findSSHKeyById) | **GET** /ssh-keys/{id} | Retrieve a ssh key -*SshKeysApi* | [**findSSHKeys**](docs/SshKeysApi.md#findSSHKeys) | **GET** /ssh-keys | Retrieve all ssh keys -*SshKeysApi* | [**updateSSHKey**](docs/SshKeysApi.md#updateSSHKey) | **PUT** /ssh-keys/{id} | Update the ssh key -*SupportRequestApi* | [**requestSuppert**](docs/SupportRequestApi.md#requestSuppert) | **POST** /support-requests | Create a support ticket -*TransferRequestsApi* | [**acceptTransferRequest**](docs/TransferRequestsApi.md#acceptTransferRequest) | **PUT** /transfers/{id} | Accept a transfer request -*TransferRequestsApi* | [**declineTransferRequest**](docs/TransferRequestsApi.md#declineTransferRequest) | **DELETE** /transfers/{id} | Decline a transfer request -*TransferRequestsApi* | [**findTransferRequestById**](docs/TransferRequestsApi.md#findTransferRequestById) | **GET** /transfers/{id} | View a transfer request -*TwoFactorAuthApi* | [**disableTfaApp**](docs/TwoFactorAuthApi.md#disableTfaApp) | **DELETE** /user/otp/app | Disable two factor authentication -*TwoFactorAuthApi* | [**disableTfaSms**](docs/TwoFactorAuthApi.md#disableTfaSms) | **DELETE** /user/otp/sms | Disable two factor authentication -*TwoFactorAuthApi* | [**enableTfaApp**](docs/TwoFactorAuthApi.md#enableTfaApp) | **POST** /user/otp/app | Enable two factor auth using app -*TwoFactorAuthApi* | [**enableTfaSms**](docs/TwoFactorAuthApi.md#enableTfaSms) | **POST** /user/otp/sms | Enable two factor auth using sms -*UsagesApi* | [**findDeviceUsages**](docs/UsagesApi.md#findDeviceUsages) | **GET** /devices/{id}/usages | Retrieve all usages for device -*UsagesApi* | [**findProjectUsage**](docs/UsagesApi.md#findProjectUsage) | **GET** /projects/{id}/usages | Retrieve all usages for project -*UserVerificationTokensApi* | [**consumeVerificationRequest**](docs/UserVerificationTokensApi.md#consumeVerificationRequest) | **PUT** /verify-email | Verify a user using an email verification token -*UserVerificationTokensApi* | [**createValidationRequest**](docs/UserVerificationTokensApi.md#createValidationRequest) | **POST** /verify-email | Create an email verification request -*UserdataApi* | [**validateUserdata**](docs/UserdataApi.md#validateUserdata) | **POST** /userdata/validate | Validate user data -*UsersApi* | [**createUser**](docs/UsersApi.md#createUser) | **POST** /users | Create a user -*UsersApi* | [**findCurrentUser**](docs/UsersApi.md#findCurrentUser) | **GET** /user | Retrieve the current user -*UsersApi* | [**findInvitations**](docs/UsersApi.md#findInvitations) | **GET** /invitations | Retrieve current user invitations -*UsersApi* | [**findUserById**](docs/UsersApi.md#findUserById) | **GET** /users/{id} | Retrieve a user -*UsersApi* | [**findUserCustomdata**](docs/UsersApi.md#findUserCustomdata) | **GET** /users/{id}/customdata | Retrieve the custom metadata of a user -*UsersApi* | [**findUsers**](docs/UsersApi.md#findUsers) | **GET** /users | Retrieve all users -*UsersApi* | [**updateCurrentUser**](docs/UsersApi.md#updateCurrentUser) | **PUT** /user | Update the current user -*VlansApi* | [**createVirtualNetwork**](docs/VlansApi.md#createVirtualNetwork) | **POST** /projects/{id}/virtual-networks | Create a virtual network -*VlansApi* | [**deleteVirtualNetwork**](docs/VlansApi.md#deleteVirtualNetwork) | **DELETE** /virtual-networks/{id} | Delete a virtual network -*VlansApi* | [**findVirtualNetworks**](docs/VlansApi.md#findVirtualNetworks) | **GET** /projects/{id}/virtual-networks | Retrieve all virtual networks -*VlansApi* | [**getVirtualNetwork**](docs/VlansApi.md#getVirtualNetwork) | **GET** /virtual-networks/{id} | Get a virtual network -*VrfsApi* | [**bgpDynamicNeighborsIdGet**](docs/VrfsApi.md#bgpDynamicNeighborsIdGet) | **GET** /bgp-dynamic-neighbors/{id} | Retrieve a BGP Dynamic Neighbor -*VrfsApi* | [**createBgpDynamicNeighbor**](docs/VrfsApi.md#createBgpDynamicNeighbor) | **POST** /metal-gateways/{id}/bgp-dynamic-neighbors | Create a VRF BGP Dynamic Neighbor range -*VrfsApi* | [**createVrf**](docs/VrfsApi.md#createVrf) | **POST** /projects/{id}/vrfs | Create a new VRF in the specified project -*VrfsApi* | [**createVrfRoute**](docs/VrfsApi.md#createVrfRoute) | **POST** /vrfs/{id}/routes | Create a VRF route -*VrfsApi* | [**deleteBgpDynamicNeighborById**](docs/VrfsApi.md#deleteBgpDynamicNeighborById) | **DELETE** /bgp-dynamic-neighbors/{id} | Delete a VRF BGP Dynamic Neighbor -*VrfsApi* | [**deleteVrf**](docs/VrfsApi.md#deleteVrf) | **DELETE** /vrfs/{id} | Delete the VRF -*VrfsApi* | [**deleteVrfRouteById**](docs/VrfsApi.md#deleteVrfRouteById) | **DELETE** /routes/{id} | Delete a VRF Route -*VrfsApi* | [**findVrfById**](docs/VrfsApi.md#findVrfById) | **GET** /vrfs/{id} | Retrieve a VRF -*VrfsApi* | [**findVrfIpReservation**](docs/VrfsApi.md#findVrfIpReservation) | **GET** /vrfs/{vrf_id}/ips/{id} | Retrieve all VRF IP Reservations in the VRF -*VrfsApi* | [**findVrfIpReservations**](docs/VrfsApi.md#findVrfIpReservations) | **GET** /vrfs/{id}/ips | Retrieve all VRF IP Reservations in the VRF -*VrfsApi* | [**findVrfRouteById**](docs/VrfsApi.md#findVrfRouteById) | **GET** /routes/{id} | Retrieve a VRF Route -*VrfsApi* | [**findVrfs**](docs/VrfsApi.md#findVrfs) | **GET** /projects/{id}/vrfs | Retrieve all VRFs in the project -*VrfsApi* | [**getBgpDynamicNeighbors**](docs/VrfsApi.md#getBgpDynamicNeighbors) | **GET** /metal-gateways/{id}/bgp-dynamic-neighbors | List BGP Dynamic Neighbors -*VrfsApi* | [**getVrfRoutes**](docs/VrfsApi.md#getVrfRoutes) | **GET** /vrfs/{id}/routes | Retrieve all routes in the VRF -*VrfsApi* | [**updateVrf**](docs/VrfsApi.md#updateVrf) | **PUT** /vrfs/{id} | Update the VRF -*VrfsApi* | [**updateVrfRouteById**](docs/VrfsApi.md#updateVrfRouteById) | **PUT** /routes/{id} | Update a VRF Route - - -## Documentation for Models - - - [ActivateHardwareReservationRequest](docs/ActivateHardwareReservationRequest.md) - - [Address](docs/Address.md) - - [Attribute](docs/Attribute.md) - - [AttributeData](docs/AttributeData.md) - - [AuthToken](docs/AuthToken.md) - - [AuthTokenInput](docs/AuthTokenInput.md) - - [AuthTokenList](docs/AuthTokenList.md) - - [AuthTokenProject](docs/AuthTokenProject.md) - - [AuthTokenUser](docs/AuthTokenUser.md) - - [BGPSessionInput](docs/BGPSessionInput.md) - - [Batch](docs/Batch.md) - - [BatchesList](docs/BatchesList.md) - - [BgpConfig](docs/BgpConfig.md) - - [BgpConfigRequestInput](docs/BgpConfigRequestInput.md) - - [BgpDynamicNeighbor](docs/BgpDynamicNeighbor.md) - - [BgpDynamicNeighborCreateInput](docs/BgpDynamicNeighborCreateInput.md) - - [BgpDynamicNeighborList](docs/BgpDynamicNeighborList.md) - - [BgpNeighborData](docs/BgpNeighborData.md) - - [BgpRoute](docs/BgpRoute.md) - - [BgpSession](docs/BgpSession.md) - - [BgpSessionList](docs/BgpSessionList.md) - - [BgpSessionNeighbors](docs/BgpSessionNeighbors.md) - - [BondPortData](docs/BondPortData.md) - - [CapacityCheckPerFacilityInfo](docs/CapacityCheckPerFacilityInfo.md) - - [CapacityCheckPerFacilityList](docs/CapacityCheckPerFacilityList.md) - - [CapacityCheckPerMetroInfo](docs/CapacityCheckPerMetroInfo.md) - - [CapacityCheckPerMetroList](docs/CapacityCheckPerMetroList.md) - - [CapacityInput](docs/CapacityInput.md) - - [CapacityLevelPerBaremetal](docs/CapacityLevelPerBaremetal.md) - - [CapacityList](docs/CapacityList.md) - - [Component](docs/Component.md) - - [Coordinates](docs/Coordinates.md) - - [CreateDeviceRequest](docs/CreateDeviceRequest.md) - - [CreateEmailInput](docs/CreateEmailInput.md) - - [CreateMetalGatewayRequest](docs/CreateMetalGatewayRequest.md) - - [CreateOrganizationInterconnectionRequest](docs/CreateOrganizationInterconnectionRequest.md) - - [CreateSelfServiceReservationRequest](docs/CreateSelfServiceReservationRequest.md) - - [CreateSelfServiceReservationRequestPeriod](docs/CreateSelfServiceReservationRequestPeriod.md) - - [DedicatedPortCreateInput](docs/DedicatedPortCreateInput.md) - - [Device](docs/Device.md) - - [DeviceActionInput](docs/DeviceActionInput.md) - - [DeviceActionsInner](docs/DeviceActionsInner.md) - - [DeviceCreateInFacilityInput](docs/DeviceCreateInFacilityInput.md) - - [DeviceCreateInMetroInput](docs/DeviceCreateInMetroInput.md) - - [DeviceCreateInput](docs/DeviceCreateInput.md) - - [DeviceCreatedBy](docs/DeviceCreatedBy.md) - - [DeviceHealthRollup](docs/DeviceHealthRollup.md) - - [DeviceList](docs/DeviceList.md) - - [DeviceMetro](docs/DeviceMetro.md) - - [DeviceProject](docs/DeviceProject.md) - - [DeviceProjectLite](docs/DeviceProjectLite.md) - - [DeviceUpdateInput](docs/DeviceUpdateInput.md) - - [DeviceUsage](docs/DeviceUsage.md) - - [DeviceUsageList](docs/DeviceUsageList.md) - - [Disk](docs/Disk.md) - - [Email](docs/Email.md) - - [EmailInput](docs/EmailInput.md) - - [Entitlement](docs/Entitlement.md) - - [Error](docs/Error.md) - - [Event](docs/Event.md) - - [EventList](docs/EventList.md) - - [FabricServiceToken](docs/FabricServiceToken.md) - - [Facility](docs/Facility.md) - - [FacilityInput](docs/FacilityInput.md) - - [FacilityList](docs/FacilityList.md) - - [Filesystem](docs/Filesystem.md) - - [FindIPAddressById200Response](docs/FindIPAddressById200Response.md) - - [FindMetalGatewayById200Response](docs/FindMetalGatewayById200Response.md) - - [FindTrafficTimeframeParameter](docs/FindTrafficTimeframeParameter.md) - - [FirmwareSet](docs/FirmwareSet.md) - - [FirmwareSetListResponse](docs/FirmwareSetListResponse.md) - - [FirmwareSetResponse](docs/FirmwareSetResponse.md) - - [GlobalBgpRange](docs/GlobalBgpRange.md) - - [GlobalBgpRangeList](docs/GlobalBgpRangeList.md) - - [HardwareReservation](docs/HardwareReservation.md) - - [HardwareReservationList](docs/HardwareReservationList.md) - - [Href](docs/Href.md) - - [IPAddress](docs/IPAddress.md) - - [IPAssignment](docs/IPAssignment.md) - - [IPAssignmentInput](docs/IPAssignmentInput.md) - - [IPAssignmentList](docs/IPAssignmentList.md) - - [IPAssignmentMetro](docs/IPAssignmentMetro.md) - - [IPAssignmentUpdateInput](docs/IPAssignmentUpdateInput.md) - - [IPAvailabilitiesList](docs/IPAvailabilitiesList.md) - - [IPReservation](docs/IPReservation.md) - - [IPReservationFacility](docs/IPReservationFacility.md) - - [IPReservationList](docs/IPReservationList.md) - - [IPReservationListIpAddressesInner](docs/IPReservationListIpAddressesInner.md) - - [IPReservationMetro](docs/IPReservationMetro.md) - - [IPReservationOrHref](docs/IPReservationOrHref.md) - - [IPReservationRequestInput](docs/IPReservationRequestInput.md) - - [InstancesBatchCreateInput](docs/InstancesBatchCreateInput.md) - - [InstancesBatchCreateInputBatchesInner](docs/InstancesBatchCreateInputBatchesInner.md) - - [Interconnection](docs/Interconnection.md) - - [InterconnectionList](docs/InterconnectionList.md) - - [InterconnectionPort](docs/InterconnectionPort.md) - - [InterconnectionPortList](docs/InterconnectionPortList.md) - - [InterconnectionUpdateInput](docs/InterconnectionUpdateInput.md) - - [Invitation](docs/Invitation.md) - - [InvitationInput](docs/InvitationInput.md) - - [InvitationList](docs/InvitationList.md) - - [Invoice](docs/Invoice.md) - - [InvoiceList](docs/InvoiceList.md) - - [License](docs/License.md) - - [LicenseCreateInput](docs/LicenseCreateInput.md) - - [LicenseList](docs/LicenseList.md) - - [LicenseUpdateInput](docs/LicenseUpdateInput.md) - - [LineItem](docs/LineItem.md) - - [Membership](docs/Membership.md) - - [MembershipInput](docs/MembershipInput.md) - - [MembershipList](docs/MembershipList.md) - - [Meta](docs/Meta.md) - - [Metadata](docs/Metadata.md) - - [MetadataNetwork](docs/MetadataNetwork.md) - - [MetadataNetworkNetwork](docs/MetadataNetworkNetwork.md) - - [MetadataNetworkNetworkBonding](docs/MetadataNetworkNetworkBonding.md) - - [MetalGateway](docs/MetalGateway.md) - - [MetalGatewayCreateInput](docs/MetalGatewayCreateInput.md) - - [MetalGatewayElasticIpCreateInput](docs/MetalGatewayElasticIpCreateInput.md) - - [MetalGatewayList](docs/MetalGatewayList.md) - - [MetalGatewayListMetalGatewaysInner](docs/MetalGatewayListMetalGatewaysInner.md) - - [MetalGatewayLite](docs/MetalGatewayLite.md) - - [Metro](docs/Metro.md) - - [MetroInput](docs/MetroInput.md) - - [MetroList](docs/MetroList.md) - - [Mount](docs/Mount.md) - - [MoveHardwareReservationRequest](docs/MoveHardwareReservationRequest.md) - - [NewPassword](docs/NewPassword.md) - - [OperatingSystem](docs/OperatingSystem.md) - - [OperatingSystemList](docs/OperatingSystemList.md) - - [Organization](docs/Organization.md) - - [OrganizationInput](docs/OrganizationInput.md) - - [OrganizationList](docs/OrganizationList.md) - - [ParentBlock](docs/ParentBlock.md) - - [Partition](docs/Partition.md) - - [PaymentMethod](docs/PaymentMethod.md) - - [PaymentMethodBillingAddress](docs/PaymentMethodBillingAddress.md) - - [PaymentMethodCreateInput](docs/PaymentMethodCreateInput.md) - - [PaymentMethodList](docs/PaymentMethodList.md) - - [PaymentMethodUpdateInput](docs/PaymentMethodUpdateInput.md) - - [Plan](docs/Plan.md) - - [PlanAvailableInInner](docs/PlanAvailableInInner.md) - - [PlanAvailableInInnerPrice](docs/PlanAvailableInInnerPrice.md) - - [PlanAvailableInMetrosInner](docs/PlanAvailableInMetrosInner.md) - - [PlanList](docs/PlanList.md) - - [PlanSpecs](docs/PlanSpecs.md) - - [PlanSpecsCpusInner](docs/PlanSpecsCpusInner.md) - - [PlanSpecsDrivesInner](docs/PlanSpecsDrivesInner.md) - - [PlanSpecsFeatures](docs/PlanSpecsFeatures.md) - - [PlanSpecsMemory](docs/PlanSpecsMemory.md) - - [PlanSpecsNicsInner](docs/PlanSpecsNicsInner.md) - - [Port](docs/Port.md) - - [PortAssignInput](docs/PortAssignInput.md) - - [PortConvertLayer3Input](docs/PortConvertLayer3Input.md) - - [PortConvertLayer3InputRequestIpsInner](docs/PortConvertLayer3InputRequestIpsInner.md) - - [PortData](docs/PortData.md) - - [PortVlanAssignment](docs/PortVlanAssignment.md) - - [PortVlanAssignmentBatch](docs/PortVlanAssignmentBatch.md) - - [PortVlanAssignmentBatchCreateInput](docs/PortVlanAssignmentBatchCreateInput.md) - - [PortVlanAssignmentBatchCreateInputVlanAssignmentsInner](docs/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.md) - - [PortVlanAssignmentBatchList](docs/PortVlanAssignmentBatchList.md) - - [PortVlanAssignmentBatchVlanAssignmentsInner](docs/PortVlanAssignmentBatchVlanAssignmentsInner.md) - - [PortVlanAssignmentList](docs/PortVlanAssignmentList.md) - - [Project](docs/Project.md) - - [ProjectCreateFromRootInput](docs/ProjectCreateFromRootInput.md) - - [ProjectCreateInput](docs/ProjectCreateInput.md) - - [ProjectIdName](docs/ProjectIdName.md) - - [ProjectList](docs/ProjectList.md) - - [ProjectUpdateInput](docs/ProjectUpdateInput.md) - - [ProjectUsage](docs/ProjectUsage.md) - - [ProjectUsageList](docs/ProjectUsageList.md) - - [Raid](docs/Raid.md) - - [RecoveryCodeList](docs/RecoveryCodeList.md) - - [RequestIPReservation201Response](docs/RequestIPReservation201Response.md) - - [RequestIPReservationRequest](docs/RequestIPReservationRequest.md) - - [SSHKey](docs/SSHKey.md) - - [SSHKeyCreateInput](docs/SSHKeyCreateInput.md) - - [SSHKeyInput](docs/SSHKeyInput.md) - - [SSHKeyList](docs/SSHKeyList.md) - - [SelfServiceReservationItemRequest](docs/SelfServiceReservationItemRequest.md) - - [SelfServiceReservationItemResponse](docs/SelfServiceReservationItemResponse.md) - - [SelfServiceReservationList](docs/SelfServiceReservationList.md) - - [SelfServiceReservationResponse](docs/SelfServiceReservationResponse.md) - - [ServerInfo](docs/ServerInfo.md) - - [SpotMarketPricesList](docs/SpotMarketPricesList.md) - - [SpotMarketPricesPerMetroList](docs/SpotMarketPricesPerMetroList.md) - - [SpotMarketPricesPerMetroReport](docs/SpotMarketPricesPerMetroReport.md) - - [SpotMarketRequest](docs/SpotMarketRequest.md) - - [SpotMarketRequestCreateInput](docs/SpotMarketRequestCreateInput.md) - - [SpotMarketRequestCreateInputInstanceParameters](docs/SpotMarketRequestCreateInputInstanceParameters.md) - - [SpotMarketRequestList](docs/SpotMarketRequestList.md) - - [SpotMarketRequestMetro](docs/SpotMarketRequestMetro.md) - - [SpotPricesDatapoints](docs/SpotPricesDatapoints.md) - - [SpotPricesHistoryReport](docs/SpotPricesHistoryReport.md) - - [SpotPricesPerBaremetal](docs/SpotPricesPerBaremetal.md) - - [SpotPricesPerFacility](docs/SpotPricesPerFacility.md) - - [SpotPricesPerNewFacility](docs/SpotPricesPerNewFacility.md) - - [SpotPricesReport](docs/SpotPricesReport.md) - - [Storage](docs/Storage.md) - - [SupportRequestInput](docs/SupportRequestInput.md) - - [TransferRequest](docs/TransferRequest.md) - - [TransferRequestInput](docs/TransferRequestInput.md) - - [TransferRequestList](docs/TransferRequestList.md) - - [UpdateEmailInput](docs/UpdateEmailInput.md) - - [User](docs/User.md) - - [UserCreateInput](docs/UserCreateInput.md) - - [UserLimited](docs/UserLimited.md) - - [UserList](docs/UserList.md) - - [UserLite](docs/UserLite.md) - - [UserUpdateInput](docs/UserUpdateInput.md) - - [Userdata](docs/Userdata.md) - - [VerifyEmail](docs/VerifyEmail.md) - - [VirtualCircuit](docs/VirtualCircuit.md) - - [VirtualCircuitCreateInput](docs/VirtualCircuitCreateInput.md) - - [VirtualCircuitList](docs/VirtualCircuitList.md) - - [VirtualCircuitUpdateInput](docs/VirtualCircuitUpdateInput.md) - - [VirtualNetwork](docs/VirtualNetwork.md) - - [VirtualNetworkCreateInput](docs/VirtualNetworkCreateInput.md) - - [VirtualNetworkList](docs/VirtualNetworkList.md) - - [VlanFabricVcCreateInput](docs/VlanFabricVcCreateInput.md) - - [VlanVirtualCircuit](docs/VlanVirtualCircuit.md) - - [VlanVirtualCircuitCreateInput](docs/VlanVirtualCircuitCreateInput.md) - - [VlanVirtualCircuitType](docs/VlanVirtualCircuitType.md) - - [VlanVirtualCircuitUpdateInput](docs/VlanVirtualCircuitUpdateInput.md) - - [Vrf](docs/Vrf.md) - - [VrfCreateInput](docs/VrfCreateInput.md) - - [VrfFabricVcCreateInput](docs/VrfFabricVcCreateInput.md) - - [VrfIpReservation](docs/VrfIpReservation.md) - - [VrfIpReservationCreateInput](docs/VrfIpReservationCreateInput.md) - - [VrfIpReservationList](docs/VrfIpReservationList.md) - - [VrfIpReservationOrHref](docs/VrfIpReservationOrHref.md) - - [VrfList](docs/VrfList.md) - - [VrfMetalGateway](docs/VrfMetalGateway.md) - - [VrfMetalGatewayCreateInput](docs/VrfMetalGatewayCreateInput.md) - - [VrfRoute](docs/VrfRoute.md) - - [VrfRouteCreateInput](docs/VrfRouteCreateInput.md) - - [VrfRouteList](docs/VrfRouteList.md) - - [VrfRouteUpdateInput](docs/VrfRouteUpdateInput.md) - - [VrfUpdateInput](docs/VrfUpdateInput.md) - - [VrfVirtualCircuit](docs/VrfVirtualCircuit.md) - - [VrfVirtualCircuitCreateInput](docs/VrfVirtualCircuitCreateInput.md) - - [VrfVirtualCircuitType](docs/VrfVirtualCircuitType.md) - - [VrfVirtualCircuitUpdateInput](docs/VrfVirtualCircuitUpdateInput.md) - - - -## Documentation for Authorization - - -Authentication schemes defined for the API: - -### x_auth_token - -- **Type**: API key -- **API key parameter name**: X-Auth-Token -- **Location**: HTTP header - - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - -support@equinixmetal.com - diff --git a/equinix-openapi-metal/api/openapi.yaml b/equinix-openapi-metal/api/openapi.yaml deleted file mode 100644 index 4064b1a61..000000000 --- a/equinix-openapi-metal/api/openapi.yaml +++ /dev/null @@ -1,28762 +0,0 @@ -openapi: 3.0.0 -info: - contact: - email: support@equinixmetal.com - name: Equinix Metal API Team - description: | - # Introduction - Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. - - The API allows you to programmatically interact with all - of your Equinix Metal resources, including devices, networks, addresses, organizations, - projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. - - The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . - - # Common Parameters - - The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. - - ## Pagination - - Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. - - The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. - - ## Sorting - - Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). - - ## Filtering - - Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. - - For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: - - ```sh - curl -H 'X-Auth-Token: my_authentication_token' \ - https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 - ``` - - Only IP addresses with the `type` field set to `public_ipv4` will be returned. - - ## Searching - - Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. - - To search resources you can use the `search` query parameter. - - ## Include and Exclude - - For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. - - ```json - { - ... - "project": { - "href": "/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd" - } - } - ``` - - If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. - - For example: - - ```sh - curl -H 'X-Auth-Token: my_authentication_token' \ - https://api.equinix.com/metal/v1/user?include=projects - ``` - - The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. - - To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). - - ```sh - curl -H 'X-Auth-Token: my_authentication_token' \ - https://api.equinix.com/metal/v1/user?include=emails,projects,memberships - ``` - - You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): - - ```sh - curl -H 'X-Auth-Token: my_authentication_token' \ - https://api.equinix.com/metal/v1/user?include=memberships.projects - ``` - - To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - license: - name: Equinix Metal - url: https://metal.equinix.com/legal/ - termsOfService: https://metal.equinix.com/legal/ - title: Metal API - version: 1.0.0 -servers: -- url: https://api.equinix.com/metal/v1 -security: -- x_auth_token: [] -tags: -- description: | - Nearly all of the endpoints in the API require authentication. Authentication is performed by providing an authentication token (interchangeably referred to as an API key) in the `X-Auth-Token` HTTP request header. - - - - User API keys can be obtained by creating them in the Equinix Metal Portal or by using the [Create a User API Key](#operation/createAPIKey) endpoint. - - Project API keys can also be obtained by creating them in the Equinix Metal Portal or by using the [Create a Project API Key](#operation/createProjectAPIKey) endpoint. Project API keys are scoped to a single project and can only be used to access resources within that project. - - For example, to use an authenticated API token, you would make a request like the following: - - ```bash - curl -H 'X-Auth-Token: my_authentication_token' \ - https://api.equinix.com/metal/v1/user/api-keys - ``` - - Applications can take advantage of the Equinix Metal API and API keys to perform any of the actions that can be performed in the Equinix Metal Portal. For example, you can use the API to create and manage devices, projects, and other resources. - - API keys can be deleted without affecting any of the resources created with them. Access to applications using the API can be revoked by deleting the API key used to authenticate the application. - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/users/#api-keys - name: Authentication -- description: | - Equinix Metal uses conventional HTTP response codes to indicate the success or failure of an API request. - - In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Equinix Metal's servers (these are rare). - - | Code | Summary - | ---------------------------------- | ------------------------------------------------------ - | 200 OK | Everything worked as expected. - | 201 Create | Everything worked as expected, the resource was created. - | 422 Bad Request | The request was unacceptable, often due to missing a required parameter. - | 401 Unauthorized | No valid API key provided. - | 404 Not Found | The requested resource doesn't exist. - | 500, 502, 503, 504 - Server Errors | Something went wrong on Equinix Metal's end. (These are rare.) - - Errors (4xx, 5xx) reported by the API will include a JSON error response. This response will be structured as one of the following: - - ```json - {"error": "the error message"} - ``` - - or - - ```json - {"errors": ["one error", "another error"} - ``` - - The JSON response is not guaranteed so check the HTTP status message. JSON may not be included if the error is reported by an API intermediary, like a loadbalancer service. - name: Errors -- description: | - Manage device batches. See project endpoints to list batches for a particular project. Check out the product docs to learn more about [Batch Deployment](https://metal.equinix.com/developers/docs/deploy/batch-deployment/). - externalDocs: - url: https://metal.equinix.com/developers/docs/deploy/batch-deployment/ - name: Batches -- description: | - Manage BGP configs and sessions. See device endpoints to create and list BGP sessions for a particular device. Check out the product docs to learn more about [Local and Global BGP](https://metal.equinix.com/developers/docs/networking/local-global-bgp/). - externalDocs: - url: https://metal.equinix.com/developers/docs/bgp/bgp-on-equinix-metal/ - name: BGP -- description: | - Capacity Management. Check out the product docs to learn more about [Capacity](https://metal.equinix.com/developers/docs/locations/capacity/). - externalDocs: - url: https://metal.equinix.com/developers/docs/locations/capacity/ - name: Capacity -- description: | - Network Interconnections. See Instructions to create Network Interconnections at Check out the product docs to learn more about [Equinix Fabric](https://metal.equinix.com/developers/docs/networking/fabric/). - externalDocs: - url: https://metal.equinix.com/developers/docs/equinix-interconnect/introduction/ - name: Interconnections -- description: | - Device Management. Check out the product docs to learn more about [Server Devices](https://metal.equinix.com/developers/docs/servers/). - externalDocs: - url: https://metal.equinix.com/developers/docs/deploy/on-demand/ - name: Devices -- description: Email Management - name: Emails -- description: Event Management - name: Events -- description: | - Facility Management. Check out the product docs to learn more about [Facilities](https://metal.equinix.com/developers/docs/locations/). - name: Facilities -- description: | - Firmware Sets Management. Notice: Firmware Sets are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - name: Firmware Sets -- description: | - Console Log Details. Notice: This is a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - name: Console Log Details -- description: | - Global BGP Range Management - externalDocs: - url: https://metal.equinix.com/developers/docs/bgp/global-bgp/ - name: GlobalBgpRanges -- description: | - Hardware Reservation Management. Check out the product docs to learn more about [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/). - externalDocs: - url: https://metal.equinix.com/developers/docs/deploy/reserved/ - name: HardwareReservations -- description: | - Incident Management - externalDocs: - url: https://metal.equinix.com/developers/docs/locations/maintenance/ - name: Incidents -- description: | - Manage invitations. See project endpoints to create a new invitation. Check out the product docs to learn more about [Invitations](https://metal.equinix.com/developers/docs/accounts/). - name: Invitations -- description: | - Manage IP addresses. See device and project endpoints to list and create IP assignments for a particular project or device. Check out the product docs to learn more about [the basic networking features](https://metal.equinix.com/developers/docs/networking/standard-ips/). - externalDocs: - url: https://metal.equinix.com/developers/docs/networking/ - name: IPAddresses -- description: | - Manage licenses. See project endpoints to list and create licenses for a particular project. - externalDocs: - url: https://metal.equinix.com/developers/docs/operating-systems/licensed/ - name: Licenses -- description: | - Membership Management (Project). Check out the product docs to learn more about [Membership](https://metal.equinix.com/developers/docs/accounts/). - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/projects/#inviting-a-user-to-a-project - name: Memberships -- description: | - Device Metadata - externalDocs: - url: https://metal.equinix.com/developers/docs/server-metadata/metadata/ - name: Metadata -- description: | - Metal Gateway Management.Check out the product docs to learn more about [Metal Gateways](https://metal.equinix.com/developers/docs/networking/metal-gateway/). - externalDocs: - url: https://metal.equinix.com/developers/docs/networking/metal-gateway/ - name: MetalGateways -- description: "Metro Management. Check out the product docs to learn more about [Metros](https://metal.equinix.com/developers/docs/locations/metros/)." - externalDocs: - url: https://metal.equinix.com/developers/docs/locations/metros/ - name: Metros -- description: | - Operating System Management. Check out the product docs to learn more about [Operating Systems choices](https://metal.equinix.com/developers/docs/operating-systems/). - externalDocs: - url: https://metal.equinix.com/developers/docs/operating-systems/supported/ - name: OperatingSystems -- description: "Organizations Management. Check out the product docs to learn more\ - \ about [Organizations](https://metal.equinix.com/developers/docs/accounts/)." - name: Organizations -- description: | - OTP Management. Check out the product docs to learn more about [OTP](https://metal.equinix.com/developers/docs/accounts/two-factor-authentication/). - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/two-factor-authentication/ - name: OTPs -- description: | - Password Reset Token Management - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/users/#security-settings - name: PasswordResetTokens -- description: | - Payment Method Management - externalDocs: - url: https://metal.equinix.com/developers/docs/billing/payment-methods/ - name: PaymentMethods -- description: | - Plan Management (Device). Check out the product docs to learn more about [Device Plans](https://metal.equinix.com/developers/docs/servers/). - name: Plans -- description: | - Port ManagementCheck out the product docs to learn more about [Port configurations](https://metal.equinix.com/developers/docs/layer2-networking/overview/). - externalDocs: - url: https://metal.equinix.com/developers/docs/layer2-networking/overview/ - name: Ports -- description: | - Project Management. Check out the product docs to learn more about [Projects](https://metal.equinix.com/developers/docs/accounts/projects/). - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/projects/ - name: Projects -- description: | - Self Service Reservations - externalDocs: - url: https://metal.equinix.com/developers/docs/deploy/reserved/ - name: SelfServiceReservations -- description: | - Spot Market Pricing and Requests Management. Check out the product docs to learn more about [Spot Market features](https://metal.equinix.com/developers/docs/deploy/spot-market/). - externalDocs: - url: https://metal.equinix.com/developers/docs/deploy/spot-market/ - name: SpotMarket -- description: | - Manage SSH keys. See project endpoints to list and create project-level SSH keys. - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/ssh-keys/ - name: SSHKeys -- description: | - Support request - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/support/ - name: SupportRequest -- description: | - Project Transfer Requests Management - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/projects/#transferring-a-project - name: TransferRequests -- description: | - Two Factor Authentication Management. Check out the product docs to learn more about [2FA](https://metal.equinix.com/developers/docs/accounts/two-factor-authentication/). - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/two-factor-authentication/ - name: TwoFactorAuth -- description: Usage Management - externalDocs: - url: https://metal.equinix.com/developers/docs/billing/checking-usage/ - name: Usages -- description: | - Userdata Management - externalDocs: - url: https://metal.equinix.com/developers/docs/server-metadata/user-data/ - name: Userdata -- description: | - User Management - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/users/ - name: Users -- description: | - User Verification Token Management - externalDocs: - url: https://metal.equinix.com/developers/docs/accounts/organizations/#managing-team-members - name: UserVerificationTokens -- description: | - Manage virtual networks (VLANs). See project endpoints to list and create virtual networks. Check out the product docs to learn more about [VLANs](https://metal.equinix.com/developers/docs/networking/layer2/). - externalDocs: - url: https://metal.equinix.com/developers/docs/networking/layer2/ - name: VLANs -- description: | - Volume Management (Block Storage). Notice: Block storage support will be deprecated soon. Please check here: https://metal.equinix.com/developers/docs/resilience-recovery/elastic-block-storage/ for more details. - externalDocs: - url: https://metal.equinix.com/developers/docs/resilience-recovery/elastic-block-storage/ - name: Volumes -- description: | - VRF Management. A VRF is a project-scoped virtual router resource that defines a collection of customer-managed IP blocks that can be used in BGP peering on one or more virtual networks. Metal Gateways and Interconnection Virtual Circuits can take advantage of VRFs to enable Layer 3 routing with bespoke network ranges. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - name: VRFs -paths: - /api-keys/{id}: - delete: - description: Deletes the API key. - operationId: deleteAPIKey - parameters: - - description: API Key UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the API key - tags: - - Authentication - x-accepts: application/json - /batches/{id}: - delete: - description: Deletes the Batch. - operationId: deleteBatch - parameters: - - description: Batch UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Delete all instances created from this batch - in: query - name: remove_associated_instances - schema: - default: false - type: boolean - responses: - "204": - description: no content - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the Batch - tags: - - Batches - x-accepts: application/json - get: - description: Returns a Batch - operationId: findBatchById - parameters: - - description: Batch UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Batch' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a Batch - tags: - - Batches - x-accepts: application/json - /bgp/sessions/{id}: - delete: - description: Deletes the BGP session. - operationId: deleteBgpSession - parameters: - - description: BGP session UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the BGP session - tags: - - BGP - x-accepts: application/json - get: - description: Returns a BGP session - operationId: findBgpSessionById - parameters: - - description: BGP session UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpSession' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a BGP session - tags: - - BGP - x-accepts: application/json - put: - description: Updates the BGP session by either enabling or disabling the default - route functionality. - operationId: updateBgpSession - parameters: - - description: BGP session UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - type: boolean - description: Default route - required: true - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the BGP session - tags: - - BGP - x-content-type: application/json - x-accepts: application/json - /bgp-dynamic-neighbors/{id}: - delete: - description: Trigger the removal of a BGP Neighbor range from a VRF - operationId: deleteBgpDynamicNeighborById - parameters: - - description: BGP Dynamic Neighbor UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpDynamicNeighbor' - description: Accepted - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - summary: Delete a VRF BGP Dynamic Neighbor - tags: - - VRFs - x-accepts: application/json - get: - description: Return a single BGP Dynamic Neighbor resource - parameters: - - description: BGP Dynamic Neighbor UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpDynamicNeighbor' - description: OK - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - summary: Retrieve a BGP Dynamic Neighbor - tags: - - VRFs - x-accepts: application/json - /capacity: - get: - description: Returns a list of facilities and plans with their current capacity. - operationId: findCapacityForFacility - responses: - "200": - content: - application/json: - example: - capacity: - am6: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - da11: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - sv15: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - schema: - $ref: '#/components/schemas/CapacityList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: View capacity - tags: - - Capacity - x-accepts: application/json - post: - deprecated: true - description: Validates if a deploy can be fulfilled. - operationId: checkCapacityForFacility - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CapacityInput' - description: Facility to check capacity in - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/CapacityCheckPerFacilityList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Check capacity - tags: - - Capacity - x-content-type: application/json - x-accepts: application/json - /capacity/metros: - get: - description: Returns a list of metros and plans with their current capacity. - operationId: findCapacityForMetro - responses: - "200": - content: - application/json: - example: - capacity: - am: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - da: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - dc: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - schema: - $ref: '#/components/schemas/CapacityList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: View capacity for metros - tags: - - Capacity - x-accepts: application/json - post: - description: Validates if a deploy can be fulfilled in a metro. - operationId: checkCapacityForMetro - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CapacityInput' - description: Metro to check capacity in - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/CapacityCheckPerMetroList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Check capacity for a metro - tags: - - Capacity - x-content-type: application/json - x-accepts: application/json - /connections/{connection_id}: - delete: - description: "Delete a interconnection, its associated ports and virtual circuits." - operationId: deleteInterconnection - parameters: - - description: Interconnection UUID - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/Interconnection' - description: accepted - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete interconnection - tags: - - Interconnections - x-accepts: application/json - get: - description: Get the details of a interconnection - operationId: getInterconnection - parameters: - - description: Interconnection UUID - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Interconnection' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Get interconnection - tags: - - Interconnections - x-accepts: application/json - put: - description: Update the details of a interconnection - operationId: updateInterconnection - parameters: - - description: Interconnection UUID - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InterconnectionUpdateInput' - description: Updated interconnection details - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Interconnection' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Update interconnection - tags: - - Interconnections - x-content-type: application/json - x-accepts: application/json - /connections/{connection_id}/events: - get: - description: Returns a list of the interconnection events - operationId: findInterconnectionEvents - parameters: - - description: Interconnection UUID - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/EventList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve interconnection events - tags: - - Events - x-accepts: application/json - /connections/{connection_id}/ports: - get: - description: List the ports associated to an interconnection. - operationId: listInterconnectionPorts - parameters: - - description: UUID of the interconnection - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InterconnectionPortList' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: List a interconnection's ports - tags: - - Interconnections - x-accepts: application/json - /connections/{connection_id}/virtual-circuits: - get: - description: List the virtual circuit record(s) associated with a particular - interconnection id. - operationId: listInterconnectionVirtualCircuits - parameters: - - description: UUID of the interconnection - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuitList' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: List a interconnection's virtual circuits - tags: - - Interconnections - x-accepts: application/json - /connections/{connection_id}/ports/{id}: - get: - description: Get the details of an interconnection port. - operationId: getInterconnectionPort - parameters: - - description: UUID of the interconnection - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InterconnectionPort' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Get a interconnection port - tags: - - Interconnections - x-accepts: application/json - /connections/{connection_id}/ports/{id}/events: - get: - description: Returns a list of the interconnection port events - operationId: findInterconnectionPortEvents - parameters: - - description: Interconnection UUID - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - - description: Interconnection Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Event' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve interconnection port events - tags: - - Events - x-accepts: application/json - /connections/{connection_id}/ports/{port_id}/virtual-circuits: - get: - description: List the virtual circuit record(s) associatiated with a particular - interconnection port. - operationId: listInterconnectionPortVirtualCircuits - parameters: - - description: UUID of the interconnection - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - - description: UUID of the interconnection port - in: path - name: port_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuitList' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: List a interconnection port's virtual circuits - tags: - - Interconnections - x-accepts: application/json - post: - description: "Create a new Virtual Circuit on a Dedicated Port. To create a\ - \ regular Virtual Circuit, specify a Virtual Network record and an NNI VLAN\ - \ value. To create a VRF-based Virtual Circuit, specify the VRF ID and subnet,\ - \ along with the NNI VLAN value." - operationId: createInterconnectionPortVirtualCircuit - parameters: - - description: UUID of the interconnection - in: path - name: connection_id - required: true - schema: - format: uuid - type: string - - description: UUID of the interconnection port - in: path - name: port_id - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuitCreateInput' - description: Virtual Circuit details - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuit' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Create a new Virtual Circuit - tags: - - Interconnections - x-content-type: application/json - x-accepts: application/json - /devices/{id}: - delete: - description: Deletes a device and deprovisions it in our datacenter. - operationId: deleteDevice - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: "Force the deletion of the device, by detaching any storage volume\ - \ still active." - in: query - name: force_delete - schema: - type: boolean - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Delete the device - tags: - - Devices - x-accepts: application/json - get: - description: |- - Type-specific options (such as facility for baremetal devices) will be included as part of the main data structure. - State value can be one of: active inactive queued or provisioning - operationId: findDeviceById - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a device - tags: - - Devices - x-accepts: application/json - put: - description: Updates the device. - operationId: updateDevice - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceUpdateInput' - description: Device to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the device - tags: - - Devices - x-content-type: application/json - x-accepts: application/json - /devices/{id}/actions: - post: - description: "Performs an action for the given device. Possible actions include:\ - \ power_on, power_off, reboot, reinstall, and rescue (reboot the device into\ - \ rescue OS.)" - operationId: performAction - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceActionInput' - description: Action to perform - required: true - responses: - "202": - description: accepted - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Perform an action - tags: - - Devices - x-content-type: application/json - x-accepts: application/json - /devices/{id}/bandwidth: - get: - description: Retrieve an instance bandwidth for a given period of time. - operationId: findInstanceBandwidth - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Timestamp from range - in: query - name: from - required: true - schema: - type: string - - description: Timestamp to range - in: query - name: until - required: true - schema: - type: string - responses: - "200": - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve an instance bandwidth - tags: - - Devices - x-accepts: application/json - /devices/{id}/bgp/neighbors: - get: - description: Provides a summary of the BGP neighbor data associated to the BGP - sessions for this device. - operationId: getBgpNeighborData - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpSessionNeighbors' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve BGP neighbor data for this device - tags: - - Devices - x-accepts: application/json - /devices/{id}/bgp/sessions: - get: - description: Provides a listing of available BGP sessions for the device. - operationId: findBgpSessions - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpSessionList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - summary: Retrieve all BGP sessions - tags: - - Devices - x-accepts: application/json - post: - description: Creates a BGP session. - operationId: createBgpSession - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BGPSessionInput' - description: BGP session to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpSession' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a BGP session - tags: - - Devices - x-content-type: application/json - x-accepts: application/json - /devices/{id}/customdata: - get: - description: Provides the custom metadata stored for this instance in json format - operationId: findDeviceCustomdata - parameters: - - description: Instance UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve the custom metadata of an instance - tags: - - Devices - x-accepts: application/json - /devices/{id}/diagnostics/screenshot: - get: - description: "Capture a screenshot from the device, if supported, via the BMC." - operationId: captureScreenshot - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/jpeg: - schema: - format: binary - type: string - description: An image file - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "501": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not implemented for device - tags: - - Console Log Details - x-accepts: application/json - /devices/{id}/diagnostics/health/rollup: - get: - description: Returns the health rollup status of the device. - operationId: getDeviceHealthRollup - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceHealthRollup' - description: Successful operation - "401": - description: Error responses are included with 4xx and 5xx HTTP responses - from the API service. Either "error" or "errors" will be set. - "404": - description: Error responses are included with 4xx and 5xx HTTP responses - from the API service. Either "error" or "errors" will be set. - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Internal Server Error - summary: Get Device's Health Status - tags: - - Devices - x-accepts: application/json - /devices/{id}/events: - get: - description: Returns a list of events pertaining to a specific device - operationId: findDeviceEvents - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/EventList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve device's events - tags: - - Events - x-accepts: application/json - /devices/{id}/firmware-sets: - get: - description: "Returns the firmware set associated with the device. If a custom\ - \ firmware set is associated with the device, then it is returned. Otherwise,\ - \ if a default firmware set is available it is returned." - operationId: getDeviceFirmwareSets - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FirmwareSetResponse' - description: Successful operation - "401": - description: Error responses are included with 4xx and 5xx HTTP responses - from the API service. Either "error" or "errors" will be set. - "404": - description: Error responses are included with 4xx and 5xx HTTP responses - from the API service. Either "error" or "errors" will be set. - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Internal Server Error - summary: Get Device's associated Firmware Set - tags: - - Devices - x-accepts: application/json - /devices/{id}/ips: - get: - description: Returns all ip assignments for a device. - operationId: findIPAssignments - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/IPAssignmentList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all ip assignments - tags: - - Devices - x-accepts: application/json - post: - description: Creates an ip assignment for a device. - operationId: createIPAssignment - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IPAssignmentInput' - description: IPAssignment to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/IPAssignment' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create an ip assignment - tags: - - Devices - x-content-type: application/json - x-accepts: application/json - /devices/{id}/metadata: - get: - description: Retrieve device metadata - operationId: findDeviceMetadataByID - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Metadata' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Retrieve metadata - tags: - - Devices - x-accepts: application/json - /devices/{id}/ssh-keys: - get: - description: Returns a collection of the device's ssh keys. - operationId: findDeviceSSHKeys - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: "Search by key, label, or fingerprint" - in: query - name: Search string - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKeyList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve a device's ssh keys - tags: - - SSHKeys - x-accepts: application/json - /devices/{id}/traffic: - get: - description: Returns traffic for a specific device. - operationId: findTraffic - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Traffic direction - in: query - name: direction - required: true - schema: - enum: - - inbound - - outbound - type: string - - description: Traffic interval - in: query - name: interval - schema: - enum: - - minute - - hour - - day - - week - - month - - year - - hour_of_day - - day_of_week - - day_of_month - - month_of_year - type: string - - description: Traffic bucket - in: query - name: bucket - schema: - enum: - - internal - - external - type: string - - explode: true - in: query - name: timeframe - schema: - $ref: '#/components/schemas/findTraffic_timeframe_parameter' - style: deepObject - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve device traffic - tags: - - Devices - x-accepts: application/json - /devices/{id}/usages: - get: - description: Returns all usages for a device. - operationId: findDeviceUsages - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Filter usages created after this date - in: query - name: "created[after]" - schema: - format: datetime - type: string - - description: Filter usages created before this date - in: query - name: "created[before]" - schema: - format: datetime - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceUsageList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all usages for device - tags: - - Usages - x-accepts: application/json - /devices/{id}/userdata: - get: - description: Retrieve device userdata - operationId: findDeviceUserdataByID - parameters: - - description: Device UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Userdata' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Retrieve userdata - tags: - - Devices - x-accepts: application/json - /devices/{instance_id}/ips/{id}/customdata: - get: - description: Provides the custom metadata stored for this IP Assignment in json - format - operationId: findIPAssignmentCustomdata - parameters: - - description: Instance UUID - in: path - name: instance_id - required: true - schema: - format: uuid - type: string - - description: Ip Assignment UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve the custom metadata of an IP Assignment - tags: - - Devices - x-accepts: application/json - /emails: - post: - description: Add a new email address to the current user. - operationId: createEmail - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateEmailInput' - description: Email to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Email' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create an email - tags: - - Emails - x-content-type: application/json - x-accepts: application/json - /emails/{id}: - delete: - description: Deletes the email. - operationId: deleteEmail - parameters: - - description: Email UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the email - tags: - - Emails - x-accepts: application/json - get: - description: Provides one of the user’s emails. - operationId: findEmailById - parameters: - - description: Email UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Email' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve an email - tags: - - Emails - x-accepts: application/json - put: - description: Updates the email. - operationId: updateEmail - parameters: - - description: Email UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateEmailInput' - description: email to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Email' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the email - tags: - - Emails - x-content-type: application/json - x-accepts: application/json - /events: - get: - description: Returns a list of the current user’s events - operationId: findEvents - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/EventList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve current user's events - tags: - - Events - x-accepts: application/json - /events/{id}: - get: - description: Returns a single event if the user has access - operationId: findEventById - parameters: - - description: Event UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Event' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve an event - tags: - - Events - x-accepts: application/json - /facilities: - get: - deprecated: true - description: Provides a listing of available datacenters where you can provision - Packet devices. - operationId: findFacilities - parameters: - - description: Nested attributes to include. Included objects will return their - full attributes. Attribute names can be dotted (up to 3 levels) to included - deeply nested objects. - in: query - name: include - schema: - items: - enum: - - address - - labels - type: string - type: array - style: form - - description: Nested attributes to exclude. Excluded objects will return only - the href attribute. Attribute names can be dotted (up to 3 levels) to exclude - deeply nested objects. - in: query - name: exclude - schema: - default: - - address - items: - enum: - - address - - labels - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FacilityList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all facilities - tags: - - Facilities - x-accepts: application/json - /hardware-reservations/{id}: - get: - description: Returns a single hardware reservation - operationId: findHardwareReservationById - parameters: - - description: HardwareReservation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HardwareReservation' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a hardware reservation - tags: - - HardwareReservations - x-accepts: application/json - /hardware-reservations/{id}/activate: - post: - description: Activate a spare hardware reservation - operationId: activateHardwareReservation - parameters: - - description: Hardware Reservation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/activateHardwareReservation_request' - description: Note to attach to the reservation - required: false - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/HardwareReservation' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Activate a spare hardware reservation - tags: - - HardwareReservations - x-content-type: application/json - x-accepts: application/json - /hardware-reservations/{id}/move: - post: - description: Move a hardware reservation to another project - operationId: moveHardwareReservation - parameters: - - description: Hardware Reservation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/moveHardwareReservation_request' - description: Destination Project UUID - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/HardwareReservation' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Move a hardware reservation - tags: - - HardwareReservations - x-content-type: application/json - x-accepts: application/json - /incidents: - get: - description: Retrieve the number of incidents. - operationId: findIncidents - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve the number of incidents - tags: - - Incidents - x-accepts: application/json - /invitations: - get: - description: Returns all invitations in current user. - operationId: findInvitations - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvitationList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve current user invitations - tags: - - Users - x-accepts: application/json - /invitations/{id}: - delete: - description: Decline an invitation. - operationId: declineInvitation - parameters: - - description: Invitation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Decline an invitation - tags: - - Invitations - x-accepts: application/json - get: - description: Returns a single invitation. (It include the `invitable` to maintain - backward compatibility but will be removed soon) - operationId: findInvitationById - parameters: - - description: Invitation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Invitation' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: View an invitation - tags: - - Invitations - x-accepts: application/json - put: - description: Accept an invitation. - operationId: acceptInvitation - parameters: - - description: Invitation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Membership' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Accept an invitation - tags: - - Invitations - x-accepts: application/json - /invoices/{id}: - get: - description: Returns the invoice identified by the provided id - operationId: getInvoiceById - parameters: - - description: Invoice UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Invoice' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve an invoice - tags: - - Invoices - x-accepts: application/json - /ips/{id}: - delete: - description: | - This call can be used to un-assign an IP assignment or delete - an IP reservation. - - Un-assign an IP address record. - Use the assignment UUID you - get after attaching the IP. This will remove the relationship between an IP and the device or metal gateway and will make the IP address available to be assigned to another device, once the IP has been un-configured from the network. - - Delete an IP reservation. - Use the reservation UUID you get after adding the IP to the project. This will permanently delete the IP block reservation from the project. - operationId: deleteIPAddress - parameters: - - description: IP Address UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Unassign an ip address - tags: - - IPAddresses - x-accepts: application/json - get: - description: Returns a single ip address if the user has access. - operationId: findIPAddressById - parameters: - - description: IP Address UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/findIPAddressById_200_response' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve an ip address - tags: - - IPAddresses - x-accepts: application/json - patch: - description: Update details about an ip address - operationId: updateIPAddress - parameters: - - description: IP Address UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IPAssignmentUpdateInput' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/findIPAddressById_200_response' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Update an ip address - tags: - - IPAddresses - x-content-type: application/json - x-accepts: application/json - /ips/{id}/available: - get: - description: Provides a list of IP resevations for a single project. - operationId: findIPAvailabilities - parameters: - - description: IP Reservation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Size of subnets in bits - in: query - name: cidr - required: true - schema: - enum: - - "20" - - "21" - - "22" - - "23" - - "24" - - "25" - - "26" - - "27" - - "28" - - "29" - - "30" - - "31" - - "32" - - "33" - - "34" - - "35" - - "36" - - "37" - - "38" - - "39" - - "40" - - "41" - - "42" - - "43" - - "44" - - "45" - - "46" - - "47" - - "48" - - "49" - - "50" - - "51" - - "52" - - "53" - - "54" - - "55" - - "56" - - "57" - - "58" - - "59" - - "60" - - "61" - - "62" - - "63" - - "64" - - "65" - - "66" - - "67" - - "68" - - "69" - - "70" - - "71" - - "72" - - "73" - - "74" - - "75" - - "76" - - "77" - - "78" - - "79" - - "80" - - "81" - - "82" - - "83" - - "84" - - "85" - - "86" - - "87" - - "88" - - "89" - - "90" - - "91" - - "92" - - "93" - - "94" - - "95" - - "96" - - "97" - - "98" - - "99" - - "100" - - "101" - - "102" - - "103" - - "104" - - "105" - - "106" - - "107" - - "108" - - "109" - - "110" - - "111" - - "112" - - "113" - - "114" - - "115" - - "116" - - "117" - - "118" - - "119" - - "120" - - "121" - - "122" - - "123" - - "124" - - "125" - - "126" - - "127" - - "128" - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/IPAvailabilitiesList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all available subnets of a particular reservation - tags: - - IPAddresses - x-accepts: application/json - /ips/{id}/customdata: - get: - description: Provides the custom metadata stored for this IP Reservation or - IP Assignment in json format - operationId: findIPAddressCustomdata - parameters: - - description: Ip Reservation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve the custom metadata of an IP Reservation or IP Assignment - tags: - - IPAddresses - x-accepts: application/json - /licenses/{id}: - delete: - description: Deletes a license. - operationId: deleteLicense - parameters: - - description: License UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the license - tags: - - Licenses - x-accepts: application/json - get: - description: Returns a license - operationId: findLicenseById - parameters: - - description: License UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/License' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a license - tags: - - Licenses - x-accepts: application/json - put: - description: Updates the license. - operationId: updateLicense - parameters: - - description: License UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LicenseUpdateInput' - description: License to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/License' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the license - tags: - - Licenses - x-content-type: application/json - x-accepts: application/json - /locations/metros: - get: - description: Provides a listing of available metros - operationId: findMetros - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/MetroList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all metros - tags: - - Metros - x-accepts: application/json - /locations/metros/{id}: - get: - description: "Show the details for a metro, including name, code, and country." - operationId: getMetro - parameters: - - description: Metro UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Metro' - description: ok - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a specific Metro's details - tags: - - Metros - x-accepts: application/json - /market/spot/prices: - get: - description: Get Equinix Metal current spot market prices. - operationId: findSpotMarketPrices - parameters: - - description: Facility to check spot market prices - in: query - name: facility - schema: - type: string - - description: Plan to check spot market prices - in: query - name: plan - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SpotMarketPricesList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Get current spot market prices - tags: - - SpotMarket - x-accepts: application/json - /market/spot/prices/history: - get: - description: |- - Get spot market prices for a given plan and facility in a fixed period of time - - *Note: In the `200` response, the property `datapoints` contains arrays of `[float, integer]`.* - operationId: findSpotMarketPricesHistory - parameters: - - description: Facility to check spot market prices - in: query - name: facility - required: true - schema: - type: string - - description: Plan to check spot market prices - in: query - name: plan - required: true - schema: - type: string - - description: Metro to check spot market price history - in: query - name: metro - schema: - type: string - - description: Timestamp from range - in: query - name: from - required: true - schema: - type: string - - description: Timestamp to range - in: query - name: until - required: true - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SpotPricesHistoryReport' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Get spot market prices for a given period of time - tags: - - SpotMarket - x-accepts: application/json - /market/spot/prices/metros: - get: - description: Get Equinix Metal current spot market prices for all metros. - operationId: findMetroSpotMarketPrices - parameters: - - description: Metro to filter spot market prices - in: query - name: metro - schema: - type: string - - description: Plan to filter spot market prices - in: query - name: plan - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SpotMarketPricesPerMetroList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Get current spot market prices for metros - tags: - - SpotMarket - x-accepts: application/json - /memberships/{id}: - delete: - description: Deletes the membership. - operationId: deleteMembership - parameters: - - description: Membership UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the membership - tags: - - Memberships - x-accepts: application/json - get: - description: Returns a single membership. - operationId: findMembershipById - parameters: - - description: Membership UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Membership' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a membership - tags: - - Memberships - x-accepts: application/json - put: - description: Updates the membership. - operationId: updateMembership - parameters: - - description: Membership UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MembershipInput' - description: Membership to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Membership' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the membership - tags: - - Memberships - x-content-type: application/json - x-accepts: application/json - /metal-gateways/{id}: - delete: - description: Deletes a metal gateway and any elastic IP assignments associated - with this metal gateway. - operationId: deleteMetalGateway - parameters: - - description: Metal Gateway UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/findMetalGatewayById_200_response' - description: accepted - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Deletes the metal gateway - tags: - - MetalGateways - x-accepts: application/json - get: - description: Returns a specific metal gateway - operationId: findMetalGatewayById - parameters: - - description: Metal Gateway UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/findMetalGatewayById_200_response' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Returns the metal gateway - tags: - - MetalGateways - x-accepts: application/json - /metal-gateways/{id}/bgp-dynamic-neighbors: - get: - description: Returns the list of VRF BGP Dynamic Neighbors for this Metal Gateway - operationId: getBgpDynamicNeighbors - parameters: - - description: Metal Gateway UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpDynamicNeighborList' - description: OK - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - summary: List BGP Dynamic Neighbors - tags: - - VRFs - x-accepts: application/json - post: - description: | - Create a VRF BGP Dynamic Neighbor range. - - BGP Dynamic Neighbor records are limited to 2 per Virtual Network. - - Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - operationId: createBgpDynamicNeighbor - parameters: - - description: Metal Gateway UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BgpDynamicNeighborCreateInput' - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpDynamicNeighbor' - description: Created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable entity - summary: Create a VRF BGP Dynamic Neighbor range - tags: - - VRFs - x-content-type: application/json - x-accepts: application/json - /metal-gateways/{id}/ips: - get: - description: Returns the list of Elastic IPs assigned to this Metal Gateway - operationId: getMetalGatewayElasticIps - parameters: - - description: Metal Gateway UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/IPAssignmentList' - description: OK - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - summary: List Metal Gateway Elastic IPs - tags: - - MetalGateways - x-accepts: application/json - post: - description: | - Create a new Elastic IP on this Metal Gateway. - - Assign an IPv4 range as an elastic IP to the Metal Gateway, with a specified next-hop address contained within the Metal Gateway. - - Notice: Elastic IPs on Metal Gateways are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - operationId: createMetalGatewayElasticIp - parameters: - - description: Metal Gateway UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MetalGatewayElasticIpCreateInput' - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/IPAssignment' - description: Created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable entity - summary: Create a Metal Gateway Elastic IP - tags: - - MetalGateways - x-content-type: application/json - x-accepts: application/json - /operating-system-versions: - get: - description: Provides a listing of available operating system versions. - operationId: findOperatingSystemVersion - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OperatingSystemList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all operating system versions - tags: - - OperatingSystems - x-accepts: application/json - /operating-systems: - get: - description: Provides a listing of available operating systems to provision - your new device with. - operationId: findOperatingSystems - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OperatingSystemList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all operating systems - tags: - - OperatingSystems - x-accepts: application/json - /organizations: - get: - description: Returns a list of organizations that are accessible to the current - user. - operationId: findOrganizations - parameters: - - description: "Include, exclude or show only personal organizations." - in: query - name: personal - schema: - enum: - - include - - exclude - - only - type: string - - description: "Include, exclude or show only organizations that have no projects." - in: query - name: without_projects - schema: - enum: - - include - - exclude - - only - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OrganizationList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all organizations - tags: - - Organizations - x-accepts: application/json - post: - description: Creates an organization. - operationId: createOrganization - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OrganizationInput' - description: Organization to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Organization' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create an organization - tags: - - Organizations - x-content-type: application/json - x-accepts: application/json - /organizations/{id}: - delete: - description: Deletes the organization. - operationId: deleteOrganization - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the organization - tags: - - Organizations - x-accepts: application/json - get: - description: "Returns a single organization's details, if the user is authorized\ - \ to view it." - operationId: findOrganizationById - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Organization' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve an organization's details - tags: - - Organizations - x-accepts: application/json - put: - description: Updates the organization. - operationId: updateOrganization - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OrganizationInput' - description: Organization to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Organization' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the organization - tags: - - Organizations - x-content-type: application/json - x-accepts: application/json - /organizations/{id}/capacity: - get: - description: Returns a list of facilities and plans with their current capacity. - operationId: findOrganizationCapacityPerFacility - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - example: - capacity: - am6: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - da11: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - sv15: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - schema: - $ref: '#/components/schemas/CapacityList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - summary: View available hardware plans per Facility for given organization - tags: - - Capacity - x-accepts: application/json - /organizations/{id}/capacity/metros: - get: - description: Returns a list of metros and plans with their current capacity. - operationId: findOrganizationCapacityPerMetro - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - example: - capacity: - am: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - da: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - dc: - c2.medium.x86: - level: string - m2.xlarge.x86: - level: string - schema: - $ref: '#/components/schemas/CapacityList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - summary: View available hardware plans per Metro for given organization - tags: - - Capacity - x-accepts: application/json - /organizations/{id}/customdata: - get: - description: Provides the custom metadata stored for this organization in json - format - operationId: findOrganizationCustomdata - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve the custom metadata of an organization - tags: - - Organizations - x-accepts: application/json - /organizations/{id}/devices: - get: - description: Provides a collection of devices for a given organization. - operationId: findOrganizationDevices - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: "Search by hostname, description, short_id, reservation short_id,\ - \ tags, plan name, plan slug, facility code, facility name, operating system\ - \ name, operating system slug, IP addresses." - in: query - name: search - schema: - type: string - - description: Filter by plan category - in: query - name: categories - schema: - items: - enum: - - compute - - storage - - vmce - example: compute - type: string - type: array - - description: Filter by device facility - in: query - name: facility - schema: - type: string - - description: Filter by partial hostname - in: query - name: hostname - schema: - type: string - - description: "Filter only reserved instances. When set to true, only include\ - \ reserved instances. When set to false, only include on-demand instances." - in: query - name: reserved - schema: - type: boolean - - description: Filter by device tag - in: query - name: tag - schema: - type: string - - description: "Filter by instance type (ondemand,spot,reserved)" - in: query - name: type - schema: - type: string - - description: "Filter only instances marked for termination. When set to true,\ - \ only include instances that have a termination time. When set to false,\ - \ only include instances that do not have a termination time." - in: query - name: has_termination_time - schema: - type: boolean - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all devices of an organization - tags: - - Devices - x-accepts: application/json - /organizations/{id}/events: - get: - description: Returns a list of events for a single organization - operationId: findOrganizationEvents - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/EventList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve organization's events - tags: - - Events - x-accepts: application/json - /organizations/{id}/facilities: - get: - deprecated: true - description: Returns a listing of available datacenters for the given organization - operationId: findFacilitiesByOrganization - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FacilityList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all facilities visible by the organization - tags: - - Facilities - x-accepts: application/json - /organizations/{id}/firmware-sets: - get: - description: Returns all firmware sets associated with the organization. - operationId: getOrganizationFirmwareSets - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: page number to return - in: query - name: page - schema: - type: integer - - description: items returned per page. - in: query - name: per_page - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FirmwareSetListResponse' - description: Successful operation - "401": - description: Error responses are included with 4xx and 5xx HTTP responses - from the API service. Either "error" or "errors" will be set. - "404": - description: Error responses are included with 4xx and 5xx HTTP responses - from the API service. Either "error" or "errors" will be set. - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Internal Server Error - summary: Get Organization's Firmware Sets - tags: - - Firmware Sets - x-accepts: application/json - /organizations/{id}/invitations: - get: - description: Returns all invitations in an organization. - operationId: findOrganizationInvitations - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvitationList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve organization invitations - tags: - - Organizations - x-accepts: application/json - post: - description: |- - In order to add a user to an organization, they must first be invited. - To invite to several projects the parameter `projects_ids:[a,b,c]` can be used - operationId: createOrganizationInvitation - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - $ref: '#/components/requestBodies/InvitationInput' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Invitation' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create an invitation for an organization - tags: - - Organizations - x-content-type: application/json - x-accepts: application/json - /organizations/{id}/invoices: - get: - description: Returns all invoices for an organization - operationId: findOrganizationInvoices - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: page number - in: query - name: page - schema: - type: integer - - description: per page - in: query - name: per_page - schema: - type: integer - - description: filter by status - in: query - name: status - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvoiceList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all invoices for an organization - tags: - - Invoices - x-accepts: application/json - /organizations/{id}/operating-systems: - get: - description: Returns a listing of available operating systems for the given - organization - operationId: findOperatingSystemsByOrganization - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OperatingSystemList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all operating systems visible by the organization - tags: - - Organizations - x-accepts: application/json - /organizations/{id}/payment-methods: - get: - description: Returns all payment methods of an organization. - operationId: findOrganizationPaymentMethods - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentMethodList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all payment methods of an organization - tags: - - Organizations - x-accepts: application/json - post: - description: Creates a payment method. - operationId: createPaymentMethod - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentMethodCreateInput' - description: Payment Method to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentMethod' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a payment method for the given organization - tags: - - Organizations - x-content-type: application/json - x-accepts: application/json - /organizations/{id}/plans: - get: - description: Returns a listing of available plans for the given organization - operationId: findPlansByOrganization - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PlanList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all plans visible by the organization - tags: - - Organizations - x-accepts: application/json - /organizations/{id}/projects: - get: - description: Returns a collection of projects that belong to the organization. - operationId: findOrganizationProjects - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Filter results by name. - in: query - name: name - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all projects of an organization - tags: - - Organizations - x-accepts: application/json - post: - description: Creates a new project for the organization - operationId: createOrganizationProject - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectCreateInput' - description: Project to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a project for the organization - tags: - - Organizations - x-content-type: application/json - x-accepts: application/json - /organizations/{id}/transfers: - get: - description: Provides a collection of project transfer requests from or to the - organization. - operationId: findOrganizationTransfers - parameters: - - description: Organization UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TransferRequestList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - summary: Retrieve all project transfer requests from or to an organization - tags: - - Organizations - x-accepts: application/json - /organizations/{organization_id}/connections: - get: - description: List the connections belonging to the organization - operationId: organizationListInterconnections - parameters: - - description: UUID of the organization - in: path - name: organization_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InterconnectionList' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: List organization connections - tags: - - Interconnections - x-accepts: application/json - post: - description: Creates a new interconnection request. A Project ID must be specified - in the request body for connections on shared ports. - operationId: createOrganizationInterconnection - parameters: - - description: UUID of the organization - in: path - name: organization_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - $ref: '#/components/requestBodies/InterconnectionCreateInput' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Interconnection' - description: created - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Request a new interconnection for the organization - tags: - - Interconnections - x-content-type: application/json - x-accepts: application/json - /payment-methods/{id}: - delete: - description: Deletes the payment method. - operationId: deletePaymentMethod - parameters: - - description: Payment Method UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the payment method - tags: - - PaymentMethods - x-accepts: application/json - get: - description: Returns a payment method - operationId: findPaymentMethodById - parameters: - - description: Payment Method UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentMethod' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a payment method - tags: - - PaymentMethods - x-accepts: application/json - put: - description: Updates the payment method. - operationId: updatePaymentMethod - parameters: - - description: Payment Method UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentMethodUpdateInput' - description: Payment Method to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PaymentMethod' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the payment method - tags: - - PaymentMethods - x-content-type: application/json - x-accepts: application/json - /plans: - get: - description: Provides a listing of available plans to provision your device - on. - operationId: findPlans - parameters: - - description: Filter plans by its category - in: query - name: categories - schema: - items: - enum: - - compute - - storage - - vmce - example: compute - type: string - type: array - - description: Filter plans by its plan type - in: query - name: type - schema: - enum: - - standard - - workload_optimized - - custom - example: standard - type: string - - description: Filter plans by slug - in: query - name: slug - schema: - example: c3.small.x86 - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PlanList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all plans - tags: - - Plans - x-accepts: application/json - /ports/{id}: - get: - description: Returns a port - operationId: findPortById - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a port - tags: - - Ports - x-accepts: application/json - /ports/{id}/assign: - post: - description: Assign a hardware port to a virtual network. - operationId: assignPort - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - $ref: '#/components/requestBodies/PortAssignInput' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Assign a port to virtual network - tags: - - Ports - x-content-type: application/json - x-accepts: application/json - /ports/{id}/bond: - post: - description: Enabling bonding for one or all ports - operationId: bondPort - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: enable both ports - in: query - name: bulk_enable - schema: - type: boolean - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Enabling bonding - tags: - - Ports - x-accepts: application/json - /ports/{id}/convert/layer-2: - post: - description: Converts a bond port to Layer 2. IP assignments of the port will - be removed. - operationId: convertLayer2 - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - $ref: '#/components/requestBodies/PortAssignInput' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Convert to Layer 2 - tags: - - Ports - x-content-type: application/json - x-accepts: application/json - /ports/{id}/convert/layer-3: - post: - description: Converts a bond port to Layer 3. VLANs must first be unassigned. - operationId: convertLayer3 - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PortConvertLayer3Input' - description: IPs to request - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Convert to Layer 3 - tags: - - Ports - x-content-type: application/json - x-accepts: application/json - /ports/{id}/disbond: - post: - description: Disabling bonding for one or all ports - operationId: disbondPort - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: disable both ports - in: query - name: bulk_disable - schema: - type: boolean - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Disabling bonding - tags: - - Ports - x-accepts: application/json - /ports/{id}/native-vlan: - delete: - description: Removes the native VLAN from this port - operationId: deleteNativeVlan - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Remove native VLAN - tags: - - Ports - x-accepts: application/json - post: - description: Sets a virtual network on this port as a "native VLAN". The VLAN - must have already been assigned using the using the "Assign a port to a virtual - network" operation. - operationId: assignNativeVlan - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: "Virtual Network ID. May be the UUID of the Virtual Network record,\ - \ or the VLAN value itself (ex: '1001')." - in: query - name: vnid - required: true - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Assign a native VLAN - tags: - - Ports - x-accepts: application/json - /ports/{id}/unassign: - post: - description: Unassign a port for a hardware. - operationId: unassignPort - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - $ref: '#/components/requestBodies/PortAssignInput' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Port' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Unassign a port - tags: - - Ports - x-content-type: application/json - x-accepts: application/json - /ports/{id}/vlan-assignments: - get: - description: "Show the port's current VLAN assignments, including if this VLAN\ - \ is set as native, and the current state of the assignment (ex. 'assigned'\ - \ or 'unassigning')" - operationId: findPortVlanAssignments - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Nested attributes to include. Included objects will return their - full attributes. Attribute names can be dotted (up to 3 levels) to included - deeply nested objects. - in: query - name: include - schema: - default: - - port - - virtual_network - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PortVlanAssignmentList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: List Current VLAN assignments for a port - tags: - - Ports - x-accepts: application/json - /ports/{id}/vlan-assignments/{assignment_id}: - get: - description: "Show the details of a specific Port-VLAN assignment, including\ - \ the current state and if the VLAN is set as native." - operationId: findPortVlanAssignmentByPortIdAndAssignmentId - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Assignment ID - in: path - name: assignment_id - required: true - schema: - format: uuid - type: string - - description: Nested attributes to include. Included objects will return their - full attributes. Attribute names can be dotted (up to 3 levels) to included - deeply nested objects. - in: query - name: include - schema: - default: - - port - - virtual_network - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PortVlanAssignment' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Show a particular Port VLAN assignment's details - tags: - - Ports - x-accepts: application/json - /ports/{id}/vlan-assignments/batches: - get: - description: Show all the VLAN assignment batches that have been created for - managing this port's VLAN assignments - operationId: findPortVlanAssignmentBatches - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PortVlanAssignmentBatchList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: List the VLAN Assignment Batches for a port - tags: - - Ports - x-accepts: application/json - post: - description: Create a new asynchronous batch request which handles adding and/or - removing the VLANs to which the port is assigned. - operationId: createPortVlanAssignmentBatch - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PortVlanAssignmentBatchCreateInput' - description: VLAN Assignment batch details - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/PortVlanAssignmentBatch' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a new Port-VLAN Assignment management batch - tags: - - Ports - x-content-type: application/json - x-accepts: application/json - /ports/{id}/vlan-assignments/batches/{batch_id}: - get: - description: "Returns the details of an existing Port-VLAN Assignment batch,\ - \ including the list of VLANs to assign or unassign, and the current state\ - \ of the batch." - operationId: findPortVlanAssignmentBatchByPortIdAndBatchId - parameters: - - description: Port UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Batch ID - in: path - name: batch_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PortVlanAssignmentBatch' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a VLAN Assignment Batch's details - tags: - - Ports - x-accepts: application/json - /projects: - get: - description: Returns a collection of projects that the current user is a member - of. - operationId: findProjects - parameters: - - description: Filter results by name. - in: query - name: name - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all projects - tags: - - Projects - x-accepts: application/json - post: - description: "Creates a new project for the user default organization. If the\ - \ user don't have an organization, a new one will be created." - operationId: createProject - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectCreateFromRootInput' - description: Project to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a project - tags: - - Projects - x-content-type: application/json - x-accepts: application/json - /projects/{id}: - delete: - description: Deletes the project. - operationId: deleteProject - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the project - tags: - - Projects - x-accepts: application/json - get: - description: Returns a single project if the user has access - operationId: findProjectById - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a project - tags: - - Projects - x-accepts: application/json - put: - description: Updates the project. - operationId: updateProject - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectUpdateInput' - description: Project to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the project - tags: - - Projects - x-content-type: application/json - x-accepts: application/json - /projects/{id}/api-keys: - get: - description: Returns all API keys for a specific project. - operationId: findProjectAPIKeys - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AuthTokenList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all API keys for the project. - tags: - - Authentication - x-accepts: application/json - post: - description: Creates an API key for a project. - operationId: createProjectAPIKey - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AuthTokenInput' - description: API Key to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/AuthToken' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create an API key for a project. - tags: - - Authentication - x-content-type: application/json - x-accepts: application/json - /projects/{id}/batches: - get: - description: Returns all batches for the given project - operationId: findBatchesByProject - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BatchesList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all batches by project - tags: - - Batches - x-accepts: application/json - /projects/{id}/bgp-config: - get: - description: Returns a bgp config - operationId: findBgpConfigByProject - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpConfig' - description: | - ok - - When BGP configuration is not enabled empty structure is returned. - When BGP configuration is disabled after being enabled BGP configuration data is returned with status disabled. - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: | - not found - - The project was not found. - summary: Retrieve a bgp config - tags: - - BGP - x-accepts: application/json - /projects/{id}/bgp-configs: - post: - description: Requests to enable bgp configuration for a project. - operationId: requestBgpConfig - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BgpConfigRequestInput' - description: BGP config Request to create - required: true - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Requesting bgp config - tags: - - BGP - x-content-type: application/json - x-accepts: application/json - /projects/{id}/bgp/sessions: - get: - description: Provides a listing of available BGP sessions for the project. - operationId: findProjectBgpSessions - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/BgpSessionList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all BGP sessions for project - tags: - - BGP - x-accepts: application/json - /projects/{id}/customdata: - get: - description: Provides the custom metadata stored for this project in json format - operationId: findProjectCustomdata - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve the custom metadata of a project - tags: - - Projects - x-accepts: application/json - /projects/{id}/devices: - get: - description: Provides a collection of devices for a given project. - operationId: findProjectDevices - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: "Search by hostname, description, short_id, reservation short_id,\ - \ tags, plan name, plan slug, facility code, facility name, operating system\ - \ name, operating system slug, IP addresses." - in: query - name: search - schema: - type: string - - description: Filter by plan category - in: query - name: categories - schema: - items: - enum: - - compute - - storage - - vmce - example: compute - type: string - type: array - - description: Filter by device facility - in: query - name: facility - schema: - type: string - - description: Filter by device metro - in: query - name: metro - schema: - type: string - - description: Filter by partial hostname - in: query - name: hostname - schema: - type: string - - description: "Filter only reserved instances. When set to true, only include\ - \ reserved instances. When set to false, only include on-demand instances." - in: query - name: reserved - schema: - type: boolean - - description: Filter by device tag - in: query - name: tag - schema: - type: string - - description: "Filter by instance type (ondemand,spot,reserved)" - in: query - name: type - schema: - type: string - - description: "Filter only instances marked for termination. When set to true,\ - \ only include instances that have a termination time. When set to false,\ - \ only include instances that do not have a termination time." - in: query - name: has_termination_time - schema: - type: boolean - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all devices of a project - tags: - - Devices - x-accepts: application/json - post: - description: |- - Creates a new device and provisions it in the specified location. - - Device type-specific options are accepted. For example, `baremetal` devices accept `operating_system`, `hostname`, and `plan`. These parameters may not be accepted for other device types. The default device type is `baremetal`. - operationId: createDevice - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/createDevice_request' - description: Device to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a device - tags: - - Devices - x-content-type: application/json - x-accepts: application/json - /projects/{id}/devices/batch: - post: - description: Creates new devices in batch and provisions them in our datacenter. - operationId: createDeviceBatch - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/InstancesBatchCreateInput' - description: Batches to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/BatchesList' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a devices batch - tags: - - Batches - x-content-type: application/json - x-accepts: application/json - /projects/{id}/events: - get: - description: Returns a list of events for a single project - operationId: findProjectEvents - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/EventList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve project's events - tags: - - Events - x-accepts: application/json - /projects/{id}/facilities: - get: - deprecated: true - description: Returns a listing of available datacenters for the given project - operationId: findFacilitiesByProject - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FacilityList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all facilities visible by the project - tags: - - Facilities - x-accepts: application/json - /projects/{id}/firmware-sets: - get: - description: Returns all firmware sets associated with the project or organization. - operationId: getProjectFirmwareSets - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: page number to return - in: query - name: page - schema: - type: integer - - description: items returned per page. - in: query - name: per_page - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/FirmwareSetListResponse' - description: Successful operation - "401": - description: Error responses are included with 4xx and 5xx HTTP responses - from the API service. Either "error" or "errors" will be set. - "404": - description: Error responses are included with 4xx and 5xx HTTP responses - from the API service. Either "error" or "errors" will be set. - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Internal Server Error - summary: Get Project's Firmware Sets - tags: - - Firmware Sets - x-accepts: application/json - /projects/{id}/global-bgp-ranges: - get: - description: Returns all global bgp ranges for a project - operationId: findGlobalBgpRanges - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GlobalBgpRangeList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all global bgp ranges - tags: - - BGP - x-accepts: application/json - /projects/{id}/hardware-reservations: - get: - description: Provides a collection of hardware reservations for a given project. - operationId: findProjectHardwareReservations - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: "Search by facility code, plan name, project name, reservation\ - \ short ID or device hostname" - in: query - name: query - schema: - type: string - - description: Filter by hardware reservation state - in: query - name: state - schema: - enum: - - active - - spare - - need_of_service - type: string - - description: Filter hardware reservation that is provisionable - in: query - name: provisionable - schema: - enum: - - only - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HardwareReservationList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all hardware reservations for a given project - tags: - - HardwareReservations - x-accepts: application/json - /projects/{id}/ips: - get: - description: Provides a paginated list of IP reservations for a single project. - operationId: findIPReservations - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Filter project IP reservations by reservation type - in: query - name: types - schema: - items: - enum: - - global_ipv4 - - private_ipv4 - - public_ipv4 - - public_ipv6 - - vrf - type: string - type: array - style: form - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Items returned per page - in: query - name: per_page - schema: - default: 250 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/IPReservationList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all ip reservations - tags: - - IPAddresses - x-accepts: application/json - post: - description: "Request more IP space for a project in order to have additional\ - \ IP addresses to assign to devices. If the request is within the max quota,\ - \ an IP reservation will be created. If the project will exceed its IP quota,\ - \ a request will be submitted for review, and will return an IP Reservation\ - \ with a `state` of `pending`. You can automatically have the request fail\ - \ with HTTP status 422 instead of triggering the review process by providing\ - \ the `fail_on_approval_required` parameter set to `true` in the request." - operationId: requestIPReservation - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/requestIPReservation_request' - description: IP Reservation Request to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/requestIPReservation_201_response' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Requesting IP reservations - tags: - - IPAddresses - x-content-type: application/json - x-accepts: application/json - /projects/{id}/licenses: - get: - description: Provides a collection of licenses for a given project. - operationId: findProjectLicenses - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/LicenseList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all licenses - tags: - - Licenses - x-accepts: application/json - post: - description: Creates a new license for the given project - operationId: createLicense - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LicenseCreateInput' - description: License to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/License' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a License - tags: - - Licenses - x-content-type: application/json - x-accepts: application/json - /projects/{id}/plans: - get: - description: Returns a listing of available plans for the given project - operationId: findPlansByProject - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PlanList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all plans visible by the project - tags: - - Plans - x-accepts: application/json - /projects/{id}/spot-market-requests: - get: - description: View all spot market requests for a given project. - operationId: listSpotMarketRequests - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SpotMarketRequestList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: List spot market requests - tags: - - SpotMarket - x-accepts: application/json - post: - description: |- - Creates a new spot market request. - - Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan. - - The features attribute allows you to optionally specify what features your server should have. For example, if you require a server with a TPM chip, you may specify `{ "features": { "tpm": "required" } }` (or `{ "features": ["tpm"] }` in shorthand). - - The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below). - - The request will not fail if we have no servers with that feature in our inventory. - operationId: createSpotMarketRequest - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SpotMarketRequestCreateInput' - description: Spot Market Request to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/SpotMarketRequest' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a spot market request - tags: - - SpotMarket - x-content-type: application/json - x-accepts: application/json - /projects/{id}/ssh-keys: - get: - description: Returns a collection of the project's ssh keys. - operationId: findProjectSSHKeys - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: "Search by key, label, or fingerprint" - in: query - name: query - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKeyList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve a project's ssh keys - tags: - - SSHKeys - x-accepts: application/json - post: - description: Creates a ssh key. - operationId: createProjectSSHKey - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKeyCreateInput' - description: ssh key to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKey' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a ssh key for the given project - tags: - - SSHKeys - x-content-type: application/json - x-accepts: application/json - /projects/{id}/transfers: - post: - deprecated: true - description: Organization owners can transfer their projects to other organizations. - operationId: createTransferRequest - parameters: - - description: UUID of the project to be transferred - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferRequestInput' - description: Transfer Request to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/TransferRequest' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a transfer request - tags: - - Projects - x-content-type: application/json - x-accepts: application/json - /projects/{id}/usages: - get: - description: Returns all usages for a project. - operationId: findProjectUsage - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Filter usages created after this date - in: query - name: "created[after]" - schema: - format: datetime - type: string - - description: Filter usages created before this date - in: query - name: "created[before]" - schema: - format: datetime - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectUsageList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all usages for project - tags: - - Usages - x-accepts: application/json - /projects/{id}/virtual-networks: - get: - description: Provides a list of virtual networks for a single project. - operationId: findVirtualNetworks - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - deprecated: true - description: Filter by Facility ID (uuid) or Facility Code - in: query - name: facility - schema: - type: string - - description: Filter by Metro ID (uuid) or Metro Code - in: query - name: metro - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualNetworkList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all virtual networks - tags: - - VLANs - x-accepts: application/json - post: - description: Creates an virtual network. - operationId: createVirtualNetwork - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualNetworkCreateInput' - description: Virtual Network to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualNetwork' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a virtual network - tags: - - VLANs - x-content-type: application/json - x-accepts: application/json - /projects/{id}/vrfs: - get: - description: Returns the list of VRFs for a single project. - operationId: findVrfs - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Filter by Metro ID (uuid) or Metro Code - in: query - name: metro - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VrfList' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all VRFs in the project - tags: - - VRFs - x-accepts: application/json - post: - description: Creates a new VRF in the specified project - operationId: createVrf - parameters: - - description: Project UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VrfCreateInput' - description: VRF to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Vrf' - description: created - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a new VRF in the specified project - tags: - - VRFs - x-content-type: application/json - x-accepts: application/json - /projects/{project_id}/connections: - get: - description: List the connections belonging to the project - operationId: projectListInterconnections - parameters: - - description: UUID of the project - in: path - name: project_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InterconnectionList' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: List project connections - tags: - - Interconnections - x-accepts: application/json - post: - description: Creates a new interconnection request - operationId: createProjectInterconnection - parameters: - - description: UUID of the project - in: path - name: project_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - $ref: '#/components/requestBodies/InterconnectionCreateInput' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Interconnection' - description: created - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Request a new interconnection for the project's organization - tags: - - Interconnections - x-content-type: application/json - x-accepts: application/json - /projects/{project_id}/invitations: - get: - description: Returns all invitations in a project. - operationId: findProjectInvitations - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/InvitationList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve project invitations - tags: - - Projects - x-accepts: application/json - post: - description: "In order to add a user to a project, they must first be invited." - operationId: createProjectInvitation - parameters: - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - $ref: '#/components/requestBodies/InvitationInput' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Invitation' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create an invitation for a project - tags: - - Projects - x-content-type: application/json - x-accepts: application/json - /projects/{project_id}/ips/{id}/customdata: - get: - description: Provides the custom metadata stored for this IP Reservation in - json format - operationId: findIPReservationCustomdata - parameters: - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - - description: Ip Reservation UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve the custom metadata of an IP Reservation - tags: - - Projects - x-accepts: application/json - /projects/{project_id}/memberships: - get: - description: Returns all memberships in a project. - operationId: findProjectMemberships - parameters: - - description: "Search by member full name, id and email." - in: query - name: search - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/MembershipList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve project memberships - tags: - - Projects - x-accepts: application/json - /projects/{project_id}/metal-gateways: - get: - description: Return all metal gateways for a project - operationId: findMetalGatewaysByProject - parameters: - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/MetalGatewayList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Returns all metal gateways for a project - tags: - - MetalGateways - x-accepts: application/json - post: - description: Create a metal gateway in a project - operationId: createMetalGateway - parameters: - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/createMetalGateway_request' - description: Metal Gateway to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/findMetalGatewayById_200_response' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a metal gateway - tags: - - MetalGateways - x-content-type: application/json - x-accepts: application/json - /projects/{project_id}/self-service/reservations: - get: - description: Returns all reservations. - operationId: findSelfServiceReservations - parameters: - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - - description: Filter reservations by items category - in: query - name: categories - schema: - items: - enum: - - compute - - storage - - vmce - example: compute - type: string - type: array - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SelfServiceReservationList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all reservations - tags: - - SelfServiceReservations - x-accepts: application/json - post: - description: Creates a reservation. - operationId: createSelfServiceReservation - parameters: - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateSelfServiceReservationRequest' - description: reservation to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/SelfServiceReservationResponse' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a reservation - tags: - - SelfServiceReservations - x-content-type: application/json - x-accepts: application/json - /projects/{project_id}/self-service/reservations/{id}: - get: - description: Returns a reservation - operationId: findSelfServiceReservation - parameters: - - description: Reservation short_id - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Project UUID - in: path - name: project_id - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SelfServiceReservationResponse' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a reservation - tags: - - SelfServiceReservations - x-accepts: application/json - /reset-password: - delete: - description: Resets current user password. - operationId: resetPassword - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/NewPassword' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Reset current user password - tags: - - PasswordResetTokens - x-accepts: application/json - post: - description: Creates a password reset token - operationId: createPasswordResetToken - parameters: - - description: Email of user to create password reset token - in: query - name: email - required: true - schema: - type: string - responses: - "201": - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a password reset token - tags: - - PasswordResetTokens - x-accepts: application/json - /routes/{id}: - delete: - description: "Trigger the deletion of a VRF Route resource. The status of the\ - \ route will update to 'deleting', and the route resource will remain accessible\ - \ while background operations remove the route from the network. Once the\ - \ route has been removed from the network, the resource will be fully deleted." - operationId: deleteVrfRouteById - parameters: - - description: VRF Route UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/VrfRoute' - description: Accepted - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - summary: Delete a VRF Route - tags: - - VRFs - x-accepts: application/json - get: - description: Returns a single VRF Route resource - operationId: findVrfRouteById - parameters: - - description: VRF Route UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VrfRoute' - description: OK - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - summary: Retrieve a VRF Route - tags: - - VRFs - x-accepts: application/json - put: - description: Requests a VRF Route be redeployed across the network. Updating - the prefix or next-hop address on a route is not currently supported. - operationId: updateVrfRouteById - parameters: - - description: VRF Route UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VrfRouteUpdateInput' - required: true - responses: - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/VrfRoute' - description: Accepted - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable Entity - "429": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Too Many Requests - summary: Update a VRF Route - tags: - - VRFs - x-content-type: application/json - x-accepts: application/json - /routes/{id}/events: - get: - description: Returns a list of the VRF route events - operationId: findVrfRouteEvents - parameters: - - description: VRF Route UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Event' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve VRF route events - tags: - - Events - x-accepts: application/json - /spot-market-requests/{id}: - delete: - description: Deletes the spot market request. - operationId: deleteSpotMarketRequest - parameters: - - description: SpotMarketRequest UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Terminate associated spot instances - in: query - name: force_termination - schema: - type: boolean - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the spot market request - tags: - - SpotMarket - x-accepts: application/json - get: - description: Returns a single spot market request - operationId: findSpotMarketRequestById - parameters: - - description: SpotMarketRequest UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SpotMarketRequest' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a spot market request - tags: - - SpotMarket - x-accepts: application/json - /ssh-keys: - get: - description: Returns a collection of the user’s ssh keys. - operationId: findSSHKeys - parameters: - - description: "Search by key, label, or fingerprint" - in: query - name: search - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKeyList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all ssh keys - tags: - - SSHKeys - x-accepts: application/json - post: - description: Creates a ssh key. - operationId: createSSHKey - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - $ref: '#/components/requestBodies/SSHKeyCreateInput' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKey' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a ssh key for the current user - tags: - - SSHKeys - x-content-type: application/json - x-accepts: application/json - /ssh-keys/{id}: - delete: - description: Deletes the ssh key. - operationId: deleteSSHKey - parameters: - - description: ssh key UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the ssh key - tags: - - SSHKeys - x-accepts: application/json - get: - description: Returns a single ssh key if the user has access - operationId: findSSHKeyById - parameters: - - description: SSH Key UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKey' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a ssh key - tags: - - SSHKeys - x-accepts: application/json - put: - description: Updates the ssh key. - operationId: updateSSHKey - parameters: - - description: SSH Key UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKeyInput' - description: ssh key to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKey' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the ssh key - tags: - - SSHKeys - x-content-type: application/json - x-accepts: application/json - /support-requests: - post: - description: Support Ticket. - operationId: requestSuppert - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SupportRequestInput' - description: Support Request to create - required: true - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a support ticket - tags: - - SupportRequest - x-content-type: application/json - x-accepts: application/json - /transfers/{id}: - delete: - description: Decline a transfer request. - operationId: declineTransferRequest - parameters: - - description: Transfer request UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Decline a transfer request - tags: - - TransferRequests - x-accepts: application/json - get: - description: Returns a single transfer request. - operationId: findTransferRequestById - parameters: - - description: Transfer request UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TransferRequest' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: View a transfer request - tags: - - TransferRequests - x-accepts: application/json - put: - description: Accept a transfer request. - operationId: acceptTransferRequest - parameters: - - description: Transfer request UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Accept a transfer request - tags: - - TransferRequests - x-accepts: application/json - /user: - get: - description: Returns the user object for the currently logged-in user. - operationId: findCurrentUser - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve the current user - tags: - - Users - x-accepts: application/json - put: - description: Updates the currently logged-in user. - operationId: updateCurrentUser - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UserUpdateInput' - description: User to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the current user - tags: - - Users - x-content-type: application/json - x-accepts: application/json - /user/api-keys: - get: - description: Returns all API keys for the current user. - operationId: findAPIKeys - parameters: - - description: Search by description - in: query - name: search - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AuthTokenList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all user API keys - tags: - - Authentication - x-accepts: application/json - post: - description: Creates a API key for the current user. - operationId: createAPIKey - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AuthTokenInput' - description: API key to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/AuthToken' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create an API key - tags: - - Authentication - x-content-type: application/json - x-accepts: application/json - /user/api-keys/{id}: - delete: - description: Deletes the current user API key. - operationId: deleteUserAPIKey - parameters: - - description: API Key UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the API key - tags: - - Authentication - x-accepts: application/json - /user/otp/app: - delete: - description: Disables two factor authentication. - operationId: disableTfaApp - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Disable two factor authentication - tags: - - TwoFactorAuth - x-accepts: application/json - post: - description: Enables two factor authentication using authenticator app. - operationId: enableTfaApp - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Enable two factor auth using app - tags: - - TwoFactorAuth - x-accepts: application/json - /user/otp/recovery-codes: - get: - description: Returns my recovery codes. - operationId: findRecoveryCodes - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RecoveryCodeList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Retrieve my recovery codes - tags: - - OTPs - x-accepts: application/json - post: - description: Generate a new set of recovery codes. - operationId: regenerateCodes - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RecoveryCodeList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Generate new recovery codes - tags: - - OTPs - x-accepts: application/json - /user/otp/sms: - delete: - description: Disables two factor authentication. - operationId: disableTfaSms - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Disable two factor authentication - tags: - - TwoFactorAuth - x-accepts: application/json - post: - description: Enables two factor authentication with sms. - operationId: enableTfaSms - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Enable two factor auth using sms - tags: - - TwoFactorAuth - x-accepts: application/json - /user/otp/sms/receive: - post: - description: Sends an OTP to the user's mobile phone. - operationId: receiveCodes - responses: - "204": - description: no content - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: bad request - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: internal server error - summary: Receive an OTP per sms - tags: - - OTPs - x-accepts: application/json - /user/otp/verify/{otp}: - post: - description: "It verifies the user once a valid OTP is provided. It gives back\ - \ a session token, essentially logging in the user." - operationId: findEnsureOtp - parameters: - - description: OTP - in: path - name: otp - required: true - schema: - type: string - responses: - "204": - description: no content - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: bad request - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Verify user by providing an OTP - tags: - - OTPs - x-accepts: application/json - /userdata/validate: - post: - description: Validates user data (Userdata) - operationId: validateUserdata - parameters: - - description: Userdata to validate - in: query - name: userdata - schema: - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Validate user data - tags: - - Userdata - x-accepts: application/json - /users: - get: - description: "Returns a list of users that the are accessible to the current\ - \ user (all users in the current user’s projects, essentially)." - operationId: findUsers - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/UserList' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - summary: Retrieve all users - tags: - - Users - x-accepts: application/json - post: - description: Creates a user. - operationId: createUser - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UserCreateInput' - description: User to create - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - example: - errors: - - Email address username@example.com has already been taken - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create a user - tags: - - Users - x-content-type: application/json - x-accepts: application/json - /users/{id}: - get: - description: Returns a single user if the user has access - operationId: findUserById - parameters: - - description: User UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a user - tags: - - Users - x-accepts: application/json - /users/{id}/customdata: - get: - description: Provides the custom metadata stored for this user in json format - operationId: findUserCustomdata - parameters: - - description: User UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve the custom metadata of a user - tags: - - Users - x-accepts: application/json - /verify-email: - post: - description: Creates an email verification request - operationId: createValidationRequest - parameters: - - description: Email for verification request - in: query - name: login - required: true - schema: - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - responses: - "201": - description: created - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Create an email verification request - tags: - - UserVerificationTokens - x-accepts: application/json - put: - description: Consumes an email verification token and verifies the user associated - with it. - operationId: consumeVerificationRequest - parameters: - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VerifyEmail' - description: Email to create - required: true - responses: - "200": - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Verify a user using an email verification token - tags: - - UserVerificationTokens - x-content-type: application/json - x-accepts: application/json - /virtual-circuits/{id}/events: - get: - description: Returns a list of the virtual circuit events - operationId: findVirtualCircuitEvents - parameters: - - description: Virtual Circuit UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Event' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve virtual circuit events - tags: - - Events - x-accepts: application/json - /virtual-circuits/{id}: - delete: - description: Delete a virtual circuit from a Dedicated Port. - operationId: deleteVirtualCircuit - parameters: - - description: Virtual Circuit UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuit' - description: accepted - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete a virtual circuit - tags: - - Interconnections - x-accepts: application/json - get: - description: Get the details of a virtual circuit - operationId: getVirtualCircuit - parameters: - - description: Virtual Circuit UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuit' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Get a virtual circuit - tags: - - Interconnections - x-accepts: application/json - put: - description: Update the details of a virtual circuit. - operationId: updateVirtualCircuit - parameters: - - description: Virtual Circuit UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuitUpdateInput' - description: Updated Virtual Circuit details - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuit' - description: ok - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualCircuit' - description: accepted - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Update a virtual circuit - tags: - - Interconnections - x-content-type: application/json - x-accepts: application/json - /virtual-networks/{id}: - delete: - description: Deletes a virtual network. - operationId: deleteVirtualNetwork - parameters: - - description: Virtual Network UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualNetwork' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Delete a virtual network - tags: - - VLANs - x-accepts: application/json - get: - description: Get a virtual network. - operationId: getVirtualNetwork - parameters: - - description: Virtual Network UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VirtualNetwork' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Get a virtual network - tags: - - VLANs - x-accepts: application/json - /vrfs/{id}: - delete: - description: Deletes the VRF - operationId: deleteVrf - parameters: - - description: VRF UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - responses: - "204": - description: no content - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Delete the VRF - tags: - - VRFs - x-accepts: application/json - get: - description: Returns a single VRF resource - operationId: findVrfById - parameters: - - description: VRF UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Vrf' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve a VRF - tags: - - VRFs - x-accepts: application/json - put: - description: Updates the VRF. - operationId: updateVrf - parameters: - - description: VRF UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VrfUpdateInput' - description: VRF to update - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Vrf' - description: ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: unprocessable entity - summary: Update the VRF - tags: - - VRFs - x-content-type: application/json - x-accepts: application/json - /vrfs/{id}/ips: - get: - description: Returns the list of VRF IP Reservations for the VRF. - operationId: findVrfIpReservations - parameters: - - description: VRF UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Nested attributes to include. Included objects will return their - full attributes. Attribute names can be dotted (up to 3 levels) to included - deeply nested objects. - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: Nested attributes to exclude. Excluded objects will return only - the href attribute. Attribute names can be dotted (up to 3 levels) to exclude - deeply nested objects. - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VrfIpReservationList' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all VRF IP Reservations in the VRF - tags: - - VRFs - x-accepts: application/json - /vrfs/{vrf_id}/ips/{id}: - get: - description: Returns the IP Reservation for the VRF. - operationId: findVrfIpReservation - parameters: - - description: VRF UUID - in: path - name: vrf_id - required: true - schema: - format: uuid - type: string - - description: IP UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: Nested attributes to include. Included objects will return their - full attributes. Attribute names can be dotted (up to 3 levels) to included - deeply nested objects. - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: Nested attributes to exclude. Excluded objects will return only - the href attribute. Attribute names can be dotted (up to 3 levels) to exclude - deeply nested objects. - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VrfIpReservation' - description: ok - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: not found - summary: Retrieve all VRF IP Reservations in the VRF - tags: - - VRFs - x-accepts: application/json - /vrfs/{id}/routes: - get: - description: Returns the list of routes for the VRF - operationId: getVrfRoutes - parameters: - - description: VRF UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VrfRouteList' - description: OK - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - summary: Retrieve all routes in the VRF - tags: - - VRFs - x-accepts: application/json - post: - description: | - Create a route in a VRF. Currently only static default routes are supported. - - Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - operationId: createVrfRoute - parameters: - - description: VRF UUID - in: path - name: id - required: true - schema: - format: uuid - type: string - - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VrfRouteCreateInput' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VrfRoute' - description: OK - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Not Found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable entity - summary: Create a VRF route - tags: - - VRFs - x-content-type: application/json - x-accepts: application/json -components: - parameters: - DeviceSearch: - description: "Search by hostname, description, short_id, reservation short_id,\ - \ tags, plan name, plan slug, facility code, facility name, operating system\ - \ name, operating system slug, IP addresses." - in: query - name: search - schema: - type: string - ProjectName: - description: Filter results by name. - in: query - name: name - schema: - type: string - Page: - description: Page to return - in: query - name: page - schema: - default: 1 - format: int32 - maximum: 100000 - minimum: 1 - type: integer - PerPage: - description: Items returned per page - in: query - name: per_page - schema: - default: 10 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - Include: - description: |- - Nested attributes to include. Included objects will return their full - attributes. Attribute names can be dotted (up to 3 levels) to included deeply - nested objects. - explode: false - in: query - name: include - schema: - items: - type: string - type: array - style: form - Exclude: - description: |- - Nested attributes to exclude. Excluded objects will return only the href - attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply - nested objects. - explode: false - in: query - name: exclude - schema: - items: - type: string - type: array - style: form - requestBodies: - InterconnectionCreateInput: - content: - application/json: - schema: - $ref: '#/components/schemas/createOrganizationInterconnection_request' - description: Dedicated port or shared interconnection (also known as Fabric - VC) creation request - required: true - InvitationInput: - content: - application/json: - schema: - $ref: '#/components/schemas/InvitationInput' - description: Invitation to create - required: true - PortAssignInput: - content: - application/json: - schema: - $ref: '#/components/schemas/PortAssignInput' - description: "Virtual Network ID. May be the UUID of the Virtual Network record,\ - \ or the VLAN value itself (ex: '1001')." - required: true - SSHKeyCreateInput: - content: - application/json: - schema: - $ref: '#/components/schemas/SSHKeyCreateInput' - description: ssh key to create - required: true - responses: - Error: - description: Error responses are included with 4xx and 5xx HTTP responses from - the API service. Either "error" or "errors" will be set. - schemas: - Address: - example: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - properties: - address: - type: string - address2: - type: string - city: - type: string - coordinates: - $ref: '#/components/schemas/Coordinates' - country: - type: string - state: - type: string - zip_code: - type: string - required: - - address - - country - - zip_code - type: object - Attribute: - example: - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - properties: - namespace: - description: Attribute namespace - readOnly: true - type: string - created_at: - description: Datetime when the block was created. - format: date-time - readOnly: true - type: string - updated_at: - description: Datetime when the block was updated. - format: date-time - readOnly: true - type: string - data: - $ref: '#/components/schemas/AttributeData' - type: object - AttributeData: - example: - vendor: vendor - model: model - plan: plan - latest: true - properties: - latest: - description: Boolean flag to know if the firmware set is the latest for - the model and vendor - readOnly: true - type: boolean - model: - description: Model on which this firmware set can be applied - readOnly: true - type: string - vendor: - description: Vendor on which this firmware set can be applied - readOnly: true - type: string - plan: - description: Plan where the firmware set can be applied - readOnly: true - type: string - type: object - AuthToken: - example: - updated_at: 2000-01-23T04:56:07.000+00:00 - read_only: true - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - project: null - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - user: null - token: token - properties: - created_at: - format: date-time - type: string - description: - description: Available only for API keys - type: string - id: - format: uuid - type: string - project: - $ref: '#/components/schemas/AuthToken_project' - read_only: - type: boolean - token: - type: string - updated_at: - format: date-time - type: string - user: - $ref: '#/components/schemas/AuthToken_user' - type: object - AuthTokenInput: - example: - read_only: true - description: description - properties: - description: - type: string - read_only: - type: boolean - type: object - AuthTokenList: - example: - api_keys: - - updated_at: 2000-01-23T04:56:07.000+00:00 - read_only: true - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - project: null - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - user: null - token: token - - updated_at: 2000-01-23T04:56:07.000+00:00 - read_only: true - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - project: null - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - user: null - token: token - properties: - api_keys: - items: - $ref: '#/components/schemas/AuthToken' - type: array - type: object - BGPSessionInput: - example: - address_family: ipv4 - default_route: false - properties: - address_family: - description: Address family for BGP session. - enum: - - ipv4 - - ipv6 - example: ipv4 - type: string - default_route: - default: false - description: Set the default route policy. - type: boolean - type: object - Batch: - example: - quantity: 0 - updated_at: 2000-01-23T04:56:07.000+00:00 - devices: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - error_messages: - - error_messages - - error_messages - properties: - created_at: - format: date-time - type: string - devices: - items: - $ref: '#/components/schemas/Href' - type: array - error_messages: - items: - type: string - type: array - id: - format: uuid - type: string - project: - $ref: '#/components/schemas/Href' - quantity: - type: integer - state: - type: string - updated_at: - format: date-time - type: string - type: object - BatchesList: - example: - batches: - - quantity: 0 - updated_at: 2000-01-23T04:56:07.000+00:00 - devices: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - error_messages: - - error_messages - - error_messages - - quantity: 0 - updated_at: 2000-01-23T04:56:07.000+00:00 - devices: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - error_messages: - - error_messages - - error_messages - properties: - batches: - items: - $ref: '#/components/schemas/Batch' - type: array - type: object - BgpConfig: - example: - sessions: - - address_family: ipv4 - updated_at: 2000-01-23T04:56:07.000+00:00 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - default_route: true - device: - href: href - learned_routes: - - 10.32.16.0/31 - - 10.32.16.0/31 - status: unknown - - address_family: ipv4 - updated_at: 2000-01-23T04:56:07.000+00:00 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - default_route: true - device: - href: href - learned_routes: - - 10.32.16.0/31 - - 10.32.16.0/31 - status: unknown - ranges: - - address_family: 6 - project: - href: href - range: range - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - address_family: 6 - project: - href: href - range: range - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - max_prefix: 0 - project: - href: href - route_object: route_object - deployment_type: local - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - asn: 65000 - md5: md5 - requested_at: 2000-01-23T04:56:07.000+00:00 - status: requested - properties: - asn: - description: "Autonomous System Number. ASN is required with Global BGP.\ - \ With Local BGP the private ASN, 65000, is assigned." - example: 65000 - format: int32 - type: integer - created_at: - format: date-time - type: string - deployment_type: - description: | - In a Local BGP deployment, a customer uses an internal ASN to control routes within a single Equinix Metal datacenter. This means that the routes are never advertised to the global Internet. Global BGP, on the other hand, requires a customer to have a registered ASN and IP space. - enum: - - global - - local - example: local - type: string - href: - type: string - id: - format: uuid - type: string - max_prefix: - default: 10 - description: The maximum number of route filters allowed per server - type: integer - md5: - description: (Optional) Password for BGP session in plaintext (not a checksum) - nullable: true - type: string - project: - $ref: '#/components/schemas/Href' - ranges: - description: The IP block ranges associated to the ASN (Populated in Global - BGP only) - items: - $ref: '#/components/schemas/GlobalBgpRange' - type: array - requested_at: - format: date-time - type: string - route_object: - description: Specifies AS-MACRO (aka AS-SET) to use when building client - route filters - type: string - sessions: - description: The direct connections between neighboring routers that want - to exchange routing information. - items: - $ref: '#/components/schemas/BgpSession' - type: array - status: - description: Status of the BGP Config. Status "requested" is valid only - with the "global" deployment_type. - enum: - - requested - - enabled - - disabled - type: string - type: object - BgpConfigRequestInput: - example: - use_case: use_case - deployment_type: local - asn: 65000 - md5: md5 - properties: - asn: - description: Autonomous System Number for local BGP deployment. - example: 65000 - maximum: 4294967295 - minimum: 0 - type: integer - deployment_type: - description: Wether the BGP deployment is local or global. Local deployments - are configured immediately. Global deployments will need to be reviewed - by Equinix Metal engineers. - enum: - - local - - global - example: local - type: string - md5: - description: | - The plaintext password to share between BGP neighbors as an MD5 checksum: - * must be 10-20 characters long - * may not include punctuation - * must be a combination of numbers and letters - * must contain at least one lowercase, uppercase, and digit character - pattern: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{10,20}$" - type: string - use_case: - description: A use case explanation (necessary for global BGP request review). - type: string - required: - - asn - - deployment_type - type: object - BgpDynamicNeighbor: - example: - metal_gateway: - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - ip_reservation: null - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - created_by: - href: href - bgp_neighbor_asn: 12345 - updated_at: 2000-01-23T04:56:07.000+00:00 - created_at: 2000-01-23T04:56:07.000+00:00 - id: aea82f16-57ec-412c-9523-b7f2b27635b2 - bgp_neighbor_range: 192.168.1.0/25 - state: active - href: /bgp-dynamic-neighbors/aea82f16-57ec-412c-9523-b7f2b27635b2 - created_by: - avatar_thumb_url: avatar_thumb_url - full_name: full_name - avatar_url: avatar_url - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - tags: - - tags - - tags - properties: - id: - description: The unique identifier for the resource - example: aea82f16-57ec-412c-9523-b7f2b27635b2 - format: uuid - readOnly: true - type: string - bgp_neighbor_asn: - description: The ASN of the dynamic BGP neighbor - example: 12345 - type: integer - bgp_neighbor_range: - description: Network range of the dynamic BGP neighbor in CIDR format - example: 192.168.1.0/25 - type: string - metal_gateway: - $ref: '#/components/schemas/VrfMetalGateway' - state: - enum: - - active - - deleting - - pending - - ready - readOnly: true - type: string - href: - example: /bgp-dynamic-neighbors/aea82f16-57ec-412c-9523-b7f2b27635b2 - readOnly: true - type: string - created_at: - format: date-time - readOnly: true - type: string - created_by: - $ref: '#/components/schemas/UserLimited' - updated_at: - format: date-time - readOnly: true - type: string - tags: - items: - type: string - type: array - type: object - BgpDynamicNeighborCreateInput: - example: - bgp_neighbor_asn: 12345 - bgp_neighbor_range: 192.168.1.0/25 - tags: - - tags - - tags - properties: - bgp_neighbor_range: - description: Network range of the dynamic BGP neighbor in CIDR format - example: 192.168.1.0/25 - type: string - bgp_neighbor_asn: - description: The ASN of the dynamic BGP neighbor - example: 12345 - type: integer - tags: - items: - type: string - type: array - required: - - bgp_neighbor_asn - - bgp_neighbor_range - type: object - BgpDynamicNeighborList: - example: - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - bgp_dynamic_neighbors: - - metal_gateway: - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - ip_reservation: null - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - created_by: - href: href - bgp_neighbor_asn: 12345 - updated_at: 2000-01-23T04:56:07.000+00:00 - created_at: 2000-01-23T04:56:07.000+00:00 - id: aea82f16-57ec-412c-9523-b7f2b27635b2 - bgp_neighbor_range: 192.168.1.0/25 - state: active - href: /bgp-dynamic-neighbors/aea82f16-57ec-412c-9523-b7f2b27635b2 - created_by: - avatar_thumb_url: avatar_thumb_url - full_name: full_name - avatar_url: avatar_url - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - tags: - - tags - - tags - - metal_gateway: - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - ip_reservation: null - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - created_by: - href: href - bgp_neighbor_asn: 12345 - updated_at: 2000-01-23T04:56:07.000+00:00 - created_at: 2000-01-23T04:56:07.000+00:00 - id: aea82f16-57ec-412c-9523-b7f2b27635b2 - bgp_neighbor_range: 192.168.1.0/25 - state: active - href: /bgp-dynamic-neighbors/aea82f16-57ec-412c-9523-b7f2b27635b2 - created_by: - avatar_thumb_url: avatar_thumb_url - full_name: full_name - avatar_url: avatar_url - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - tags: - - tags - - tags - properties: - bgp_dynamic_neighbors: - items: - $ref: '#/components/schemas/BgpDynamicNeighbor' - type: array - meta: - $ref: '#/components/schemas/Meta' - type: object - BgpNeighborData: - example: - md5_password: md5_password - customer_as: 65000 - address_family: 4 - routes_in: - - exact: true - route: 10.32.16.0/31 - customer_ip: 10.32.16.1 (IPv4) or 2604:1380:4111:2700::1 (IPv6) - multihop: true - peer_as: 65530 - md5_enabled: true - peer_ips: - - 169.254.255.1 - - 169.254.255.2 - routes_out: - - exact: true - route: 0.0.0.0/0 - properties: - address_family: - description: Address Family for IP Address. Accepted values are 4 or 6 - example: 4 - format: int32 - type: integer - customer_as: - description: "The customer's ASN. In a local BGP deployment, this will be\ - \ an internal ASN used to route within the data center. For a global BGP\ - \ deployment, this will be the your own ASN, configured when you set up\ - \ BGP for your project." - example: 65000 - format: int32 - type: integer - customer_ip: - description: "The device's IP address. For an IPv4 BGP session, this is\ - \ typically the private bond0 address for the device." - example: 10.32.16.1 (IPv4) or 2604:1380:4111:2700::1 (IPv6) - type: string - md5_enabled: - description: True if an MD5 password is configured for the project. - type: boolean - md5_password: - description: "The MD5 password configured for the project, if set." - type: string - multihop: - description: True when the BGP session should be configured as multihop. - type: boolean - peer_as: - description: The Peer ASN to use when configuring BGP on your device. - example: 65530 - format: int32 - type: integer - peer_ips: - description: "A list of one or more IP addresses to use for the Peer IP\ - \ section of your BGP configuration. For non-multihop sessions, this will\ - \ typically be a single gateway address for the device. For multihop sessions,\ - \ it will be a list of IPs." - example: - - 169.254.255.1 - - 169.254.255.2 - items: - type: string - type: array - routes_in: - description: A list of project subnets - example: - - exact: true - route: 10.32.16.0/31 - items: - $ref: '#/components/schemas/BgpRoute' - type: array - routes_out: - description: A list of outgoing routes. Only populated if the BGP session - has default route enabled. - example: - - exact: true - route: 0.0.0.0/0 - items: - $ref: '#/components/schemas/BgpRoute' - type: array - type: object - BgpSession: - example: - address_family: ipv4 - updated_at: 2000-01-23T04:56:07.000+00:00 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - default_route: true - device: - href: href - learned_routes: - - 10.32.16.0/31 - - 10.32.16.0/31 - status: unknown - properties: - address_family: - enum: - - ipv4 - - ipv6 - type: string - created_at: - format: date-time - type: string - default_route: - type: boolean - device: - $ref: '#/components/schemas/Href' - href: - type: string - id: - format: uuid - type: string - learned_routes: - items: - description: IPv4 or IPv6 range - example: 10.32.16.0/31 - type: string - type: array - status: - description: " The status of the BGP Session. Multiple status values may\ - \ be reported when the device is connected to multiple switches, one value\ - \ per switch. Each status will start with \"unknown\" and progress to\ - \ \"up\" or \"down\" depending on the connected device. Subsequent \"\ - unknown\" values indicate a problem acquiring status from the switch. " - enum: - - unknown - - up - - down - type: string - updated_at: - format: date-time - type: string - required: - - address_family - type: object - BgpSessionList: - example: - bgp_sessions: - - address_family: ipv4 - updated_at: 2000-01-23T04:56:07.000+00:00 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - default_route: true - device: - href: href - learned_routes: - - 10.32.16.0/31 - - 10.32.16.0/31 - status: unknown - - address_family: ipv4 - updated_at: 2000-01-23T04:56:07.000+00:00 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - default_route: true - device: - href: href - learned_routes: - - 10.32.16.0/31 - - 10.32.16.0/31 - status: unknown - properties: - bgp_sessions: - items: - $ref: '#/components/schemas/BgpSession' - type: array - type: object - BgpSessionNeighbors: - example: - bgp_neighbors: - - md5_password: md5_password - customer_as: 65000 - address_family: 4 - routes_in: - - exact: true - route: 10.32.16.0/31 - customer_ip: 10.32.16.1 (IPv4) or 2604:1380:4111:2700::1 (IPv6) - multihop: true - peer_as: 65530 - md5_enabled: true - peer_ips: - - 169.254.255.1 - - 169.254.255.2 - routes_out: - - exact: true - route: 0.0.0.0/0 - - md5_password: md5_password - customer_as: 65000 - address_family: 4 - routes_in: - - exact: true - route: 10.32.16.0/31 - customer_ip: 10.32.16.1 (IPv4) or 2604:1380:4111:2700::1 (IPv6) - multihop: true - peer_as: 65530 - md5_enabled: true - peer_ips: - - 169.254.255.1 - - 169.254.255.2 - routes_out: - - exact: true - route: 0.0.0.0/0 - properties: - bgp_neighbors: - description: A list of BGP session neighbor data - items: - $ref: '#/components/schemas/BgpNeighborData' - type: array - type: object - CapacityCheckPerFacilityInfo: - example: - quantity: quantity - available: true - facility: facility - plan: plan - properties: - available: - type: boolean - facility: - type: string - plan: - type: string - quantity: - type: string - type: object - CapacityCheckPerFacilityList: - example: - servers: - - quantity: quantity - available: true - facility: facility - plan: plan - - quantity: quantity - available: true - facility: facility - plan: plan - properties: - servers: - items: - $ref: '#/components/schemas/CapacityCheckPerFacilityInfo' - type: array - type: object - CapacityCheckPerMetroInfo: - example: - quantity: quantity - metro: metro - available: true - plan: plan - properties: - available: - description: Returns true if there is enough capacity in the metro to fulfill - the quantity set. Returns false if there is not enough. - type: boolean - metro: - description: The metro ID or code sent to check capacity. - type: string - plan: - description: The plan ID or slug sent to check capacity. - type: string - quantity: - description: The number of servers sent to check capacity. - type: string - type: object - CapacityCheckPerMetroList: - example: - servers: - - quantity: quantity - metro: metro - available: true - plan: plan - - quantity: quantity - metro: metro - available: true - plan: plan - properties: - servers: - items: - $ref: '#/components/schemas/CapacityCheckPerMetroInfo' - type: array - type: object - CapacityInput: - example: - servers: - - quantity: quantity - metro: metro - facility: facility - plan: plan - - quantity: quantity - metro: metro - facility: facility - plan: plan - properties: - servers: - items: - $ref: '#/components/schemas/ServerInfo' - type: array - type: object - CapacityLevelPerBaremetal: - example: - level: level - properties: - level: - type: string - type: object - CapacityList: - example: - capacity: - key: - key: - level: level - properties: - capacity: - additionalProperties: - additionalProperties: - $ref: '#/components/schemas/CapacityLevelPerBaremetal' - type: object - type: object - type: object - CapacityReport: - additionalProperties: - additionalProperties: - $ref: '#/components/schemas/CapacityLevelPerBaremetal' - type: object - type: object - Component: - example: - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - properties: - uuid: - description: Component UUID - example: 0516463a-47ee-4809-9a66-ece8c740eed9 - format: uuid - readOnly: true - type: string - vendor: - description: Component vendor - example: equinix - readOnly: true - type: string - model: - description: List of models where this component version can be applied - items: - example: romed8hm3 - type: string - readOnly: true - type: array - filename: - description: name of the file - readOnly: true - type: string - version: - description: Version of the component - example: 1.5.0 - readOnly: true - type: string - component: - description: Component type - example: bmc - readOnly: true - type: string - checksum: - description: File checksum - readOnly: true - type: string - upstream_url: - description: Location of the file - readOnly: true - type: string - repository_url: - description: Location of the file in the repository - readOnly: true - type: string - created_at: - description: Datetime when the block was created. - format: date-time - readOnly: true - type: string - updated_at: - description: Datetime when the block was updated. - format: date-time - readOnly: true - type: string - type: object - Coordinates: - example: - latitude: latitude - longitude: longitude - properties: - latitude: - type: string - longitude: - type: string - type: object - CreateEmailInput: - example: - address: address - properties: - address: - type: string - required: - - address - type: object - CreateSelfServiceReservationRequest: - example: - item: - - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - term: term - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - term: term - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - period: - unit: monthly - count: 1 - notes: notes - start_date: 2000-01-23T04:56:07.000+00:00 - properties: - item: - items: - $ref: '#/components/schemas/SelfServiceReservationItemRequest' - type: array - notes: - type: string - period: - $ref: '#/components/schemas/CreateSelfServiceReservationRequest_period' - start_date: - format: date-time - type: string - type: object - DedicatedPortCreateInput: - properties: - billing_account_name: - description: The billing account name of the Equinix Fabric account. - type: string - contact_email: - description: The preferred email used for communication and notifications - about the Equinix Fabric interconnection. Required when using a Project - API key. Optional and defaults to the primary user email address when - using a User API key. - format: email - type: string - description: - type: string - metro: - description: "A Metro ID or code. For interconnections with Dedicated Ports,\ - \ this will be the location of the issued Dedicated Ports." - type: string - mode: - description: |- - The mode of the interconnection (only relevant to Dedicated Ports). Fabric VCs won't have this field. Can be either 'standard' or 'tunnel'. - The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. - In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - enum: - - standard - - tunnel - example: standard - type: string - name: - type: string - project: - type: string - redundancy: - description: Either 'primary' or 'redundant'. - type: string - speed: - description: "A interconnection speed, in bps, mbps, or gbps. For Dedicated\ - \ Ports, this can be 10Gbps or 100Gbps." - example: 10000000000 - type: integer - tags: - items: - type: string - type: array - type: - description: "When requesting for a dedicated port, the value of this field\ - \ should be 'dedicated'." - enum: - - dedicated - - shared - type: string - use_case: - description: The intended use case of the dedicated port. - type: string - required: - - metro - - name - - redundancy - - type - type: object - Device: - example: - ip_addresses: - - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - iqn: iqn - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - project: null - switch_uuid: switch_uuid - storage: - disks: - - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - filesystems: - - mount: - format: format - options: - - options - - options - device: device - point: point - - mount: - format: format - options: - - options - - options - device: device - point: point - raid: - - devices: - - devices - - devices - level: level - name: name - - devices: - - devices - - devices - level: level - name: name - bonding_mode: 0 - provisioning_events: - - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - network_ports: - - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - userdata: userdata - hostname: hostname - updated_at: 2000-01-23T04:56:07.000+00:00 - sos: sos - operating_system: - default_operating_system: true - distro: distro - preinstallable: true - licensed: true - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - provisionable_on: - - provisionable_on - - provisionable_on - version: version - pricing: "{}" - slug: slug - distro_label: distro_label - firmware_set_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - billing_cycle: billing_cycle - customdata: - key: "" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: queued - locked: true - spot_price_max: 9.301444 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - provisioning_percentage: 7.0614014 - network_frozen: true - image_url: image_url - root_password: root_password - volumes: - - href: href - - href: href - project_lite: null - short_id: short_id - termination_time: 2021-09-03T16:32:00+03:00 - created_by: null - tags: - - tags - - tags - hardware_reservation: - custom_rate: 1050.5 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - switch_uuid: switch_uuid - short_id: short_id - termination_time: 2000-01-23T04:56:07.000+00:00 - provisionable: true - need_of_service: true - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - device: null - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - spare: true - spot_instance: true - ssh_keys: - - href: href - - href: href - metro: null - always_pxe: true - ipxe_script_url: ipxe_script_url - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - actions: - - name: name - type: type - - name: name - type: type - user: user - properties: - always_pxe: - type: boolean - billing_cycle: - type: string - bonding_mode: - type: integer - created_at: - format: date-time - type: string - created_by: - $ref: '#/components/schemas/Device_created_by' - customdata: - additionalProperties: true - default: {} - type: object - description: - type: string - facility: - $ref: '#/components/schemas/Facility' - firmware_set_id: - description: The UUID of the firmware set to associate with the device. - format: uuid - type: string - hardware_reservation: - $ref: '#/components/schemas/HardwareReservation' - hostname: - type: string - href: - type: string - id: - format: uuid - type: string - image_url: - type: string - ip_addresses: - items: - $ref: '#/components/schemas/IPAssignment' - type: array - ipxe_script_url: - type: string - iqn: - type: string - locked: - description: Prevents accidental deletion of this resource when set to true. - type: boolean - metro: - $ref: '#/components/schemas/Device_metro' - network_frozen: - description: "Whether network mode changes such as converting to/from Layer2\ - \ or Layer3 networking, bonding or disbonding network interfaces are permitted\ - \ for the device." - type: boolean - network_ports: - description: "By default, servers at Equinix Metal are configured in a “\ - bonded” mode using LACP (Link Aggregation Control Protocol). Each 2-NIC\ - \ server is configured with a single bond (namely bond0) with both interfaces\ - \ eth0 and eth1 as members of the bond in a default Layer 3 mode. Some\ - \ device plans may have a different number of ports and bonds available." - items: - $ref: '#/components/schemas/Port' - type: array - operating_system: - $ref: '#/components/schemas/OperatingSystem' - actions: - description: Actions supported by the device instance. - items: - $ref: '#/components/schemas/Device_actions_inner' - type: array - plan: - $ref: '#/components/schemas/Plan' - project: - $ref: '#/components/schemas/Device_project' - project_lite: - $ref: '#/components/schemas/Device_project_lite' - provisioning_events: - items: - $ref: '#/components/schemas/Event' - type: array - provisioning_percentage: - description: Only visible while device provisioning - format: float - type: number - root_password: - description: Root password is automatically generated when server is provisioned - and it is removed after 24 hours - type: string - short_id: - type: string - spot_instance: - description: Whether or not the device is a spot instance. - type: boolean - spot_price_max: - description: |- - The maximum price per hour you are willing to pay to keep this spot - instance. If you are outbid, the termination will be set allowing two - minutes before shutdown. - format: float - type: number - ssh_keys: - items: - $ref: '#/components/schemas/Href' - type: array - state: - description: "The current state the instance is in.\n\n* When an instance\ - \ is initially created it will be in the `queued` state until it is picked\ - \ up by the provisioner.\n* Once provisioning has begun on the instance\ - \ it's state will move to `provisioning`.\n* When an instance is deleted,\ - \ it will move to `deprovisioning` state until the deprovision is completed\ - \ and the instance state moves to `deleted`.\n* If an instance fails to\ - \ provision or deprovision it will move to `failed` state.\n* Once an\ - \ instance has completed provisioning it will move to `active` state.\n\ - * If an instance is currently powering off or powering on it will move\ - \ to `powering_off` or `powering_on` states respectively. \n* When the\ - \ instance is powered off completely it will move to the `inactive` state.\n\ - * When an instance is powered on completely it will move to the `active`\ - \ state.\n* Using the reinstall action to install a new OS on the instance\ - \ will cause the instance state to change to `reinstalling`.\n* When the\ - \ reinstall action is complete the instance will move to `active` state." - enum: - - queued - - provisioning - - deprovisioning - - reinstalling - - active - - inactive - - failed - - powering_on - - powering_off - - deleted - type: string - storage: - $ref: '#/components/schemas/Storage' - switch_uuid: - description: |- - Switch short id. This can be used to determine if two devices are - connected to the same switch, for example. - type: string - tags: - items: - type: string - type: array - termination_time: - description: |- - When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. - - This is commonly set in advance for - ephemeral spot market instances but this field may also be set with - on-demand and reservation instances to automatically delete the resource - at a given time. The termination time can also be used to release a - hardware reservation instance at a given time, keeping the reservation - open for other uses. On a spot market device, the termination time will - be set automatically when outbid. - example: 2021-09-03T16:32:00+03:00 - format: date-time - type: string - updated_at: - format: date-time - type: string - user: - type: string - userdata: - type: string - volumes: - items: - $ref: '#/components/schemas/Href' - type: array - sos: - description: Hostname used to connect to the instance via the SOS (Serial - over SSH) out-of-band console. - type: string - type: object - DeviceCreateInput: - properties: - always_pxe: - default: false - description: |- - When true, devices with a `custom_ipxe` OS will always boot to iPXE. The - default setting of false ensures that iPXE will be used on only the - first boot. - type: boolean - billing_cycle: - description: The billing cycle of the device. - enum: - - hourly - - daily - - monthly - - yearly - type: string - customdata: - additionalProperties: true - default: {} - description: |- - Customdata is an arbitrary JSON value that can be accessed via the - metadata service. - type: object - description: - description: |- - Any description of the device or how it will be used. This may be used - to inform other API consumers with project access. - type: string - features: - description: |- - The features attribute allows you to optionally specify what features your server should have. - - In the API shorthand syntax, all features listed are `required`: - - ``` - { "features": ["tpm"] } - ``` - - Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: - - ``` - { "features": { "tpm": "required", "raid": "preferred" } } - ``` - - The request will only fail if there are no available servers matching the required `tpm` criteria. - items: - type: string - type: array - hardware_reservation_id: - default: "" - description: |- - The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. - - See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. - example: next-available - type: string - hostname: - description: The hostname to use within the operating system. The same hostname - may be used on multiple devices within a project. - type: string - ip_addresses: - description: |- - The `ip_addresses attribute will allow you to specify the addresses you want created with your device. - - The default value configures public IPv4, public IPv6, and private IPv4. - - Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. - - Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. - - For example, to only configure your server with a private IPv4 address, you can send `{ "ip_addresses": [{ "address_family": 4, "public": false }] }`. - - It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. - - For example, `{ "ip_addresses": [..., {"address_family": 4, "public": true, "ip_reservations": ["uuid1", "uuid2"]}] }` - - To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. - items: - $ref: '#/components/schemas/IPAddress' - type: array - ipxe_script_url: - description: |- - When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. - - See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. - externalDocs: - url: https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/ - type: string - locked: - default: false - description: "Whether the device should be locked, preventing accidental\ - \ deletion." - type: boolean - network_frozen: - description: "If true, this instance can not be converted to a different\ - \ network type." - type: boolean - no_ssh_keys: - default: false - description: Overrides default behaviour of attaching all of the organization - members ssh keys and project ssh keys to device if no specific keys specified - type: boolean - operating_system: - description: "The slug of the operating system to provision. Check the Equinix\ - \ Metal operating system documentation for rules that may be imposed per\ - \ operating system, including restrictions on IP address options and device\ - \ plans." - type: string - plan: - description: The slug of the device plan to provision. - example: c3.large.x86 - type: string - private_ipv4_subnet_size: - default: 28 - description: Deprecated. Use ip_addresses. Subnet range for addresses allocated - to this device. - format: int32 - type: integer - x-deprecated: true - project_ssh_keys: - description: | - A list of UUIDs identifying the device parent project - that should be authorized to access this device (typically - via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. - - If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), - all parent project keys, parent project members keys and organization members keys will be included. This behaviour can - be changed with 'no_ssh_keys' option to omit any SSH key being added. - items: - format: uuid - type: string - type: array - public_ipv4_subnet_size: - default: 31 - description: Deprecated. Use ip_addresses. Subnet range for addresses allocated - to this device. Your project must have addresses available for a non-default - request. - format: int32 - type: integer - x-deprecated: true - spot_instance: - description: "Create a spot instance. Spot instances are created with a\ - \ maximum bid price. If the bid price is not met, the spot instance will\ - \ be terminated as indicated by the `termination_time` field." - type: boolean - spot_price_max: - description: The maximum amount to bid for a spot instance. - example: 1.23 - format: float - type: number - ssh_keys: - description: | - A list of new or existing project ssh_keys - that should be authorized to access this device (typically - via /root/.ssh/authorized_keys). These keys will also - appear in the device metadata. - - These keys are added in addition to any keys defined by - `project_ssh_keys` and `user_ssh_keys`. - items: - $ref: '#/components/schemas/SSHKeyInput' - type: array - storage: - $ref: '#/components/schemas/Storage' - tags: - items: - type: string - type: array - termination_time: - description: | - When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. - - This is commonly set in advance for - ephemeral spot market instances but this field may also be set with - on-demand and reservation instances to automatically delete the resource - at a given time. The termination time can also be used to release a - hardware reservation instance at a given time, keeping the reservation - open for other uses. On a spot market device, the termination time will - be set automatically when outbid. - example: 2021-09-03T16:32:00+03:00 - format: date-time - type: string - user_ssh_keys: - description: | - A list of UUIDs identifying the users - that should be authorized to access this device (typically - via /root/.ssh/authorized_keys). These keys will also - appear in the device metadata. - - The users must be members of the project or organization. - - If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), - all parent project keys, parent project members keys and organization members keys will be included. This behaviour can - be changed with 'no_ssh_keys' option to omit any SSH key being added. - items: - format: uuid - type: string - type: array - userdata: - description: |- - The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. - - See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. - externalDocs: - url: https://metal.equinix.com/developers/docs/servers/user-data/ - type: string - required: - - operating_system - - plan - type: object - DeviceHealthRollup: - description: Represents a Device Health Status - example: - health_rollup: ok - updated_at: 2000-01-23T04:56:07.000+00:00 - properties: - health_rollup: - description: Health Status - enum: - - ok - - warning - - critical - readOnly: true - type: string - updated_at: - description: Last update of health status. - format: date-time - readOnly: true - type: string - type: object - DeviceCreateInFacilityInput: - allOf: - - $ref: '#/components/schemas/FacilityInput' - - $ref: '#/components/schemas/DeviceCreateInput' - DeviceCreateInMetroInput: - allOf: - - $ref: '#/components/schemas/MetroInput' - - $ref: '#/components/schemas/DeviceCreateInput' - DeviceList: - example: - devices: - - ip_addresses: - - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - iqn: iqn - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - project: null - switch_uuid: switch_uuid - storage: - disks: - - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - filesystems: - - mount: - format: format - options: - - options - - options - device: device - point: point - - mount: - format: format - options: - - options - - options - device: device - point: point - raid: - - devices: - - devices - - devices - level: level - name: name - - devices: - - devices - - devices - level: level - name: name - bonding_mode: 0 - provisioning_events: - - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - network_ports: - - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - userdata: userdata - hostname: hostname - updated_at: 2000-01-23T04:56:07.000+00:00 - sos: sos - operating_system: - default_operating_system: true - distro: distro - preinstallable: true - licensed: true - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - provisionable_on: - - provisionable_on - - provisionable_on - version: version - pricing: "{}" - slug: slug - distro_label: distro_label - firmware_set_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - billing_cycle: billing_cycle - customdata: - key: "" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: queued - locked: true - spot_price_max: 9.301444 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - provisioning_percentage: 7.0614014 - network_frozen: true - image_url: image_url - root_password: root_password - volumes: - - href: href - - href: href - project_lite: null - short_id: short_id - termination_time: 2021-09-03T16:32:00+03:00 - created_by: null - tags: - - tags - - tags - hardware_reservation: - custom_rate: 1050.5 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - switch_uuid: switch_uuid - short_id: short_id - termination_time: 2000-01-23T04:56:07.000+00:00 - provisionable: true - need_of_service: true - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - device: null - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - spare: true - spot_instance: true - ssh_keys: - - href: href - - href: href - metro: null - always_pxe: true - ipxe_script_url: ipxe_script_url - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - actions: - - name: name - type: type - - name: name - type: type - user: user - - ip_addresses: - - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - iqn: iqn - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - project: null - switch_uuid: switch_uuid - storage: - disks: - - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - filesystems: - - mount: - format: format - options: - - options - - options - device: device - point: point - - mount: - format: format - options: - - options - - options - device: device - point: point - raid: - - devices: - - devices - - devices - level: level - name: name - - devices: - - devices - - devices - level: level - name: name - bonding_mode: 0 - provisioning_events: - - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - network_ports: - - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - userdata: userdata - hostname: hostname - updated_at: 2000-01-23T04:56:07.000+00:00 - sos: sos - operating_system: - default_operating_system: true - distro: distro - preinstallable: true - licensed: true - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - provisionable_on: - - provisionable_on - - provisionable_on - version: version - pricing: "{}" - slug: slug - distro_label: distro_label - firmware_set_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - billing_cycle: billing_cycle - customdata: - key: "" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: queued - locked: true - spot_price_max: 9.301444 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - provisioning_percentage: 7.0614014 - network_frozen: true - image_url: image_url - root_password: root_password - volumes: - - href: href - - href: href - project_lite: null - short_id: short_id - termination_time: 2021-09-03T16:32:00+03:00 - created_by: null - tags: - - tags - - tags - hardware_reservation: - custom_rate: 1050.5 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - switch_uuid: switch_uuid - short_id: short_id - termination_time: 2000-01-23T04:56:07.000+00:00 - provisionable: true - need_of_service: true - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - device: null - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - spare: true - spot_instance: true - ssh_keys: - - href: href - - href: href - metro: null - always_pxe: true - ipxe_script_url: ipxe_script_url - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - actions: - - name: name - type: type - - name: name - type: type - user: user - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - properties: - devices: - items: - $ref: '#/components/schemas/Device' - type: array - meta: - $ref: '#/components/schemas/Meta' - type: object - DeviceUpdateInput: - example: - userdata: userdata - hostname: hostname - spot_instance: true - network_frozen: true - description: description - firmware_set_id: firmware_set_id - always_pxe: true - billing_cycle: billing_cycle - customdata: - key: "" - ipxe_script_url: ipxe_script_url - locked: true - tags: - - tags - - tags - properties: - always_pxe: - type: boolean - billing_cycle: - type: string - customdata: - additionalProperties: true - default: {} - type: object - description: - type: string - hostname: - type: string - firmware_set_id: - type: string - ipxe_script_url: - type: string - locked: - description: "Whether the device should be locked, preventing accidental\ - \ deletion." - type: boolean - network_frozen: - description: "If true, this instance can not be converted to a different\ - \ network type." - type: boolean - spot_instance: - description: Can be set to false to convert a spot-market instance to on-demand. - externalDocs: - url: https://metal.equinix.com/developers/docs/deploy/spot-market/#converting-a-spot-market-server-to-on-demand - type: boolean - tags: - items: - type: string - type: array - userdata: - type: string - type: object - DeviceUsage: - example: - total: total - unit: unit - quantity: quantity - properties: - quantity: - type: string - total: - type: string - unit: - type: string - type: object - DeviceUsageList: - example: - usages: - - total: total - unit: unit - quantity: quantity - - total: total - unit: unit - quantity: quantity - properties: - usages: - items: - $ref: '#/components/schemas/DeviceUsage' - type: array - type: object - Email: - example: - default: true - address: address - verified: true - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - address: - type: string - default: - type: boolean - href: - type: string - id: - format: uuid - type: string - verified: - type: boolean - type: object - EmailInput: - example: - default: true - address: address - properties: - address: - type: string - default: - type: boolean - required: - - address - type: object - Entitlement: - properties: - description: - type: string - feature_access: - type: object - href: - type: string - id: - format: uuid - type: string - instance_quota: - type: object - ip_quota: - type: object - name: - type: string - project_quota: - default: 0 - type: integer - slug: - type: string - volume_limits: - type: object - volume_quota: - type: object - weight: - type: integer - required: - - id - - slug - - weight - type: object - Error: - description: Error responses are included with 4xx and 5xx HTTP responses from - the API service. Either "error" or "errors" will be set. - properties: - error: - description: A description of the error that caused the request to fail. - type: string - errors: - description: A list of errors that contributed to the request failing. - items: - description: An error message that contributed to the request failing. - type: string - type: array - type: object - Event: - example: - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - properties: - body: - type: string - created_at: - format: date-time - type: string - href: - type: string - id: - format: uuid - type: string - interpolated: - type: string - relationships: - items: - $ref: '#/components/schemas/Href' - type: array - state: - type: string - type: - type: string - modified_by: - type: object - ip: - type: string - type: object - EventList: - example: - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - events: - - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - - interpolated: interpolated - relationships: - - href: href - - href: href - ip: ip - modified_by: "{}" - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - body: body - type: type - properties: - events: - items: - $ref: '#/components/schemas/Event' - type: array - meta: - $ref: '#/components/schemas/Meta' - type: object - FabricServiceToken: - example: - max_allowed_speed: 10000000000 - expires_at: 2000-01-23T04:56:07.000+00:00 - role: primary - service_token_type: a_side - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: inactive - properties: - expires_at: - description: "The expiration date and time of the Fabric service token.\ - \ Once a service token is expired, it is no longer redeemable." - format: date-time - type: string - id: - description: "The UUID that can be used on the Fabric Portal to redeem either\ - \ an A-Side or Z-Side Service Token.\nFor Fabric VCs (Metal Billed), this\ - \ UUID will represent an A-Side Service Token, which will allow interconnections\n\ - to be made from Equinix Metal to other Service Providers on Fabric. For\ - \ Fabric VCs (Fabric Billed), this UUID will\nrepresent a Z-Side Service\ - \ Token, which will allow interconnections to be made to connect an owned\ - \ Fabric Port or \nVirtual Device to Equinix Metal." - format: uuid - type: string - max_allowed_speed: - description: "The maximum speed that can be selected on the Fabric Portal\ - \ when configuring a interconnection with either \nan A-Side or Z-Side\ - \ Service Token. For Fabric VCs (Metal Billed), this is what the billing\ - \ is based off of, and can be one\nof the following options, '50mbps',\ - \ '200mbps', '500mbps', '1gbps', '2gbps', '5gbps' or '10gbps'. For Fabric\ - \ VCs\n(Fabric Billed), this will default to 10Gbps." - example: 10000000000 - type: integer - role: - description: "Either primary or secondary, depending on which interconnection\ - \ the service token is associated to." - enum: - - primary - - secondary - type: string - service_token_type: - description: "Either 'a_side' or 'z_side', depending on which type of Fabric\ - \ VC was requested." - enum: - - a_side - - z_side - type: string - state: - description: |- - The state of the service token that corresponds with the service - token state on Fabric. An 'inactive' state refers to a token that has not been - redeemed yet on the Fabric side, an 'active' state refers to a token that has - already been redeemed, and an 'expired' state refers to a token that has reached - its expiry time. - enum: - - inactive - - active - - expired - type: string - type: object - Facility: - example: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - address: - $ref: '#/components/schemas/Address' - code: - type: string - features: - example: - - baremetal - - backend_transfer - - global_ipv4 - items: - enum: - - baremetal - - backend_transfer - - layer_2 - - global_ipv4 - - ibx - type: string - type: array - id: - format: uuid - type: string - ip_ranges: - description: IP ranges registered in facility. Can be used for GeoIP location - example: - - 2604:1380::/36 - - 147.75.192.0/21 - items: - type: string - type: array - metro: - $ref: '#/components/schemas/Device_metro' - name: - type: string - type: object - FacilityInput: - properties: - facility: - deprecated: true - description: |- - The datacenter where the device should be created. - - Either metro or facility must be provided. - - The API will accept either a single facility `{ "facility": "f1" }`, or it can be instructed to create the device in the best available datacenter `{ "facility": "any" }`. - - Additionally it is possible to set a prioritized location selection. For example `{ "facility": ["f3", "f2", "any"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. - example: - - sv15 - items: - type: string - type: array - required: - - facility - type: object - FacilityList: - example: - facilities: - - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - facilities: - items: - $ref: '#/components/schemas/Facility' - type: array - type: object - FirmwareSet: - description: Represents a Firmware Set - example: - updated_at: 2000-01-23T04:56:07.000+00:00 - name: name - created_at: 2000-01-23T04:56:07.000+00:00 - attributes: - - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - component_firmware: - - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - properties: - uuid: - description: Firmware Set UUID - example: 0516463a-47ee-4809-9a66-ece8c740eed9 - format: uuid - readOnly: true - type: string - name: - description: Firmware Set Name - readOnly: true - type: string - created_at: - description: Datetime when the block was created. - format: date-time - readOnly: true - type: string - updated_at: - description: Datetime when the block was updated. - format: date-time - readOnly: true - type: string - attributes: - description: Represents a list of attributes - items: - $ref: '#/components/schemas/Attribute' - type: array - component_firmware: - description: List of components versions - items: - $ref: '#/components/schemas/Component' - type: array - required: - - name - - uuid - type: object - FirmwareSetList: - description: Represents a list of FirmwareSets - items: - $ref: '#/components/schemas/FirmwareSet' - type: array - FirmwareSetListResponse: - description: Represents collection of Firmware Sets - example: - total_record_count: 5 - records: - - updated_at: 2000-01-23T04:56:07.000+00:00 - name: name - created_at: 2000-01-23T04:56:07.000+00:00 - attributes: - - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - component_firmware: - - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - - updated_at: 2000-01-23T04:56:07.000+00:00 - name: name - created_at: 2000-01-23T04:56:07.000+00:00 - attributes: - - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - component_firmware: - - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - page: 6 - total_pages: 5 - page_count: 1 - page_size: 0 - properties: - page_size: - description: Max number of items returned in a page - type: integer - page: - description: Page returned - type: integer - page_count: - description: Items returned in current page - type: integer - total_pages: - description: Total count of pages - type: integer - total_record_count: - description: Total count of items - type: integer - records: - description: Represents a list of FirmwareSets - items: - $ref: '#/components/schemas/FirmwareSet' - type: array - type: object - FirmwareSetResponse: - description: Represents single Firmware set response - example: - record: - updated_at: 2000-01-23T04:56:07.000+00:00 - name: name - created_at: 2000-01-23T04:56:07.000+00:00 - attributes: - - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - - updated_at: 2000-01-23T04:56:07.000+00:00 - data: - vendor: vendor - model: model - plan: plan - latest: true - namespace: namespace - created_at: 2000-01-23T04:56:07.000+00:00 - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - component_firmware: - - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - - component: bmc - filename: filename - updated_at: 2000-01-23T04:56:07.000+00:00 - vendor: equinix - upstream_url: upstream_url - checksum: checksum - created_at: 2000-01-23T04:56:07.000+00:00 - model: - - romed8hm3 - - romed8hm3 - repository_url: repository_url - uuid: 0516463a-47ee-4809-9a66-ece8c740eed9 - version: 1.5.0 - properties: - record: - $ref: '#/components/schemas/FirmwareSet' - type: object - GlobalBgpRange: - example: - address_family: 6 - project: - href: href - range: range - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - address_family: - type: integer - href: - type: string - id: - format: uuid - type: string - project: - $ref: '#/components/schemas/Href' - range: - type: string - type: object - GlobalBgpRangeList: - example: - global_bgp_ranges: - - address_family: 6 - project: - href: href - range: range - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - address_family: 6 - project: - href: href - range: range - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - global_bgp_ranges: - items: - $ref: '#/components/schemas/GlobalBgpRange' - type: array - type: object - HardwareReservation: - example: - custom_rate: 1050.5 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - switch_uuid: switch_uuid - short_id: short_id - termination_time: 2000-01-23T04:56:07.000+00:00 - provisionable: true - need_of_service: true - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - device: null - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - spare: true - properties: - created_at: - format: date-time - type: string - custom_rate: - description: Amount that will be charged for every billing_cycle. - example: 1050.5 - format: float - type: number - device: - $ref: '#/components/schemas/Device' - facility: - $ref: '#/components/schemas/Facility' - href: - type: string - id: - format: uuid - type: string - need_of_service: - description: Whether this Device requires assistance from Equinix Metal. - type: boolean - plan: - $ref: '#/components/schemas/Plan' - project: - $ref: '#/components/schemas/Project' - provisionable: - description: Whether the reserved server is provisionable or not. Spare - devices can't be provisioned unless they are activated first. - type: boolean - short_id: - description: Short version of the ID. - format: string - type: string - spare: - description: Whether the Hardware Reservation is a spare. Spare Hardware - Reservations are used when a Hardware Reservations requires service from - Equinix Metal - type: boolean - switch_uuid: - description: "Switch short id. This can be used to determine if two devices\ - \ are connected to the same switch, for example." - type: string - termination_time: - description: Expiration date for the reservation. - format: date-time - type: string - type: object - HardwareReservationList: - example: - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - hardware_reservations: - - custom_rate: 1050.5 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - switch_uuid: switch_uuid - short_id: short_id - termination_time: 2000-01-23T04:56:07.000+00:00 - provisionable: true - need_of_service: true - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - device: null - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - spare: true - - custom_rate: 1050.5 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - switch_uuid: switch_uuid - short_id: short_id - termination_time: 2000-01-23T04:56:07.000+00:00 - provisionable: true - need_of_service: true - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - device: null - facility: - features: - - baremetal - - backend_transfer - - global_ipv4 - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - code: code - ip_ranges: - - 2604:1380::/36 - - 147.75.192.0/21 - metro: null - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - spare: true - properties: - hardware_reservations: - items: - $ref: '#/components/schemas/HardwareReservation' - type: array - meta: - $ref: '#/components/schemas/Meta' - type: object - Href: - additionalProperties: false - example: - href: href - properties: - href: - type: string - required: - - href - type: object - IPAddress: - properties: - address_family: - description: Address Family for IP Address - enum: - - 4 - - 6 - example: 4 - format: int32 - type: integer - cidr: - description: "Cidr Size for the IP Block created. Valid values depends on\ - \ the operating system being provisioned. (28..32 for IPv4 addresses,\ - \ 124..127 for IPv6 addresses)" - example: 28 - format: int32 - type: integer - ip_reservations: - description: UUIDs of any IP reservations to use when assigning IPs - items: - type: string - type: array - public: - default: true - description: Address Type for IP Address - example: false - type: boolean - type: object - IPAssignment: - example: - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - properties: - address: - type: string - address_family: - type: integer - assigned_to: - $ref: '#/components/schemas/Href' - cidr: - type: integer - created_at: - format: date-time - type: string - enabled: - type: boolean - gateway: - type: string - global_ip: - type: boolean - href: - type: string - id: - format: uuid - type: string - manageable: - type: boolean - management: - type: boolean - metro: - $ref: '#/components/schemas/IPAssignment_metro' - netmask: - type: string - network: - type: string - parent_block: - $ref: '#/components/schemas/ParentBlock' - public: - type: boolean - state: - description: | - Only set when this is a Metal Gateway Elastic IP Assignment. - - Describes the current configuration state of this IP on the network. - enum: - - pending - - active - - deleting - type: string - next_hop: - description: | - Only set when this is a Metal Gateway Elastic IP Assignment. - - The IP address within the Metal Gateway to which requests to the Elastic IP are forwarded. - format: ipv4 - type: string - type: object - IPAssignmentInput: - example: - address: address - customdata: "{}" - properties: - address: - type: string - customdata: - type: object - required: - - address - type: object - IPAssignmentList: - example: - ip_addresses: - - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - - address: address - parent_block: - netmask: netmask - cidr: 2 - href: href - network: network - created_at: 2000-01-23T04:56:07.000+00:00 - enabled: true - manageable: true - network: network - address_family: 5 - public: true - management: true - netmask: netmask - metro: null - next_hop: next_hop - cidr: 5 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: pending - global_ip: true - gateway: gateway - assigned_to: - href: href - properties: - ip_addresses: - items: - $ref: '#/components/schemas/IPAssignment' - type: array - type: object - IPAvailabilitiesList: - example: - available: - - available - - available - properties: - available: - items: - type: string - type: array - type: object - IPReservation: - additionalProperties: false - properties: - addon: - type: boolean - address: - type: string - address_family: - type: integer - assignments: - items: - $ref: '#/components/schemas/IPAssignment' - type: array - available: - type: string - bill: - type: boolean - cidr: - type: integer - created_at: - format: date-time - type: string - customdata: - type: object - enabled: - type: boolean - details: - type: string - facility: - $ref: '#/components/schemas/IPReservation_facility' - gateway: - type: string - global_ip: - type: boolean - href: - type: string - id: - format: uuid - type: string - manageable: - type: boolean - management: - type: boolean - metal_gateway: - $ref: '#/components/schemas/MetalGatewayLite' - metro: - $ref: '#/components/schemas/IPReservation_metro' - netmask: - type: string - network: - type: string - project: - $ref: '#/components/schemas/Project' - project_lite: - $ref: '#/components/schemas/Href' - requested_by: - $ref: '#/components/schemas/Href' - public: - type: boolean - state: - type: string - tags: - items: - type: string - type: array - type: - enum: - - global_ipv4 - - public_ipv4 - - private_ipv4 - - public_ipv6 - - vrf - type: string - required: - - type - type: object - IPReservationList: - example: - ip_addresses: - - null - - null - properties: - ip_addresses: - items: - $ref: '#/components/schemas/IPReservationList_ip_addresses_inner' - type: array - type: object - IPReservationRequestInput: - properties: - comments: - type: string - customdata: - type: object - details: - type: string - facility: - type: string - fail_on_approval_required: - type: boolean - metro: - description: The code of the metro you are requesting the IP reservation - in. - example: SV - type: string - quantity: - type: integer - tags: - items: - type: string - type: array - type: - type: string - required: - - quantity - - type - type: object - InstancesBatchCreateInput: - example: - batches: - - null - - null - properties: - batches: - items: - $ref: '#/components/schemas/InstancesBatchCreateInput_batches_inner' - type: array - type: object - Interconnection: - example: - description: description - created_at: 2000-01-23T04:56:07.000+00:00 - ports: - - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - type: shared - speed: 10000000000 - contact_email: contact_email - tags: - - tags - - tags - token: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - mode: standard - service_tokens: - - max_allowed_speed: 10000000000 - expires_at: 2000-01-23T04:56:07.000+00:00 - role: primary - service_token_type: a_side - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: inactive - - max_allowed_speed: 10000000000 - expires_at: 2000-01-23T04:56:07.000+00:00 - role: primary - service_token_type: a_side - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: inactive - requested_by: - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - metro: "" - organization: - href: href - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - redundancy: primary - facility: - href: href - status: status - properties: - contact_email: - type: string - description: - type: string - facility: - $ref: '#/components/schemas/Href' - id: - format: uuid - type: string - metro: - allOf: - - $ref: '#/components/schemas/Metro' - description: "The location of where the shared or Dedicated Port is located.\ - \ For interconnections with Dedicated Ports,\n this will be the location\ - \ of the Dedicated Ports. For Fabric VCs (Metal Billed), this is where\ - \ interconnection will be originating from, as we pre-authorize the use\ - \ of one of our shared ports\n as the origin of the interconnection using\ - \ A-Side service tokens. We only allow local connections for Fabric VCs\ - \ (Metal Billed), so the destination location must be the same as the\ - \ origin. For Fabric VCs (Fabric Billed), \n this will be the destination\ - \ of the interconnection. We allow remote connections for Fabric VCs (Fabric\ - \ Billed), so the origin of the interconnection can be a different metro\ - \ set here." - mode: - description: |- - The mode of the interconnection (only relevant to Dedicated Ports). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. - The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. - In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - enum: - - standard - - tunnel - example: standard - type: string - name: - type: string - organization: - $ref: '#/components/schemas/Href' - ports: - description: "For Fabric VCs, these represent Virtual Port(s) created for\ - \ the interconnection. For dedicated interconnections, these represent\ - \ the Dedicated Port(s)." - items: - $ref: '#/components/schemas/InterconnectionPort' - type: array - redundancy: - description: "Either 'primary', meaning a single interconnection, or 'redundant',\ - \ meaning a redundant interconnection." - enum: - - primary - - redundant - type: string - service_tokens: - description: "For Fabric VCs (Metal Billed), this will show details of the\ - \ A-Side service tokens issued for the interconnection. For Fabric VCs\ - \ (Fabric Billed), this will show the details of the Z-Side service tokens\ - \ issued for the interconnection. Dedicated interconnections will not\ - \ have any service tokens issued. There will be one per interconnection,\ - \ so for redundant interconnections, there should be two service tokens\ - \ issued." - items: - $ref: '#/components/schemas/FabricServiceToken' - type: array - speed: - description: "For interconnections on Dedicated Ports and shared connections,\ - \ this represents the interconnection's speed in bps. For Fabric VCs,\ - \ this field refers to the maximum speed of the interconnection in bps.\ - \ This value will default to 10Gbps for Fabric VCs (Fabric Billed)." - example: 10000000000 - type: integer - status: - type: string - tags: - items: - type: string - type: array - token: - description: This token is used for shared interconnections to be used as - the Fabric Token. This field is entirely deprecated. - format: uuid - type: string - type: - description: "The 'shared' type of interconnection refers to shared connections,\ - \ or later also known as Fabric Virtual Connections (or Fabric VCs). The\ - \ 'dedicated' type of interconnection refers to interconnections created\ - \ with Dedicated Ports." - enum: - - shared - - dedicated - type: string - created_at: - format: date-time - type: string - updated_at: - format: date-time - type: string - requested_by: - $ref: '#/components/schemas/Href' - type: object - InterconnectionList: - example: - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - interconnections: - - description: description - created_at: 2000-01-23T04:56:07.000+00:00 - ports: - - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - type: shared - speed: 10000000000 - contact_email: contact_email - tags: - - tags - - tags - token: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - mode: standard - service_tokens: - - max_allowed_speed: 10000000000 - expires_at: 2000-01-23T04:56:07.000+00:00 - role: primary - service_token_type: a_side - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: inactive - - max_allowed_speed: 10000000000 - expires_at: 2000-01-23T04:56:07.000+00:00 - role: primary - service_token_type: a_side - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: inactive - requested_by: - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - metro: "" - organization: - href: href - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - redundancy: primary - facility: - href: href - status: status - - description: description - created_at: 2000-01-23T04:56:07.000+00:00 - ports: - - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - type: shared - speed: 10000000000 - contact_email: contact_email - tags: - - tags - - tags - token: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - mode: standard - service_tokens: - - max_allowed_speed: 10000000000 - expires_at: 2000-01-23T04:56:07.000+00:00 - role: primary - service_token_type: a_side - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: inactive - - max_allowed_speed: 10000000000 - expires_at: 2000-01-23T04:56:07.000+00:00 - role: primary - service_token_type: a_side - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: inactive - requested_by: - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - metro: "" - organization: - href: href - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - redundancy: primary - facility: - href: href - status: status - properties: - interconnections: - items: - $ref: '#/components/schemas/Interconnection' - type: array - meta: - $ref: '#/components/schemas/Meta' - type: object - InterconnectionPort: - example: - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - properties: - id: - format: uuid - type: string - organization: - $ref: '#/components/schemas/Href' - role: - description: Either 'primary' or 'secondary'. - enum: - - primary - - secondary - type: string - status: - description: "For both Fabric VCs and Dedicated Ports, this will be 'requested'\ - \ on creation and 'deleting' on deletion. Once the Fabric VC has found\ - \ its corresponding Fabric connection, this will turn to 'active'. For\ - \ Dedicated Ports, once the dedicated port is associated, this will also\ - \ turn to 'active'. For Fabric VCs, this can turn into an 'expired' state\ - \ if the service token associated is expired." - enum: - - requested - - active - - deleting - - expired - - delete_failed - type: string - switch_id: - description: A switch 'short ID' - type: string - virtual_circuits: - items: - $ref: '#/components/schemas/VirtualCircuit' - type: array - name: - type: string - speed: - type: integer - link_status: - type: string - href: - type: string - type: object - InterconnectionPortList: - example: - ports: - - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - - role: primary - virtual_circuits: - - null - - null - organization: - href: href - name: name - link_status: link_status - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - switch_id: switch_id - href: href - speed: 0 - status: requested - properties: - ports: - items: - $ref: '#/components/schemas/InterconnectionPort' - type: array - type: object - InterconnectionUpdateInput: - example: - mode: standard - name: name - description: description - redundancy: redundancy - contact_email: contact_email - tags: - - tags - - tags - properties: - contact_email: - type: string - description: - type: string - mode: - description: |- - The mode of the interconnection (only relevant to Dedicated Ports). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. - The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. - In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - enum: - - standard - - tunnel - example: standard - type: string - name: - type: string - redundancy: - description: "Updating from 'redundant' to 'primary' will remove a secondary\ - \ port, while updating from 'primary' to 'redundant' will add one." - type: string - tags: - items: - type: string - type: array - type: object - Invitation: - example: - projects: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitation: - href: href - organization: - href: href - roles: - - admin - - admin - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - invited_by: - href: href - nonce: nonce - invitee: invitee - properties: - created_at: - format: date-time - type: string - href: - type: string - id: - format: uuid - type: string - invitation: - $ref: '#/components/schemas/Href' - invited_by: - $ref: '#/components/schemas/Href' - invitee: - format: email - type: string - nonce: - type: string - organization: - $ref: '#/components/schemas/Href' - projects: - items: - $ref: '#/components/schemas/Href' - type: array - roles: - items: - enum: - - admin - - billing - - collaborator - - limited_collaborator - type: string - type: array - updated_at: - format: date-time - type: string - type: object - InvitationInput: - example: - projects_ids: - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - roles: - - admin - - admin - message: message - invitee: invitee - properties: - invitee: - format: email - type: string - message: - type: string - organization_id: - format: uuid - type: string - projects_ids: - items: - format: uuid - type: string - type: array - roles: - items: - enum: - - admin - - billing - - collaborator - - limited_collaborator - type: string - type: array - required: - - invitee - type: object - InvitationList: - example: - invitations: - - updated_at: 2000-01-23T04:56:07.000+00:00 - roles: - - roles - - roles - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - user: - href: href - - updated_at: 2000-01-23T04:56:07.000+00:00 - roles: - - roles - - roles - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - user: - href: href - properties: - invitations: - items: - $ref: '#/components/schemas/Membership' - type: array - type: object - Invoice: - example: - amount: 0.8008282 - target_date: 2000-01-23 - credit_amount: 1.4658129 - project: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - reference_number: reference_number - due_on: 2000-01-23 - number: number - balance: 6.0274563 - created_on: 2000-01-23 - credits_applied: 5.962134 - currency: USD - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - items: - - amount: 5.637377 - unit: unit - description: description - currency: currency - details: details - unit_price: 2.302136 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - - amount: 5.637377 - unit: unit - description: description - currency: currency - details: details - unit_price: 2.302136 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - status: status - properties: - amount: - format: float - type: number - balance: - format: float - type: number - created_on: - format: date - type: string - credit_amount: - format: float - type: number - credits_applied: - format: float - type: number - currency: - example: USD - type: string - due_on: - format: date - type: string - id: - format: uuid - type: string - items: - items: - $ref: '#/components/schemas/LineItem' - type: array - number: - type: string - project: - $ref: '#/components/schemas/ProjectIdName' - reference_number: - type: string - status: - type: string - target_date: - format: date - type: string - type: object - InvoiceList: - example: - invoices: - - amount: 0.8008282 - target_date: 2000-01-23 - credit_amount: 1.4658129 - project: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - reference_number: reference_number - due_on: 2000-01-23 - number: number - balance: 6.0274563 - created_on: 2000-01-23 - credits_applied: 5.962134 - currency: USD - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - items: - - amount: 5.637377 - unit: unit - description: description - currency: currency - details: details - unit_price: 2.302136 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - - amount: 5.637377 - unit: unit - description: description - currency: currency - details: details - unit_price: 2.302136 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - status: status - - amount: 0.8008282 - target_date: 2000-01-23 - credit_amount: 1.4658129 - project: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - reference_number: reference_number - due_on: 2000-01-23 - number: number - balance: 6.0274563 - created_on: 2000-01-23 - credits_applied: 5.962134 - currency: USD - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - items: - - amount: 5.637377 - unit: unit - description: description - currency: currency - details: details - unit_price: 2.302136 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - - amount: 5.637377 - unit: unit - description: description - currency: currency - details: details - unit_price: 2.302136 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - status: status - properties: - invoices: - items: - $ref: '#/components/schemas/Invoice' - type: array - type: object - License: - example: - licensee_product: - href: href - size: 0.8008281904610115 - description: description - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - license_key: license_key - properties: - description: - type: string - id: - format: uuid - type: string - license_key: - type: string - licensee_product: - $ref: '#/components/schemas/Href' - project: - $ref: '#/components/schemas/Href' - size: - type: number - type: object - LicenseCreateInput: - example: - size: 0.8008281904610115 - licensee_product_id: licensee_product_id - description: description - properties: - description: - type: string - licensee_product_id: - type: string - size: - type: number - type: object - LicenseList: - example: - licenses: - - licensee_product: - href: href - size: 0.8008281904610115 - description: description - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - license_key: license_key - - licensee_product: - href: href - size: 0.8008281904610115 - description: description - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - license_key: license_key - properties: - licenses: - items: - $ref: '#/components/schemas/License' - type: array - type: object - LicenseUpdateInput: - example: - size: 0.8008281904610115 - description: description - properties: - description: - type: string - size: - type: number - type: object - LineItem: - example: - amount: 5.637377 - unit: unit - description: description - currency: currency - details: details - unit_price: 2.302136 - plan: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - properties: - amount: - format: float - type: number - currency: - type: string - description: - type: string - details: - type: string - plan: - $ref: '#/components/schemas/Plan' - unit: - type: string - unit_price: - format: float - type: number - type: object - Membership: - example: - updated_at: 2000-01-23T04:56:07.000+00:00 - roles: - - roles - - roles - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - user: - href: href - properties: - created_at: - format: date-time - type: string - href: - type: string - id: - format: uuid - type: string - project: - $ref: '#/components/schemas/Href' - roles: - items: - type: string - type: array - updated_at: - format: date-time - type: string - user: - $ref: '#/components/schemas/Href' - type: object - MembershipInput: - example: - role: - - role - - role - properties: - role: - items: - type: string - type: array - type: object - MembershipList: - example: - memberships: - - updated_at: 2000-01-23T04:56:07.000+00:00 - roles: - - roles - - roles - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - user: - href: href - - updated_at: 2000-01-23T04:56:07.000+00:00 - roles: - - roles - - roles - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - user: - href: href - properties: - memberships: - items: - $ref: '#/components/schemas/Membership' - type: array - type: object - Meta: - example: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - properties: - first: - $ref: '#/components/schemas/Href' - last: - $ref: '#/components/schemas/Href' - next: - $ref: '#/components/schemas/Href' - previous: - $ref: '#/components/schemas/Href' - self: - $ref: '#/components/schemas/Href' - total: - type: integer - current_page: - type: integer - last_page: - type: integer - type: object - Metadata: - example: - switch_short_id: switch_short_id - iqn: iqn - volumes: - - volumes - - volumes - network: - addresses: - - addresses - - addresses - interfaces: - - "{}" - - "{}" - network: - bonding: - link_aggregation: link_aggregation - mode: 0 - mac: mac - tags: - - tags - - tags - specs: "{}" - hostname: hostname - ssh_keys: - - ssh_keys - - ssh_keys - reserved: true - metro: metro - private_subnets: - - private_subnets - - private_subnets - operating_system: "{}" - customdata: - key: "" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: queued - class: class - facility: facility - plan: plan - properties: - class: - type: string - customdata: - additionalProperties: true - default: {} - type: object - facility: - description: The facility code of the instance - type: string - hostname: - type: string - id: - format: uuid - type: string - iqn: - type: string - metro: - description: The metro code of the instance - type: string - network: - $ref: '#/components/schemas/Metadata_network' - operating_system: - type: object - plan: - description: The plan slug of the instance - type: string - private_subnets: - description: An array of the private subnets - items: - type: string - type: array - reserved: - type: boolean - specs: - description: The specs of the plan version of the instance - type: object - ssh_keys: - items: - type: string - type: array - switch_short_id: - type: string - state: - description: "The current state the instance is in.\n\n* When an instance\ - \ is initially created it will be in the `queued` state until it is picked\ - \ up by the provisioner.\n* Once provisioning has begun on the instance\ - \ it's state will move to `provisioning`.\n* When an instance is deleted,\ - \ it will move to `deprovisioning` state until the deprovision is completed\ - \ and the instance state moves to `deleted`.\n* If an instance fails to\ - \ provision or deprovision it will move to `failed` state.\n* Once an\ - \ instance has completed provisioning it will move to `active` state.\n\ - * If an instance is currently powering off or powering on it will move\ - \ to `powering_off` or `powering_on` states respectively. \n* When the\ - \ instance is powered off completely it will move to the `inactive` state.\n\ - * When an instance is powered on completely it will move to the `active`\ - \ state.\n* Using the reinstall action to install a new OS on the instance\ - \ will cause the instance state to change to `reinstalling`.\n* When the\ - \ reinstall action is complete the instance will move to `active` state." - enum: - - queued - - provisioning - - deprovisioning - - reinstalling - - active - - inactive - - failed - - powering_on - - powering_off - - deleted - type: string - tags: - items: - type: string - type: array - volumes: - items: - type: string - type: array - type: object - MetalGateway: - additionalProperties: false - properties: - created_at: - format: date-time - type: string - created_by: - $ref: '#/components/schemas/Href' - href: - type: string - id: - format: uuid - type: string - ip_reservation: - $ref: '#/components/schemas/IPReservationOrHref' - project: - $ref: '#/components/schemas/Project' - state: - description: "The current state of the Metal Gateway. 'Ready' indicates\ - \ the gateway record has been configured, but is currently not active\ - \ on the network. 'Active' indicates the gateway has been configured on\ - \ the network. 'Deleting' is a temporary state used to indicate that the\ - \ gateway is in the process of being un-configured from the network, after\ - \ which the gateway record will be deleted." - enum: - - ready - - active - - deleting - type: string - updated_at: - format: date-time - type: string - virtual_network: - $ref: '#/components/schemas/VirtualNetwork' - type: object - MetalGatewayCreateInput: - properties: - ip_reservation_id: - description: The UUID of an IP reservation that belongs to the same project - as where the metal gateway will be created in. This field is required - unless the private IPv4 subnet size is specified. - format: uuid - type: string - private_ipv4_subnet_size: - description: |- - The subnet size (8, 16, 32, 64, or 128) of the private IPv4 reservation that will be created for the metal gateway. This field is required unless a project IP reservation was specified. - Please keep in mind that the number of private metal gateway ranges are limited per project. If you would like to increase the limit per project, please contact support for assistance. - type: integer - virtual_network_id: - description: The UUID of a metro virtual network that belongs to the same - project as where the metal gateway will be created in. - format: uuid - type: string - required: - - virtual_network_id - type: object - MetalGatewayElasticIpCreateInput: - example: - address: 147.75.234.8/31 - next_hop: 192.168.12.13 - customdata: - key: "" - tags: - - NY - - prod - - public - properties: - address: - description: An IP address (or IP Address range) contained within one of - the project's IP Reservations - example: 147.75.234.8/31 - type: string - next_hop: - description: An IP address contained within the Metal Gateways' IP Reservation - range. - example: 192.168.12.13 - format: ipv4 - type: string - customdata: - additionalProperties: true - description: Optional User-defined JSON object value. - type: object - tags: - description: Optional list of User-defined tags. Can be used by users to - provide additional details or context regarding the purpose or usage of - this resource. - example: - - NY - - prod - - public - items: - type: string - type: array - required: - - address - - next_hop - type: object - MetalGatewayList: - example: - metal_gateways: - - null - - null - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - properties: - metal_gateways: - items: - $ref: '#/components/schemas/MetalGatewayList_metal_gateways_inner' - type: array - meta: - $ref: '#/components/schemas/Meta' - type: object - MetalGatewayLite: - example: - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - properties: - created_at: - format: date-time - type: string - gateway_address: - description: "The gateway address with subnet CIDR value for this Metal\ - \ Gateway. For example, a Metal Gateway using an IP reservation with block\ - \ 10.1.2.0/27 would have a gateway address of 10.1.2.1/27." - example: 10.1.2.1/27 - type: string - href: - type: string - id: - format: uuid - type: string - state: - description: "The current state of the Metal Gateway. 'Ready' indicates\ - \ the gateway record has been configured, but is currently not active\ - \ on the network. 'Active' indicates the gateway has been configured on\ - \ the network. 'Deleting' is a temporary state used to indicate that the\ - \ gateway is in the process of being un-configured from the network, after\ - \ which the gateway record will be deleted." - enum: - - ready - - active - - deleting - type: string - updated_at: - format: date-time - type: string - vlan: - description: The VLAN id of the Virtual Network record associated to this - Metal Gateway. - example: 1001 - type: integer - type: object - Metro: - example: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - code: - type: string - country: - type: string - id: - format: uuid - type: string - name: - type: string - type: object - MetroInput: - properties: - metro: - description: |- - Metro code or ID of where the instance should be provisioned in. - Either metro or facility must be provided. - example: sv - type: string - required: - - metro - type: object - MetroList: - example: - metros: - - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - metros: - items: - $ref: '#/components/schemas/Metro' - type: array - type: object - NewPassword: - example: - new_password: new_password - properties: - new_password: - type: string - type: object - OperatingSystem: - example: - default_operating_system: true - distro: distro - preinstallable: true - licensed: true - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - provisionable_on: - - provisionable_on - - provisionable_on - version: version - pricing: "{}" - slug: slug - distro_label: distro_label - properties: - distro: - type: string - distro_label: - type: string - id: - format: uuid - type: string - licensed: - description: Licenced OS is priced according to pricing property - type: boolean - name: - type: string - preinstallable: - description: Servers can be already preinstalled with OS in order to shorten - provision time. - type: boolean - pricing: - description: This object contains price per time unit and optional multiplier - value if licence price depends on hardware plan or components (e.g. number - of cores) - type: object - provisionable_on: - items: - type: string - type: array - slug: - type: string - version: - type: string - default_operating_system: - description: Default operating system for the distro. - readOnly: true - type: boolean - type: object - OperatingSystemList: - example: - operating_systems: - - default_operating_system: true - distro: distro - preinstallable: true - licensed: true - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - provisionable_on: - - provisionable_on - - provisionable_on - version: version - pricing: "{}" - slug: slug - distro_label: distro_label - - default_operating_system: true - distro: distro - preinstallable: true - licensed: true - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - provisionable_on: - - provisionable_on - - provisionable_on - version: version - pricing: "{}" - slug: slug - distro_label: distro_label - properties: - operating_systems: - items: - $ref: '#/components/schemas/OperatingSystem' - type: array - type: object - Organization: - example: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - address: - $ref: '#/components/schemas/Address' - billing_address: - $ref: '#/components/schemas/Address' - created_at: - format: date-time - type: string - credit_amount: - format: float - type: number - customdata: - type: object - description: - type: string - enforce_2fa_at: - description: "Force to all members to have enabled the two factor authentication\ - \ after that date, unless the value is null" - format: date-time - type: string - id: - format: uuid - type: string - logo: - type: string - members: - items: - $ref: '#/components/schemas/Href' - type: array - memberships: - items: - $ref: '#/components/schemas/Href' - type: array - name: - type: string - projects: - items: - $ref: '#/components/schemas/Href' - type: array - terms: - type: integer - twitter: - type: string - updated_at: - format: date-time - type: string - website: - type: string - type: object - OrganizationInput: - example: - twitter: twitter - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - name: name - description: description - logo: logo - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - customdata: "{}" - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - properties: - address: - $ref: '#/components/schemas/Address' - billing_address: - $ref: '#/components/schemas/Address' - customdata: - type: object - description: - type: string - enforce_2fa_at: - description: "Force to all members to have enabled the two factor authentication\ - \ after that date, unless the value is null" - format: date-time - type: string - logo: - description: The logo for the organization; must be base64-encoded image - data - format: byte - type: string - name: - type: string - twitter: - type: string - website: - type: string - type: object - OrganizationList: - example: - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - organizations: - - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - meta: - $ref: '#/components/schemas/Meta' - organizations: - items: - $ref: '#/components/schemas/Organization' - type: array - type: object - ParentBlock: - example: - netmask: netmask - cidr: 2 - href: href - network: network - properties: - cidr: - type: integer - href: - type: string - netmask: - type: string - network: - type: string - type: object - PaymentMethod: - example: - projects: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - billing_address: - street_address: street_address - country_code_alpha2: country_code_alpha2 - postal_code: postal_code - card_type: card_type - cardholder_name: cardholder_name - type: type - created_by_user: - href: href - expiration_year: expiration_year - default: true - updated_at: 2000-01-23T04:56:07.000+00:00 - organization: - href: href - expiration_month: expiration_month - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - email: email - properties: - billing_address: - $ref: '#/components/schemas/PaymentMethodBillingAddress' - card_type: - type: string - cardholder_name: - type: string - created_at: - format: date-time - type: string - created_by_user: - $ref: '#/components/schemas/Href' - default: - type: boolean - email: - type: string - expiration_month: - type: string - expiration_year: - type: string - id: - format: uuid - type: string - name: - type: string - organization: - $ref: '#/components/schemas/Href' - projects: - items: - $ref: '#/components/schemas/Href' - type: array - type: - type: string - updated_at: - format: date-time - type: string - type: object - PaymentMethodBillingAddress: - example: - street_address: street_address - country_code_alpha2: country_code_alpha2 - postal_code: postal_code - properties: - country_code_alpha2: - type: string - postal_code: - type: string - street_address: - type: string - type: object - PaymentMethodCreateInput: - example: - default: true - name: name - nonce: nonce - properties: - default: - type: boolean - name: - type: string - nonce: - type: string - required: - - name - - nonce - type: object - PaymentMethodList: - example: - payment_methods: - - projects: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - billing_address: - street_address: street_address - country_code_alpha2: country_code_alpha2 - postal_code: postal_code - card_type: card_type - cardholder_name: cardholder_name - type: type - created_by_user: - href: href - expiration_year: expiration_year - default: true - updated_at: 2000-01-23T04:56:07.000+00:00 - organization: - href: href - expiration_month: expiration_month - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - email: email - - projects: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - billing_address: - street_address: street_address - country_code_alpha2: country_code_alpha2 - postal_code: postal_code - card_type: card_type - cardholder_name: cardholder_name - type: type - created_by_user: - href: href - expiration_year: expiration_year - default: true - updated_at: 2000-01-23T04:56:07.000+00:00 - organization: - href: href - expiration_month: expiration_month - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - email: email - properties: - payment_methods: - items: - $ref: '#/components/schemas/PaymentMethod' - type: array - type: object - PaymentMethodUpdateInput: - example: - expiration_year: 0 - default: true - expiration_month: expiration_month - name: name - billing_address: "{}" - cardholder_name: cardholder_name - properties: - billing_address: - type: object - cardholder_name: - type: string - default: - type: boolean - expiration_month: - type: string - expiration_year: - type: integer - name: - type: string - type: object - Plan: - example: - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - properties: - available_in: - description: "Shows which facilities the plan is available in, and the facility-based\ - \ price if it is different from the default price." - items: - $ref: '#/components/schemas/Plan_available_in_inner' - type: array - available_in_metros: - description: "Shows which metros the plan is available in, and the metro-based\ - \ price if it is different from the default price." - items: - $ref: '#/components/schemas/Plan_available_in_metros_inner' - type: array - categories: - description: "Categories of the plan, like compute or storage. A Plan can\ - \ belong to multiple categories." - items: - type: string - type: array - class: - example: m3.large.x86 - type: string - description: - type: string - deployment_types: - items: - enum: - - on_demand - - spot_market - type: string - minItems: 0 - type: array - uniqueItems: true - id: - format: uuid - type: string - legacy: - description: Deprecated. Always return false - type: boolean - x-deprecated: true - line: - type: string - name: - type: string - pricing: - type: object - slug: - example: m3.large.x86 - type: string - specs: - $ref: '#/components/schemas/Plan_specs' - type: - description: The plan type - enum: - - standard - - workload_optimized - - custom - type: string - type: object - PlanList: - example: - plans: - - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - - legacy: true - line: line - available_in_metros: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - description: description - available_in: - - price: - hour: 1.23 - href: href - - price: - hour: 1.23 - href: href - type: standard - specs: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - deployment_types: - - on_demand - - on_demand - name: name - categories: - - categories - - categories - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - class: m3.large.x86 - pricing: "{}" - slug: m3.large.x86 - properties: - plans: - items: - $ref: '#/components/schemas/Plan' - type: array - type: object - Port: - description: Port is a hardware port associated with a reserved or instantiated - hardware device. - example: - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - bond: - $ref: '#/components/schemas/BondPortData' - data: - $ref: '#/components/schemas/PortData' - disbond_operation_supported: - description: Indicates whether or not the bond can be broken on the port - (when applicable). - type: boolean - href: - type: string - id: - format: uuid - type: string - name: - example: bond0 - type: string - type: - description: Type is either "NetworkBondPort" for bond ports or "NetworkPort" - for bondable ethernet ports - enum: - - NetworkPort - - NetworkBondPort - type: string - network_type: - description: Composite network type of the bond - enum: - - layer2-bonded - - layer2-individual - - layer3 - - hybrid - - hybrid-bonded - type: string - native_virtual_network: - $ref: '#/components/schemas/VirtualNetwork' - virtual_networks: - items: - $ref: '#/components/schemas/Href' - type: array - type: object - PortAssignInput: - example: - vnid: "1001" - properties: - vnid: - description: | - Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself. - example: "1001" - type: string - type: object - PortConvertLayer3Input: - example: - request_ips: - - address_family: 0 - public: true - - address_family: 0 - public: true - properties: - request_ips: - items: - $ref: '#/components/schemas/PortConvertLayer3Input_request_ips_inner' - type: array - type: object - PortVlanAssignment: - example: - virtual_network: - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 0 - native: true - port: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - properties: - created_at: - format: date-time - type: string - id: - format: uuid - type: string - native: - type: boolean - port: - $ref: '#/components/schemas/Href' - state: - enum: - - assigned - - unassigning - type: string - updated_at: - format: date-time - type: string - virtual_network: - $ref: '#/components/schemas/Href' - vlan: - type: integer - type: object - PortVlanAssignmentBatch: - example: - quantity: 0 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: queued - error_messages: - - error_messages - - error_messages - vlan_assignments: - - vlan: 6 - native: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - - vlan: 6 - native: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - properties: - created_at: - format: date-time - type: string - error_messages: - items: - type: string - type: array - id: - format: uuid - type: string - port: - $ref: '#/components/schemas/Port' - quantity: - type: integer - state: - enum: - - queued - - in_progress - - completed - - failed - type: string - updated_at: - format: date-time - type: string - vlan_assignments: - items: - $ref: '#/components/schemas/PortVlanAssignmentBatch_vlan_assignments_inner' - type: array - project: - $ref: '#/components/schemas/Href' - type: object - PortVlanAssignmentBatchCreateInput: - example: - vlan_assignments: - - vlan: vlan - native: true - state: assigned - - vlan: vlan - native: true - state: assigned - properties: - vlan_assignments: - items: - $ref: '#/components/schemas/PortVlanAssignmentBatchCreateInput_vlan_assignments_inner' - type: array - type: object - PortVlanAssignmentBatchList: - example: - batches: - - quantity: 0 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: queued - error_messages: - - error_messages - - error_messages - vlan_assignments: - - vlan: 6 - native: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - - vlan: 6 - native: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - - quantity: 0 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - native_virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - disbond_operation_supported: true - data: - bonded: true - mac: mac - name: bond0 - virtual_networks: - - href: href - - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: NetworkPort - network_type: layer2-bonded - bond: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: queued - error_messages: - - error_messages - - error_messages - vlan_assignments: - - vlan: 6 - native: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - - vlan: 6 - native: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - properties: - batches: - items: - $ref: '#/components/schemas/PortVlanAssignmentBatch' - type: array - type: object - PortVlanAssignmentList: - example: - vlan_assignments: - - virtual_network: - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 0 - native: true - port: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - - virtual_network: - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 0 - native: true - port: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - properties: - vlan_assignments: - items: - $ref: '#/components/schemas/PortVlanAssignment' - type: array - type: object - Project: - example: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - properties: - bgp_config: - $ref: '#/components/schemas/Href' - created_at: - format: date-time - type: string - customdata: - type: object - devices: - items: - $ref: '#/components/schemas/Href' - type: array - id: - format: uuid - type: string - invitations: - items: - $ref: '#/components/schemas/Href' - type: array - max_devices: - type: object - members: - items: - $ref: '#/components/schemas/Href' - type: array - memberships: - items: - $ref: '#/components/schemas/Href' - type: array - name: - description: The name of the project. Cannot contain characters encoded - in greater than 3 bytes such as emojis. - maxLength: 80 - minLength: 1 - type: string - network_status: - type: object - organization: - $ref: '#/components/schemas/Organization' - payment_method: - $ref: '#/components/schemas/Href' - ssh_keys: - items: - $ref: '#/components/schemas/Href' - type: array - updated_at: - format: date-time - type: string - volumes: - items: - $ref: '#/components/schemas/Href' - type: array - type: - description: The type of the project. Projects of type `vmce` are part of - an in development feature and not available to all customers. - enum: - - default - - vmce - type: string - tags: - items: - type: string - type: array - type: object - ProjectCreateFromRootInput: - example: - payment_method_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - customdata: "{}" - type: default - tags: - - tags - - tags - properties: - customdata: - type: object - name: - description: The name of the project. Cannot contain characters encoded - in greater than 3 bytes such as emojis. - maxLength: 80 - minLength: 1 - type: string - organization_id: - format: uuid - type: string - payment_method_id: - format: uuid - type: string - type: - description: The type of the project. If no type is specified the project - type will automatically be `default` Projects of type 'vmce' are part - of an in development feature and not available to all customers. - enum: - - default - - vmce - type: string - tags: - items: - type: string - type: array - required: - - name - type: object - ProjectCreateInput: - example: - payment_method_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - customdata: "{}" - type: default - tags: - - tags - - tags - properties: - customdata: - type: object - name: - description: The name of the project. Cannot contain characters encoded - in greater than 3 bytes such as emojis. - maxLength: 80 - minLength: 1 - type: string - payment_method_id: - format: uuid - type: string - type: - description: The type of the project. If no type is specified the project - type will automatically be `default` Projects of type 'vmce' are part - of an in development feature and not available to all customers. - enum: - - default - - vmce - type: string - tags: - items: - type: string - type: array - required: - - name - type: object - ProjectIdName: - example: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - id: - format: uuid - type: string - name: - type: string - type: object - ProjectList: - example: - projects: - - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - properties: - meta: - $ref: '#/components/schemas/Meta' - projects: - items: - $ref: '#/components/schemas/Project' - type: array - type: object - ProjectUpdateInput: - example: - payment_method_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - backend_transfer_enabled: true - customdata: "{}" - tags: - - tags - - tags - properties: - backend_transfer_enabled: - type: boolean - customdata: - type: object - name: - description: The name of the project. Cannot contain characters encoded - in greater than 3 bytes such as emojis. - maxLength: 80 - minLength: 1 - type: string - payment_method_id: - format: uuid - type: string - tags: - items: - type: string - type: array - type: object - ProjectUsage: - example: - total: total - unit: unit - quantity: quantity - plan_version: plan_version - price: price - name: name - type: type - facility: facility - plan: plan - properties: - facility: - type: string - name: - type: string - plan: - type: string - plan_version: - type: string - price: - type: string - quantity: - type: string - total: - type: string - type: - type: string - unit: - type: string - type: object - ProjectUsageList: - example: - usages: - - total: total - unit: unit - quantity: quantity - plan_version: plan_version - price: price - name: name - type: type - facility: facility - plan: plan - - total: total - unit: unit - quantity: quantity - plan_version: plan_version - price: price - name: name - type: type - facility: facility - plan: plan - properties: - usages: - items: - $ref: '#/components/schemas/ProjectUsage' - type: array - type: object - RecoveryCodeList: - example: - recovery_codes: - - recovery_codes - - recovery_codes - properties: - recovery_codes: - items: - type: string - type: array - type: object - SSHKey: - example: - updated_at: 2000-01-23T04:56:07.000+00:00 - fingerprint: fingerprint - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - label: label - entity: - href: href - key: key - tags: - - tags - - tags - properties: - created_at: - format: date-time - type: string - entity: - $ref: '#/components/schemas/Href' - fingerprint: - type: string - href: - type: string - id: - format: uuid - type: string - key: - type: string - label: - type: string - updated_at: - format: date-time - type: string - tags: - items: - type: string - type: array - type: object - SSHKeyCreateInput: - example: - label: label - instances_ids: - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - key: key - tags: - - tags - - tags - properties: - instances_ids: - description: |- - List of instance UUIDs to associate SSH key with, when empty array is sent all instances belonging - to entity will be included - items: - format: uuid - type: string - type: array - key: - type: string - label: - type: string - tags: - items: - type: string - type: array - type: object - SSHKeyInput: - example: - label: label - key: key - tags: - - tags - - tags - properties: - key: - type: string - label: - type: string - tags: - items: - type: string - type: array - type: object - SSHKeyList: - example: - ssh_keys: - - updated_at: 2000-01-23T04:56:07.000+00:00 - fingerprint: fingerprint - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - label: label - entity: - href: href - key: key - tags: - - tags - - tags - - updated_at: 2000-01-23T04:56:07.000+00:00 - fingerprint: fingerprint - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - label: label - entity: - href: href - key: key - tags: - - tags - - tags - properties: - ssh_keys: - items: - $ref: '#/components/schemas/SSHKey' - type: array - type: object - SelfServiceReservationItemRequest: - example: - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - term: term - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - amount: - format: float - type: number - metro_id: - format: uuid - type: string - plan_id: - format: uuid - type: string - quantity: - type: integer - term: - type: string - type: object - SelfServiceReservationItemResponse: - example: - plan_slug: plan_slug - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - metro_code: metro_code - metro_name: metro_name - term: term - id: id - plan_categories: - - plan_categories - - plan_categories - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan_name: plan_name - properties: - amount: - format: float - type: number - id: - type: string - metro_code: - type: string - metro_id: - format: uuid - type: string - metro_name: - type: string - plan_id: - format: uuid - type: string - plan_name: - type: string - plan_slug: - type: string - plan_categories: - items: - type: string - type: array - quantity: - type: integer - term: - type: string - type: object - SelfServiceReservationList: - example: - reservations: - - item: - - plan_slug: plan_slug - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - metro_code: metro_code - metro_name: metro_name - term: term - id: id - plan_categories: - - plan_categories - - plan_categories - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan_name: plan_name - - plan_slug: plan_slug - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - metro_code: metro_code - metro_name: metro_name - term: term - id: id - plan_categories: - - plan_categories - - plan_categories - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan_name: plan_name - period: - unit: monthly - count: 1 - notes: notes - total_cost: 5 - project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - organization: organization - organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - project: project - start_date: 2000-01-23T04:56:07.000+00:00 - status: status - - item: - - plan_slug: plan_slug - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - metro_code: metro_code - metro_name: metro_name - term: term - id: id - plan_categories: - - plan_categories - - plan_categories - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan_name: plan_name - - plan_slug: plan_slug - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - metro_code: metro_code - metro_name: metro_name - term: term - id: id - plan_categories: - - plan_categories - - plan_categories - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan_name: plan_name - period: - unit: monthly - count: 1 - notes: notes - total_cost: 5 - project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - organization: organization - organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - project: project - start_date: 2000-01-23T04:56:07.000+00:00 - status: status - properties: - reservations: - items: - $ref: '#/components/schemas/SelfServiceReservationResponse' - type: array - type: object - SelfServiceReservationResponse: - example: - item: - - plan_slug: plan_slug - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - metro_code: metro_code - metro_name: metro_name - term: term - id: id - plan_categories: - - plan_categories - - plan_categories - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan_name: plan_name - - plan_slug: plan_slug - amount: 0.8008282 - metro_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - quantity: 6 - metro_code: metro_code - metro_name: metro_name - term: term - id: id - plan_categories: - - plan_categories - - plan_categories - plan_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - plan_name: plan_name - period: - unit: monthly - count: 1 - notes: notes - total_cost: 5 - project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - organization: organization - organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - project: project - start_date: 2000-01-23T04:56:07.000+00:00 - status: status - properties: - created_at: - format: date-time - type: string - item: - items: - $ref: '#/components/schemas/SelfServiceReservationItemResponse' - type: array - notes: - type: string - organization: - type: string - organization_id: - format: uuid - type: string - period: - $ref: '#/components/schemas/CreateSelfServiceReservationRequest_period' - project: - type: string - project_id: - format: uuid - type: string - start_date: - format: date-time - type: string - status: - type: string - total_cost: - type: integer - type: object - ServerInfo: - example: - quantity: quantity - metro: metro - facility: facility - plan: plan - properties: - facility: - deprecated: true - type: string - metro: - description: The metro ID or code to check the capacity in. - type: string - plan: - description: The plan ID or slug to check the capacity of. - type: string - quantity: - description: The number of servers to check the capacity of. - type: string - type: object - SpotMarketPricesList: - example: - spot_market_prices: - ord1: - baremetal_1e: - price: 0.8008282 - syd1: - baremetal_1e: - price: 0.8008282 - ams1: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - fra1: - baremetal_1e: - price: 0.8008282 - sin1: - baremetal_1e: - price: 0.8008282 - yyz1: - baremetal_1e: - price: 0.8008282 - sjc1: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - nrt1: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - dfw1: - baremetal_1e: - price: 0.8008282 - iad1: - baremetal_1e: - price: 0.8008282 - atl1: - baremetal_1e: - price: 0.8008282 - sea1: - baremetal_1e: - price: 0.8008282 - lax1: - baremetal_1e: - price: 0.8008282 - ewr1: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - properties: - spot_market_prices: - $ref: '#/components/schemas/SpotPricesReport' - type: object - SpotMarketPricesPerMetroList: - example: - spot_market_prices: - sv: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - sg: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - ch: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - la: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - ny: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - am: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - da: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - properties: - spot_market_prices: - $ref: '#/components/schemas/SpotMarketPricesPerMetroReport' - type: object - SpotMarketPricesPerMetroReport: - example: - sv: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - sg: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - ch: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - la: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - ny: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - am: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - da: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - properties: - am: - $ref: '#/components/schemas/SpotPricesPerFacility' - ch: - $ref: '#/components/schemas/SpotPricesPerFacility' - da: - $ref: '#/components/schemas/SpotPricesPerFacility' - la: - $ref: '#/components/schemas/SpotPricesPerFacility' - ny: - $ref: '#/components/schemas/SpotPricesPerFacility' - sg: - $ref: '#/components/schemas/SpotPricesPerFacility' - sv: - $ref: '#/components/schemas/SpotPricesPerFacility' - type: object - SpotMarketRequest: - example: - end_at: 2000-01-23T04:56:07.000+00:00 - instances: - href: href - metro: null - created_at: 2000-01-23T04:56:07.000+00:00 - devices_min: 6 - project: - href: href - devices_max: 0 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - max_bid_price: 1.4658129 - facilities: - href: href - properties: - created_at: - format: date-time - type: string - devices_max: - type: integer - devices_min: - type: integer - end_at: - format: date-time - type: string - facilities: - $ref: '#/components/schemas/Href' - href: - type: string - id: - format: uuid - type: string - instances: - $ref: '#/components/schemas/Href' - max_bid_price: - format: float - type: number - metro: - $ref: '#/components/schemas/SpotMarketRequest_metro' - project: - $ref: '#/components/schemas/Href' - type: object - SpotMarketRequestCreateInput: - example: - end_at: 2000-01-23T04:56:07.000+00:00 - instance_parameters: - user_ssh_keys: - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - private_ipv4_subnet_size: 1 - description: description - hostnames: - - hostnames - - hostnames - termination_time: 2000-01-23T04:56:07.000+00:00 - project_ssh_keys: - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - tags: - - tags - - tags - features: - - features - - features - userdata: userdata - hostname: hostname - no_ssh_keys: true - public_ipv4_subnet_size: 5 - operating_system: operating_system - always_pxe: true - billing_cycle: billing_cycle - customdata: "{}" - locked: true - plan: plan - metro: metro - devices_min: 6 - devices_max: 0 - max_bid_price: 5.637377 - facilities: - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - devices_max: - type: integer - devices_min: - type: integer - end_at: - format: date-time - type: string - facilities: - deprecated: true - items: - format: uuid - type: string - type: array - instance_parameters: - $ref: '#/components/schemas/SpotMarketRequestCreateInput_instance_parameters' - max_bid_price: - format: float - type: number - metro: - description: The metro ID or code the spot market request will be created - in. - type: string - type: object - SpotMarketRequestList: - example: - spot_market_requests: - - end_at: 2000-01-23T04:56:07.000+00:00 - instances: - href: href - metro: null - created_at: 2000-01-23T04:56:07.000+00:00 - devices_min: 6 - project: - href: href - devices_max: 0 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - max_bid_price: 1.4658129 - facilities: - href: href - - end_at: 2000-01-23T04:56:07.000+00:00 - instances: - href: href - metro: null - created_at: 2000-01-23T04:56:07.000+00:00 - devices_min: 6 - project: - href: href - devices_max: 0 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - max_bid_price: 1.4658129 - facilities: - href: href - properties: - spot_market_requests: - items: - $ref: '#/components/schemas/SpotMarketRequest' - type: array - type: object - SpotPricesDatapoints: - example: - datapoints: - - null - - null - properties: - datapoints: - items: - $ref: '#/components/schemas/SpotPricesDatapointsList' - type: array - type: object - SpotPricesDatapointsList: - items: - type: number - type: array - SpotPricesHistoryReport: - example: - prices_history: - datapoints: - - null - - null - properties: - prices_history: - $ref: '#/components/schemas/SpotPricesDatapoints' - type: object - SpotPricesPerBaremetal: - example: - price: 0.8008282 - properties: - price: - format: float - type: number - type: object - SpotPricesPerFacility: - example: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - properties: - baremetal_0: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - baremetal_1: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - baremetal_2: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - baremetal_2a: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - baremetal_2a2: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - baremetal_3: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - baremetal_s: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - c2.medium.x86: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - m2.xlarge.x86: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - type: object - SpotPricesPerNewFacility: - example: - baremetal_1e: - price: 0.8008282 - properties: - baremetal_1e: - $ref: '#/components/schemas/SpotPricesPerBaremetal' - type: object - SpotPricesReport: - example: - ord1: - baremetal_1e: - price: 0.8008282 - syd1: - baremetal_1e: - price: 0.8008282 - ams1: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - fra1: - baremetal_1e: - price: 0.8008282 - sin1: - baremetal_1e: - price: 0.8008282 - yyz1: - baremetal_1e: - price: 0.8008282 - sjc1: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - nrt1: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - dfw1: - baremetal_1e: - price: 0.8008282 - iad1: - baremetal_1e: - price: 0.8008282 - atl1: - baremetal_1e: - price: 0.8008282 - sea1: - baremetal_1e: - price: 0.8008282 - lax1: - baremetal_1e: - price: 0.8008282 - ewr1: - c2.medium.x86: - price: 0.8008282 - baremetal_2a2: - price: 0.8008282 - m2.xlarge.x86: - price: 0.8008282 - baremetal_1: - price: 0.8008282 - baremetal_0: - price: 0.8008282 - baremetal_2a: - price: 0.8008282 - baremetal_3: - price: 0.8008282 - baremetal_s: - price: 0.8008282 - baremetal_2: - price: 0.8008282 - properties: - ams1: - $ref: '#/components/schemas/SpotPricesPerFacility' - atl1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - dfw1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - ewr1: - $ref: '#/components/schemas/SpotPricesPerFacility' - fra1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - iad1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - lax1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - nrt1: - $ref: '#/components/schemas/SpotPricesPerFacility' - ord1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - sea1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - sin1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - sjc1: - $ref: '#/components/schemas/SpotPricesPerFacility' - syd1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - yyz1: - $ref: '#/components/schemas/SpotPricesPerNewFacility' - type: object - SupportRequestInput: - example: - device_id: device_id - project_id: project_id - subject: subject - message: message - priority: urgent - properties: - device_id: - type: string - message: - type: string - priority: - enum: - - urgent - - high - - medium - - low - type: string - project_id: - type: string - subject: - type: string - required: - - message - - subject - type: object - TransferRequest: - example: - updated_at: 2000-01-23T04:56:07.000+00:00 - target_organization: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - created_at: - format: date-time - type: string - href: - type: string - id: - format: uuid - type: string - project: - $ref: '#/components/schemas/Href' - target_organization: - $ref: '#/components/schemas/Href' - updated_at: - format: date-time - type: string - type: object - TransferRequestInput: - example: - target_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - target_organization_id: - format: uuid - type: string - type: object - TransferRequestList: - example: - transfers: - - updated_at: 2000-01-23T04:56:07.000+00:00 - target_organization: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - updated_at: 2000-01-23T04:56:07.000+00:00 - target_organization: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - project: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - transfers: - items: - $ref: '#/components/schemas/TransferRequest' - type: array - type: object - UpdateEmailInput: - example: - default: true - properties: - default: - type: boolean - type: object - User: - example: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - properties: - avatar_thumb_url: - type: string - avatar_url: - type: string - created_at: - format: date-time - type: string - customdata: - type: object - default_organization_id: - format: uuid - type: string - default_project_id: - format: uuid - type: string - email: - type: string - emails: - items: - $ref: '#/components/schemas/Href' - type: array - first_name: - type: string - fraud_score: - type: string - full_name: - type: string - href: - type: string - id: - format: uuid - type: string - last_login_at: - format: date-time - type: string - last_name: - type: string - max_organizations: - type: integer - max_projects: - type: integer - phone_number: - type: string - short_id: - type: string - timezone: - type: string - two_factor_auth: - type: string - updated_at: - format: date-time - type: string - type: object - UserCreateInput: - example: - invitation_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - level: level - timezone: timezone - last_name: last_name - avatar: "" - title: title - nonce: nonce - emails: - - default: true - address: address - - default: true - address: address - social_accounts: "{}" - password: password - verified_at: 2000-01-23T04:56:07.000+00:00 - company_name: company_name - company_url: company_url - phone_number: phone_number - customdata: "{}" - first_name: first_name - two_factor_auth: two_factor_auth - properties: - avatar: - format: binary - type: string - company_name: - type: string - company_url: - type: string - customdata: - type: object - emails: - items: - $ref: '#/components/schemas/EmailInput' - type: array - first_name: - type: string - last_name: - type: string - level: - type: string - password: - type: string - phone_number: - type: string - social_accounts: - type: object - timezone: - type: string - title: - type: string - two_factor_auth: - type: string - verified_at: - format: date-time - type: string - invitation_id: - format: uuid - type: string - nonce: - type: string - required: - - emails - - first_name - - last_name - type: object - Userdata: - example: - userdata: userdata - properties: - userdata: - type: string - type: object - UserLimited: - example: - avatar_thumb_url: avatar_thumb_url - full_name: full_name - avatar_url: avatar_url - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - avatar_thumb_url: - description: Avatar thumbnail URL of the User - type: string - avatar_url: - description: Avatar URL of the User - type: string - full_name: - description: Full name of the User - type: string - href: - description: API URL uniquely representing the User - type: string - id: - description: ID of the User - format: uuid - type: string - required: - - id - type: object - UserList: - example: - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - users: - - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - properties: - meta: - $ref: '#/components/schemas/Meta' - users: - items: - $ref: '#/components/schemas/User' - type: array - type: object - UserLite: - properties: - avatar_thumb_url: - description: Avatar thumbnail URL of the User - type: string - created_at: - description: When the user was created - format: date-time - type: string - email: - description: Primary email address of the User - type: string - first_name: - description: First name of the User - type: string - full_name: - description: Full name of the User - type: string - href: - description: API URL uniquely representing the User - type: string - id: - description: ID of the User - format: uuid - type: string - last_name: - description: Last name of the User - type: string - short_id: - description: Short ID of the User - type: string - updated_at: - description: When the user details were last updated - format: date-time - type: string - required: - - id - - short_id - type: object - UserUpdateInput: - example: - password: password - timezone: timezone - last_name: last_name - phone_number: phone_number - customdata: "{}" - first_name: first_name - properties: - customdata: - type: object - first_name: - type: string - last_name: - type: string - password: - type: string - phone_number: - type: string - timezone: - type: string - type: object - VerifyEmail: - example: - user_token: user_token - properties: - user_token: - description: User verification token - type: string - writeOnly: true - required: - - user_token - type: object - VirtualCircuit: - oneOf: - - $ref: '#/components/schemas/VlanVirtualCircuit' - - $ref: '#/components/schemas/VrfVirtualCircuit' - VirtualCircuitCreateInput: - oneOf: - - $ref: '#/components/schemas/VlanVirtualCircuitCreateInput' - - $ref: '#/components/schemas/VrfVirtualCircuitCreateInput' - VirtualCircuitList: - example: - virtual_circuits: - - null - - null - properties: - virtual_circuits: - items: - $ref: '#/components/schemas/VirtualCircuit' - type: array - type: object - VirtualCircuitUpdateInput: - oneOf: - - $ref: '#/components/schemas/VlanVirtualCircuitUpdateInput' - - $ref: '#/components/schemas/VrfVirtualCircuitUpdateInput' - VirtualNetwork: - example: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - properties: - assigned_to: - $ref: '#/components/schemas/Href' - assigned_to_virtual_circuit: - description: True if the virtual network is attached to a virtual circuit. - False if not. - type: boolean - description: - type: string - facility: - $ref: '#/components/schemas/Href' - href: - type: string - id: - format: uuid - type: string - instances: - description: A list of instances with ports currently associated to this - Virtual Network. - items: - $ref: '#/components/schemas/Href' - type: array - metal_gateways: - description: A list of metal gateways currently associated to this Virtual - Network. - items: - $ref: '#/components/schemas/MetalGatewayLite' - type: array - metro: - $ref: '#/components/schemas/Href' - metro_code: - description: The Metro code of the metro in which this Virtual Network is - defined. - type: string - vxlan: - type: integer - tags: - items: - type: string - type: array - type: object - VirtualNetworkCreateInput: - example: - vxlan: 1099 - metro: metro - description: description - facility: facility - tags: - - tags - - tags - properties: - description: - type: string - facility: - deprecated: true - description: The UUID (or facility code) for the Facility in which to create - this Virtual network. - type: string - metro: - description: The UUID (or metro code) for the Metro in which to create this - Virtual Network. - type: string - vxlan: - description: "VLAN ID between 2-3999. Must be unique for the project within\ - \ the Metro in which this Virtual Network is being created. If no value\ - \ is specified, the next-available VLAN ID in the range 1000-1999 will\ - \ be automatically selected." - example: 1099 - type: integer - tags: - items: - type: string - type: array - type: object - VirtualNetworkList: - example: - virtual_networks: - - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - properties: - virtual_networks: - items: - $ref: '#/components/schemas/VirtualNetwork' - type: array - type: object - VlanFabricVcCreateInput: - properties: - contact_email: - description: The preferred email used for communication and notifications - about the Equinix Fabric interconnection. Required when using a Project - API key. Optional and defaults to the primary user email address when - using a User API key. - format: email - type: string - description: - type: string - metro: - description: "A Metro ID or code. When creating Fabric VCs (Metal Billed),\ - \ this is where interconnection will be originating from, as we pre-authorize\ - \ the use of one of our shared ports as the origin of the interconnection\ - \ using A-Side service tokens. We only allow local connections for Fabric\ - \ VCs (Metal Billed), so the destination location must be the same as\ - \ the origin. For Fabric VCs (Fabric Billed), or shared connections, this\ - \ will be the destination of the interconnection. We allow remote connections\ - \ for Fabric VCs (Fabric Billed), so the origin of the interconnection\ - \ can be a different metro set here." - type: string - name: - type: string - project: - type: string - redundancy: - description: Either 'primary' or 'redundant'. - type: string - service_token_type: - description: "Either 'a_side' or 'z_side'. Setting this field to 'a_side'\ - \ will create an interconnection with Fabric VCs (Metal Billed). Setting\ - \ this field to 'z_side' will create an interconnection with Fabric VCs\ - \ (Fabric Billed). This is required when the 'type' is 'shared', but this\ - \ is not applicable when the 'type' is 'dedicated'. This parameter is\ - \ included in the specification as a developer preview and is generally\ - \ unavailable. Please contact our Support team for more details." - enum: - - a_side - - z_side - example: a_side - type: string - speed: - description: "A interconnection speed, in bps, mbps, or gbps. For Fabric\ - \ VCs, this represents the maximum speed of the interconnection. For Fabric\ - \ VCs (Metal Billed), this can only be one of the following: \n''50mbps'',\ - \ ''200mbps'', ''500mbps'', ''1gbps'', ''2gbps'', ''5gbps'' or ''10gbps'',\ - \ and is required for creation. For Fabric VCs (Fabric Billed), this field\ - \ will always default to ''10gbps'' even if it is not provided.\nFor example,\ - \ ''500000000'', ''50m'', or' ''500mbps'' will all work as valid inputs." - example: 10000000000 - type: integer - tags: - items: - type: string - type: array - type: - description: "When requesting for a Fabric VC, the value of this field should\ - \ be 'shared'." - enum: - - shared - type: string - vlans: - description: "A list of one or two metro-based VLANs that will be set on\ - \ the virtual circuits of primary and/or secondary (if redundant) interconnections\ - \ respectively when creating Fabric VCs. VLANs can also be set after the\ - \ interconnection is created, but are required to fully activate the virtual\ - \ circuits." - example: - - 1000 - - 1001 - items: - type: integer - type: array - required: - - metro - - name - - redundancy - - service_token_type - - type - type: object - VlanVirtualCircuit: - properties: - bill: - default: false - description: "True if the Virtual Circuit is being billed. Currently, only\ - \ Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage\ - \ will start the first time the Virtual Circuit becomes active, and will\ - \ not stop until it is deleted from Metal." - type: boolean - description: - type: string - id: - format: uuid - type: string - name: - type: string - nni_vlan: - type: integer - port: - $ref: '#/components/schemas/Href' - project: - $ref: '#/components/schemas/Href' - speed: - description: "For Virtual Circuits on shared and dedicated connections,\ - \ this speed should match the one set on their Interconnection Ports.\ - \ For Virtual Circuits on Fabric VCs (both Metal and Fabric Billed) that\ - \ have found their corresponding Fabric connection, this is the actual\ - \ speed of the interconnection that was configured when setting up the\ - \ interconnection on the Fabric Portal. Details on Fabric VCs are included\ - \ in the specification as a developer preview and is generally unavailable.\ - \ Please contact our Support team for more details." - type: integer - status: - description: "The status of a Virtual Circuit is always 'pending' on creation.\ - \ The status can turn to 'Waiting on Customer VLAN' if a Metro VLAN was\ - \ not set yet on the Virtual Circuit and is the last step needed for full\ - \ activation. For Dedicated interconnections, as long as the Dedicated\ - \ Port has been associated to the Virtual Circuit and a NNI VNID has been\ - \ set, it will turn to 'waiting_on_customer_vlan'. For Fabric VCs, it\ - \ will only change to 'waiting_on_customer_vlan' once the corresponding\ - \ Fabric connection has been found on the Fabric side. If the Fabric service\ - \ token associated with the Virtual Circuit hasn't been redeemed on Fabric\ - \ within the expiry time, it will change to an `expired` status. Once\ - \ a Metro VLAN is set on the Virtual Circuit (which for Fabric VCs, can\ - \ be set on creation of a Fabric VC) and the necessary set up is done,\ - \ it will turn into 'Activating' status as it tries to activate the Virtual\ - \ Circuit. Once the Virtual Circuit fully activates and is configured\ - \ on the switch, it will turn to staus 'active'. For Fabric VCs (Metal\ - \ Billed), we will start billing the moment the status of the Virtual\ - \ Circuit turns to 'active'. If there are any changes to the VLAN after\ - \ the Virtual Circuit is in an 'active' status, the status will show 'changing_vlan'\ - \ if a new VLAN has been provided, or 'deactivating' if we are removing\ - \ the VLAN. When a deletion request is issued for the Virtual Circuit,\ - \ it will move to a 'deleting' status, and we will immediately unconfigure\ - \ the switch for the Virtual Circuit and issue a deletion on any associated\ - \ Fabric connections. Any associated Metro VLANs on the virtual circuit\ - \ will also be unassociated after the switch has been successfully unconfigured.\ - \ If there are any associated Fabric connections, we will only fully delete\ - \ the Virtual Circuit once we have checked that the Fabric connection\ - \ was fully deprovisioned on Fabric." - enum: - - pending - - waiting_on_customer_vlan - - activating - - changing_vlan - - deactivating - - deleting - - active - - expired - - activation_failed - - changing_vlan_failed - - deactivation_failed - - delete_failed - type: string - tags: - items: - type: string - type: array - type: - $ref: '#/components/schemas/VlanVirtualCircuitType' - virtual_network: - $ref: '#/components/schemas/Href' - vnid: - type: integer - created_at: - format: date-time - type: string - updated_at: - format: date-time - type: string - type: object - VlanVirtualCircuitCreateInput: - properties: - description: - type: string - name: - type: string - nni_vlan: - maximum: 4094 - minimum: 2 - type: integer - project_id: - format: uuid - type: string - speed: - description: speed can be passed as integer number representing bps speed - or string (e.g. '52m' or '100g' or '4 gbps') - type: integer - tags: - items: - type: string - type: array - vnid: - description: A Virtual Network record UUID or the VNID of a Metro Virtual - Network in your project (sent as integer). - format: uuid - type: string - required: - - project_id - type: object - VlanVirtualCircuitUpdateInput: - properties: - description: - type: string - name: - type: string - speed: - description: Speed can be changed only if it is an interconnection on a - Dedicated Port - type: string - tags: - items: - type: string - type: array - vnid: - description: A Virtual Network record UUID or the VNID of a Metro Virtual - Network in your project. - type: string - type: object - Vrf: - example: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - properties: - id: - format: uuid - type: string - name: - type: string - description: - description: Optional field that can be set to describe the VRF - type: string - bill: - default: false - description: "True if the VRF is being billed. Usage will start when the\ - \ first VRF Virtual Circuit is active, and will only stop when the VRF\ - \ has been deleted." - type: boolean - bgp_dynamic_neighbors_enabled: - description: Toggle to enable the dynamic bgp neighbors feature on the VRF - type: boolean - bgp_dynamic_neighbors_export_route_map: - description: Toggle to export the VRF route-map to the dynamic bgp neighbors - type: boolean - bgp_dynamic_neighbors_bfd_enabled: - description: Toggle BFD on dynamic bgp neighbors sessions - type: boolean - local_asn: - description: A 4-byte ASN associated with the VRF. - format: int32 - type: integer - virtual_circuits: - description: Virtual circuits that are in the VRF - items: - $ref: '#/components/schemas/VrfVirtualCircuit' - type: array - ip_ranges: - description: "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"\ - 2001:d78::/56\"]." - items: - type: string - type: array - project: - $ref: '#/components/schemas/Project' - metro: - $ref: '#/components/schemas/Metro' - created_by: - $ref: '#/components/schemas/User' - href: - type: string - created_at: - format: date-time - type: string - updated_at: - format: date-time - type: string - tags: - items: - type: string - type: array - type: object - VrfCreateInput: - example: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - ip_ranges: - - ip_ranges - - ip_ranges - local_asn: 0 - metro: metro - name: name - bgp_dynamic_neighbors_enabled: true - description: description - tags: - - tags - - tags - properties: - bgp_dynamic_neighbors_enabled: - description: Toggle to enable the dynamic bgp neighbors feature on the VRF - type: boolean - bgp_dynamic_neighbors_export_route_map: - description: Toggle to export the VRF route-map to the dynamic bgp neighbors - type: boolean - bgp_dynamic_neighbors_bfd_enabled: - description: Toggle BFD on dynamic bgp neighbors sessions - type: boolean - description: - type: string - ip_ranges: - description: "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"\ - 2001:d78::/56\"]. IPv4 blocks must be between /8 and /29 in size. IPv6\ - \ blocks must be between /56 and /64. A VRF\\'s IP ranges must be defined\ - \ in order to create VRF IP Reservations, which can then be used for Metal\ - \ Gateways or Virtual Circuits." - items: - type: string - type: array - local_asn: - format: int32 - type: integer - metro: - description: The UUID (or metro code) for the Metro in which to create this - VRF. - type: string - name: - type: string - tags: - items: - type: string - type: array - required: - - metro - - name - type: object - VrfFabricVcCreateInput: - properties: - contact_email: - description: The preferred email used for communication and notifications - about the Equinix Fabric interconnection. Required when using a Project - API key. Optional and defaults to the primary user email address when - using a User API key. - format: email - type: string - description: - type: string - metro: - description: "A Metro ID or code. When creating Fabric VCs (Metal Billed),\ - \ this is where interconnection will be originating from, as we pre-authorize\ - \ the use of one of our shared ports as the origin of the interconnection\ - \ using A-Side service tokens. We only allow local connections for Fabric\ - \ VCs (Metal Billed), so the destination location must be the same as\ - \ the origin. For Fabric VCs (Fabric Billed), or shared connections, this\ - \ will be the destination of the interconnection. We allow remote connections\ - \ for Fabric VCs (Fabric Billed), so the origin of the interconnection\ - \ can be a different metro set here." - type: string - name: - type: string - project: - type: string - redundancy: - description: Either 'primary' or 'redundant'. - type: string - service_token_type: - description: "Either 'a_side' or 'z_side'. Setting this field to 'a_side'\ - \ will create an interconnection with Fabric VCs (Metal Billed). Setting\ - \ this field to 'z_side' will create an interconnection with Fabric VCs\ - \ (Fabric Billed). This is required when the 'type' is 'shared', but this\ - \ is not applicable when the 'type' is 'dedicated'. This parameter is\ - \ included in the specification as a developer preview and is generally\ - \ unavailable. Please contact our Support team for more details." - enum: - - a_side - - z_side - example: a_side - type: string - speed: - description: "A interconnection speed, in bps, mbps, or gbps. For Fabric\ - \ VCs, this represents the maximum speed of the interconnection. For Fabric\ - \ VCs (Metal Billed), this can only be one of the following: \n''50mbps'',\ - \ ''200mbps'', ''500mbps'', ''1gbps'', ''2gbps'', ''5gbps'' or ''10gbps'',\ - \ and is required for creation. For Fabric VCs (Fabric Billed), this field\ - \ will always default to ''10gbps'' even if it is not provided.\nFor example,\ - \ ''500000000'', ''50m'', or' ''500mbps'' will all work as valid inputs." - example: 10000000000 - type: integer - tags: - items: - type: string - type: array - type: - description: "When requesting for a Fabric VC, the value of this field should\ - \ be 'shared'." - enum: - - shared - type: string - vrfs: - description: "This field holds a list of VRF UUIDs that will be set automatically\ - \ on the virtual circuits of Fabric VCs on creation, and can hold up to\ - \ two UUIDs. Two UUIDs are required when requesting redundant Fabric VCs.\ - \ The first UUID will be set on the primary virtual circuit, while the\ - \ second UUID will be set on the secondary. The two UUIDs can be the same\ - \ if both the primary and secondary virtual circuits will be in the same\ - \ VRF. This parameter is included in the specification as a developer\ - \ preview and is generally unavailable. Please contact our Support team\ - \ for more details." - items: - format: uuid - type: string - type: array - required: - - metro - - name - - redundancy - - service_token_type - - type - - vrfs - type: object - VrfIpRangeCreateInput: - description: "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"\ - ]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between\ - \ /56 and /64. A VRF\\'s IP ranges must be defined in order to create VRF\ - \ IP Reservations, which can then be used for Metal Gateways or Virtual Circuits." - items: - type: string - type: array - VrfIpRangeList: - description: "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"\ - ]." - items: - type: string - type: array - VrfIpRangeUpdateInput: - description: "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"\ - ]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between\ - \ /56 and /64. A VRF\\'s IP ranges must be defined in order to create VRF\ - \ IP Reservations, which can then be used for Metal Gateways or Virtual Circuits.\ - \ Adding a new CIDR address to the list will result in the creation of a new\ - \ IP Range for this VRF. Removal of an existing CIDR address from the list\ - \ will result in the deletion of an existing IP Range for this VRF. Deleting\ - \ an IP Range will result in the deletion of any VRF IP Reservations contained\ - \ within the IP Range, as well as the VRF IP Reservation\\'s associated Metal\ - \ Gateways or Virtual Circuits. If you do not wish to add or remove IP Ranges,\ - \ either include the full existing list of IP Ranges in the update request,\ - \ or do not specify the `ip_ranges` field in the update request. Specifying\ - \ a value of `[]` will remove all existing IP Ranges from the VRF." - items: - type: string - type: array - VrfIpReservation: - example: - address: address - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - bill: true - project_lite: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - type: vrf - created_by: - href: href - network: network - tags: - - tags - - tags - manageable: true - metal_gateway: - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - address_family: 0 - public: true - netmask: netmask - management: true - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - cidr: 6 - details: details - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - customdata: "{}" - gateway: gateway - properties: - address_family: - type: integer - cidr: - type: integer - created_at: - format: date-time - type: string - created_by: - $ref: '#/components/schemas/Href' - details: - type: string - href: - type: string - id: - format: uuid - type: string - metal_gateway: - $ref: '#/components/schemas/MetalGatewayLite' - netmask: - type: string - network: - type: string - project: - $ref: '#/components/schemas/Project' - state: - type: string - tags: - items: - type: string - type: array - type: - enum: - - vrf - type: string - vrf: - $ref: '#/components/schemas/Vrf' - public: - type: boolean - management: - type: boolean - manageable: - type: boolean - customdata: - type: object - bill: - type: boolean - project_lite: - $ref: '#/components/schemas/Project' - address: - type: string - gateway: - type: string - metro: - $ref: '#/components/schemas/Metro' - required: - - type - - vrf - type: object - VrfIpReservationCreateInput: - properties: - cidr: - description: The size of the VRF IP Reservation's subnet - example: 16 - type: integer - customdata: - type: object - details: - type: string - network: - description: The starting address for this VRF IP Reservation's subnet - example: 10.1.2.0 - type: string - tags: - items: - type: string - type: array - type: - description: Must be set to 'vrf' - example: vrf - type: string - vrf_id: - description: The ID of the VRF in which this VRF IP Reservation is created. - The VRF must have an existing IP Range that contains the requested subnet. - This field may be aliased as just 'vrf'. - format: uuid - type: string - required: - - cidr - - network - - type - - vrf_id - type: object - VrfIpReservationList: - example: - ip_addresses: - - address: address - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - bill: true - project_lite: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - type: vrf - created_by: - href: href - network: network - tags: - - tags - - tags - manageable: true - metal_gateway: - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - address_family: 0 - public: true - netmask: netmask - management: true - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - cidr: 6 - details: details - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - customdata: "{}" - gateway: gateway - - address: address - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - bill: true - project_lite: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - type: vrf - created_by: - href: href - network: network - tags: - - tags - - tags - manageable: true - metal_gateway: - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - address_family: 0 - public: true - netmask: netmask - management: true - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - cidr: 6 - details: details - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: state - customdata: "{}" - gateway: gateway - properties: - ip_addresses: - items: - $ref: '#/components/schemas/VrfIpReservation' - type: array - type: object - VrfList: - example: - vrfs: - - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - properties: - vrfs: - items: - $ref: '#/components/schemas/Vrf' - type: array - type: object - VrfMetalGateway: - example: - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - ip_reservation: null - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - created_by: - href: href - properties: - created_at: - format: date-time - type: string - created_by: - $ref: '#/components/schemas/Href' - href: - type: string - id: - format: uuid - type: string - ip_reservation: - $ref: '#/components/schemas/VrfIpReservationOrHref' - project: - $ref: '#/components/schemas/Project' - state: - description: "The current state of the Metal Gateway. 'Ready' indicates\ - \ the gateway record has been configured, but is currently not active\ - \ on the network. 'Active' indicates the gateway has been configured on\ - \ the network. 'Deleting' is a temporary state used to indicate that the\ - \ gateway is in the process of being un-configured from the network, after\ - \ which the gateway record will be deleted." - enum: - - ready - - active - - deleting - type: string - updated_at: - format: date-time - type: string - virtual_network: - $ref: '#/components/schemas/VirtualNetwork' - vrf: - $ref: '#/components/schemas/Vrf' - required: - - vrf - type: object - VrfMetalGatewayCreateInput: - properties: - ip_reservation_id: - description: "The UUID an a VRF IP Reservation that belongs to the same\ - \ project as the one in which the Metal Gateway is to be created. Additionally,\ - \ the VRF IP Reservation and the Virtual Network must reside in the same\ - \ Metro." - format: uuid - type: string - virtual_network_id: - description: "THe UUID of a Metro Virtual Network that belongs to the same\ - \ project as the one in which the Metal Gateway is to be created. Additionally,\ - \ the Virtual Network and the VRF IP Reservation must reside in the same\ - \ metro." - format: uuid - type: string - required: - - ip_reservation_id - - virtual_network_id - type: object - VrfRoute: - example: - metal_gateway: - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - ip_reservation: null - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - created_by: - href: href - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - prefix: 0.0.0.0/0 - next_hop: 192.168.1.254 - created_at: 2000-01-23T04:56:07.000+00:00 - id: e1ff9c2b-051a-4688-965f-153e274f77e0 - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - href: /routes/e1ff9c2b-051a-4688-965f-153e274f77e0 - type: static - status: active - tags: - - tags - - tags - properties: - id: - description: The unique identifier for the newly-created resource - example: e1ff9c2b-051a-4688-965f-153e274f77e0 - format: uuid - readOnly: true - type: string - status: - description: "The status of the route. Potential values are \"pending\"\ - , \"active\", \"deleting\", and \"error\", representing various lifecycle\ - \ states of the route and whether or not it has been successfully configured\ - \ on the network" - enum: - - pending - - active - - deleting - - error - example: active - readOnly: true - type: string - prefix: - description: "The IPv4 prefix for the route, in CIDR-style notation" - example: 0.0.0.0/0 - type: string - next_hop: - description: The next-hop IPv4 address for the route - example: 192.168.1.254 - format: ipv4 - type: string - type: - description: "VRF route type, like 'bgp', 'connected', and 'static'. Currently,\ - \ only static routes are supported" - enum: - - static - example: static - readOnly: true - type: string - created_at: - format: date-time - readOnly: true - type: string - updated_at: - format: date-time - readOnly: true - type: string - metal_gateway: - $ref: '#/components/schemas/VrfMetalGateway' - virtual_network: - $ref: '#/components/schemas/VirtualNetwork' - vrf: - $ref: '#/components/schemas/Vrf' - href: - example: /routes/e1ff9c2b-051a-4688-965f-153e274f77e0 - readOnly: true - type: string - tags: - items: - type: string - type: array - type: object - VrfRouteCreateInput: - example: - prefix: 0.0.0.0/0 - next_hop: 192.168.1.254 - tags: - - tags - - tags - properties: - prefix: - description: "The IPv4 prefix for the route, in CIDR-style notation. For\ - \ a static default route, this will always be \"0.0.0.0/0\"" - example: 0.0.0.0/0 - type: string - next_hop: - description: The IPv4 address within the VRF of the host that will handle - this route - example: 192.168.1.254 - format: ipv4 - type: string - tags: - items: - type: string - type: array - required: - - next_hop - - prefix - type: object - VrfRouteUpdateInput: - example: - prefix: 0.0.0.0/0 - next_hop: 192.168.1.254 - tags: - - tags - - tags - properties: - prefix: - description: "The IPv4 prefix for the route, in CIDR-style notation. For\ - \ a static default route, this will always be \"0.0.0.0/0\"" - example: 0.0.0.0/0 - type: string - next_hop: - description: The IPv4 address within the VRF of the host that will handle - this route - example: 192.168.1.254 - format: ipv4 - type: string - tags: - items: - type: string - type: array - type: object - VrfRouteList: - example: - routes: - - metal_gateway: - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - ip_reservation: null - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - created_by: - href: href - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - prefix: 0.0.0.0/0 - next_hop: 192.168.1.254 - created_at: 2000-01-23T04:56:07.000+00:00 - id: e1ff9c2b-051a-4688-965f-153e274f77e0 - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - href: /routes/e1ff9c2b-051a-4688-965f-153e274f77e0 - type: static - status: active - tags: - - tags - - tags - - metal_gateway: - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - ip_reservation: null - created_at: 2000-01-23T04:56:07.000+00:00 - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - created_by: - href: href - virtual_network: - vxlan: 1 - metal_gateways: - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - - gateway_address: 10.1.2.1/27 - updated_at: 2000-01-23T04:56:07.000+00:00 - vlan: 1001 - created_at: 2000-01-23T04:56:07.000+00:00 - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: ready - metro_code: metro_code - instances: - - href: href - - href: href - metro: - href: href - description: description - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - facility: - href: href - assigned_to_virtual_circuit: true - assigned_to: - href: href - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - prefix: 0.0.0.0/0 - next_hop: 192.168.1.254 - created_at: 2000-01-23T04:56:07.000+00:00 - id: e1ff9c2b-051a-4688-965f-153e274f77e0 - vrf: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - local_asn: 5 - description: description - bill: false - bgp_dynamic_neighbors_enabled: true - project: - devices: - - href: href - - href: href - volumes: - - href: href - - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - type: default - memberships: - - href: href - - href: href - bgp_config: - href: href - tags: - - tags - - tags - max_devices: "{}" - ssh_keys: - - href: href - - href: href - updated_at: 2000-01-23T04:56:07.000+00:00 - invitations: - - href: href - - href: href - members: - - href: href - - href: href - organization: - website: website - address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - projects: - - href: href - - href: href - credit_amount: 0.8008282 - created_at: 2000-01-23T04:56:07.000+00:00 - description: description - billing_address: - country: country - address: address - address2: address2 - city: city - coordinates: - latitude: latitude - longitude: longitude - state: state - zip_code: zip_code - memberships: - - href: href - - href: href - enforce_2fa_at: 2000-01-23T04:56:07.000+00:00 - twitter: twitter - updated_at: 2000-01-23T04:56:07.000+00:00 - terms: 6 - members: - - href: href - - href: href - name: name - logo: logo - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - network_status: "{}" - customdata: "{}" - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - payment_method: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - created_by: - avatar_thumb_url: avatar_thumb_url - last_login_at: 2000-01-23T04:56:07.000+00:00 - max_projects: 3 - timezone: timezone - default_project_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - created_at: 2000-01-23T04:56:07.000+00:00 - last_name: last_name - short_id: short_id - fraud_score: fraud_score - emails: - - href: href - - href: href - default_organization_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - full_name: full_name - avatar_url: avatar_url - updated_at: 2000-01-23T04:56:07.000+00:00 - phone_number: phone_number - customdata: "{}" - href: href - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - first_name: first_name - max_organizations: 9 - two_factor_auth: two_factor_auth - email: email - tags: - - tags - - tags - updated_at: 2000-01-23T04:56:07.000+00:00 - virtual_circuits: - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - ip_ranges: - - ip_ranges - - ip_ranges - metro: - country: country - code: code - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - href: href - href: /routes/e1ff9c2b-051a-4688-965f-153e274f77e0 - type: static - status: active - tags: - - tags - - tags - meta: - next: - href: href - total: 0 - last: - href: href - previous: - href: href - last_page: 1 - self: - href: href - first: - href: href - current_page: 6 - properties: - routes: - items: - $ref: '#/components/schemas/VrfRoute' - type: array - meta: - $ref: '#/components/schemas/Meta' - type: object - VrfUpdateInput: - example: - bgp_dynamic_neighbors_export_route_map: true - bgp_dynamic_neighbors_bfd_enabled: true - ip_ranges: - - ip_ranges - - ip_ranges - local_asn: 0 - name: name - bgp_dynamic_neighbors_enabled: true - description: description - tags: - - tags - - tags - properties: - bgp_dynamic_neighbors_enabled: - description: Toggle to enable the dynamic bgp neighbors feature on the VRF - type: boolean - bgp_dynamic_neighbors_export_route_map: - description: Toggle to export the VRF route-map to the dynamic bgp neighbors - type: boolean - bgp_dynamic_neighbors_bfd_enabled: - description: Toggle BFD on dynamic bgp neighbors sessions - type: boolean - description: - type: string - ip_ranges: - description: "A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"\ - 2001:d78::/56\"]. IPv4 blocks must be between /8 and /29 in size. IPv6\ - \ blocks must be between /56 and /64. A VRF\\'s IP ranges must be defined\ - \ in order to create VRF IP Reservations, which can then be used for Metal\ - \ Gateways or Virtual Circuits. Adding a new CIDR address to the list\ - \ will result in the creation of a new IP Range for this VRF. Removal\ - \ of an existing CIDR address from the list will result in the deletion\ - \ of an existing IP Range for this VRF. Deleting an IP Range will result\ - \ in the deletion of any VRF IP Reservations contained within the IP Range,\ - \ as well as the VRF IP Reservation\\'s associated Metal Gateways or Virtual\ - \ Circuits. If you do not wish to add or remove IP Ranges, either include\ - \ the full existing list of IP Ranges in the update request, or do not\ - \ specify the `ip_ranges` field in the update request. Specifying a value\ - \ of `[]` will remove all existing IP Ranges from the VRF." - items: - type: string - type: array - local_asn: - description: "The new `local_asn` value for the VRF. This field cannot be\ - \ updated when there are active Interconnection Virtual Circuits associated\ - \ to the VRF, or if any of the VLANs of the VRF's metal gateway has been\ - \ assigned on an instance." - format: int32 - type: integer - name: - type: string - tags: - items: - type: string - type: array - type: object - VrfVirtualCircuit: - example: - subnet: 12.0.0.0/30 - customer_ip: 12.0.0.2 - description: description - project: - href: href - created_at: 2000-01-23T04:56:07.000+00:00 - vrf: null - type: null - metal_ip: 12.0.0.1 - speed: 7 - tags: - - tags - - tags - nni_vlan: 5 - updated_at: 2000-01-23T04:56:07.000+00:00 - port: - href: href - name: name - peer_asn: 2 - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - md5: md5 - status: pending - properties: - customer_ip: - description: "An IP address from the subnet that will be used on the Customer\ - \ side. This parameter is optional, but if supplied, we will use the other\ - \ usable IP address in the subnet as the Metal IP. By default, the last\ - \ usable IP address in the subnet will be used." - example: 12.0.0.2 - type: string - description: - type: string - id: - format: uuid - type: string - md5: - description: The MD5 password for the BGP peering in plaintext (not a checksum). - type: string - metal_ip: - description: "An IP address from the subnet that will be used on the Metal\ - \ side. This parameter is optional, but if supplied, we will use the other\ - \ usable IP address in the subnet as the Customer IP. By default, the\ - \ first usable IP address in the subnet will be used." - example: 12.0.0.1 - type: string - name: - type: string - port: - $ref: '#/components/schemas/Href' - nni_vlan: - type: integer - peer_asn: - description: The peer ASN that will be used with the VRF on the Virtual - Circuit. - type: integer - project: - $ref: '#/components/schemas/Href' - speed: - description: integer representing bps speed - type: integer - status: - description: "The status changes of a VRF virtual circuit are generally\ - \ the same as Virtual Circuits that aren't in a VRF. However, for VRF\ - \ Virtual Circuits on Fabric VCs, the status will change to 'waiting_on_peering_details'\ - \ once the Fabric service token associated with the virtual circuit has\ - \ been redeemed on Fabric, and Metal has found the associated Fabric connection.\ - \ At this point, users can update the subnet, MD5 password, customer IP\ - \ and/or metal IP accordingly. For VRF Virtual Circuits on Dedicated Ports,\ - \ we require all peering details to be set on creation of a VRF Virtual\ - \ Circuit. The status will change to `changing_peering_details` whenever\ - \ an active VRF Virtual Circuit has any of its peering details updated." - enum: - - pending - - waiting_on_peering_details - - activating - - changing_peering_details - - deactivating - - deleting - - active - - expired - - activation_failed - - changing_peering_details_failed - - deactivation_failed - - delete_failed - type: string - subnet: - description: "The /30 or /31 subnet of one of the VRF IP Blocks that will\ - \ be used with the VRF for the Virtual Circuit. This subnet does not have\ - \ to be an existing VRF IP reservation, as we will create the VRF IP reservation\ - \ on creation if it does not exist. The Metal IP and Customer IP must\ - \ be IPs from this subnet. For /30 subnets, the network and broadcast\ - \ IPs cannot be used as the Metal or Customer IP." - example: 12.0.0.0/30 - type: string - tags: - items: - type: string - type: array - type: - $ref: '#/components/schemas/VrfVirtualCircuitType' - vrf: - $ref: '#/components/schemas/Vrf' - created_at: - format: date-time - type: string - updated_at: - format: date-time - type: string - required: - - vrf - type: object - VrfVirtualCircuitCreateInput: - properties: - customer_ip: - description: "An IP address from the subnet that will be used on the Customer\ - \ side. This parameter is optional, but if supplied, we will use the other\ - \ usable IP address in the subnet as the Metal IP. By default, the last\ - \ usable IP address in the subnet will be used." - example: 12.0.0.2 - type: string - description: - type: string - md5: - description: | - The plaintext BGP peering password shared by neighbors as an MD5 checksum: - * must be 10-20 characters long - * may not include punctuation - * must be a combination of numbers and letters - * must contain at least one lowercase, uppercase, and digit character - nullable: true - pattern: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{10,20}$" - type: string - metal_ip: - description: "An IP address from the subnet that will be used on the Metal\ - \ side. This parameter is optional, but if supplied, we will use the other\ - \ usable IP address in the subnet as the Customer IP. By default, the\ - \ first usable IP address in the subnet will be used." - example: 12.0.0.1 - type: string - name: - type: string - nni_vlan: - maximum: 4094 - minimum: 2 - type: integer - peer_asn: - description: The peer ASN that will be used with the VRF on the Virtual - Circuit. - type: integer - project_id: - format: uuid - type: string - speed: - description: speed can be passed as integer number representing bps speed - or string (e.g. '52m' or '100g' or '4 gbps') - type: integer - subnet: - description: "The /30 or /31 subnet of one of the VRF IP Blocks that will\ - \ be used with the VRF for the Virtual Circuit. This subnet does not have\ - \ to be an existing VRF IP reservation, as we will create the VRF IP reservation\ - \ on creation if it does not exist. The Metal IP and Customer IP must\ - \ be IPs from this subnet. For /30 subnets, the network and broadcast\ - \ IPs cannot be used as the Metal or Customer IP. The subnet specified\ - \ must be contained within an already-defined IP Range for the VRF." - example: 12.0.0.0/30 - type: string - tags: - items: - type: string - type: array - vrf: - description: The UUID of the VRF that will be associated with the Virtual - Circuit. - format: uuid - type: string - required: - - nni_vlan - - peer_asn - - project_id - - subnet - - vrf - type: object - VrfVirtualCircuitUpdateInput: - properties: - customer_ip: - description: "An IP address from the subnet that will be used on the Customer\ - \ side. This parameter is optional, but if supplied, we will use the other\ - \ usable IP address in the subnet as the Metal IP. By default, the last\ - \ usable IP address in the subnet will be used." - example: 12.0.0.2 - type: string - description: - type: string - md5: - description: | - The plaintext BGP peering password shared by neighbors as an MD5 checksum: - * must be 10-20 characters long - * may not include punctuation - * must be a combination of numbers and letters - * must contain at least one lowercase, uppercase, and digit character - pattern: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{10,20}$" - type: string - metal_ip: - description: "An IP address from the subnet that will be used on the Metal\ - \ side. This parameter is optional, but if supplied, we will use the other\ - \ usable IP address in the subnet as the Customer IP. By default, the\ - \ first usable IP address in the subnet will be used." - example: 12.0.0.1 - type: string - name: - type: string - peer_asn: - description: The peer ASN that will be used with the VRF on the Virtual - Circuit. - type: integer - speed: - description: Speed can be changed only if it is an interconnection on a - Dedicated Port - type: string - subnet: - description: "The /30 or /31 subnet of one of the VRF IP Blocks that will\ - \ be used with the VRF for the Virtual Circuit. This subnet does not have\ - \ to be an existing VRF IP reservation, as we will create the VRF IP reservation\ - \ on creation if it does not exist. The Metal IP and Customer IP must\ - \ be IPs from this subnet. For /30 subnets, the network and broadcast\ - \ IPs cannot be used as the Metal or Customer IP." - example: 12.0.0.0/30 - type: string - tags: - items: - type: string - type: array - type: object - DeviceActionInput: - example: - preserve_data: true - force_delete: true - operating_system: ubuntu_22_04 - ipxe_script_url: ipxe_script_url - type: power_on - deprovision_fast: true - properties: - type: - description: Action to perform. See Device.actions for possible actions. - enum: - - power_on - - power_off - - reboot - - rescue - - reinstall - type: string - force_delete: - description: May be required to perform actions under certain conditions - type: boolean - deprovision_fast: - description: "When type is `reinstall`, enabling fast deprovisioning will\ - \ bypass full disk wiping." - type: boolean - preserve_data: - description: "When type is `reinstall`, preserve the existing data on all\ - \ disks except the operating-system disk." - type: boolean - operating_system: - description: "When type is `reinstall`, use this `operating_system` (defaults\ - \ to the current `operating system`)" - example: ubuntu_22_04 - type: string - ipxe_script_url: - description: "When type is `reinstall`, use this `ipxe_script_url` (`operating_system`\ - \ must be `custom_ipxe`, defaults to the current `ipxe_script_url`)" - type: string - required: - - type - type: object - IPAssignmentUpdateInput: - example: - details: details - customdata: "{}" - tags: - - tags - - tags - properties: - details: - type: string - customdata: - type: object - tags: - items: - type: string - type: array - type: object - Storage: - example: - disks: - - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - filesystems: - - mount: - format: format - options: - - options - - options - device: device - point: point - - mount: - format: format - options: - - options - - options - device: device - point: point - raid: - - devices: - - devices - - devices - level: level - name: name - - devices: - - devices - - devices - level: level - name: name - properties: - disks: - items: - $ref: '#/components/schemas/Disk' - type: array - raid: - items: - $ref: '#/components/schemas/Raid' - type: array - filesystems: - items: - $ref: '#/components/schemas/Filesystem' - type: array - type: object - IPReservationOrHref: - anyOf: - - $ref: '#/components/schemas/IPReservation' - - $ref: '#/components/schemas/Href' - BondPortData: - example: - name: name - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - properties: - id: - description: ID of the bonding port - format: uuid - type: string - name: - description: Name of the port interface for the bond ("bond0") - type: string - type: object - PortData: - example: - bonded: true - mac: mac - properties: - mac: - description: MAC address is set for NetworkPort ports - type: string - bonded: - description: Bonded is true for NetworkPort ports in a bond and NetworkBondPort - ports that are active - type: boolean - type: object - VlanVirtualCircuitType: - enum: - - vlan - type: string - VrfIpReservationOrHref: - anyOf: - - $ref: '#/components/schemas/VrfIpReservation' - - $ref: '#/components/schemas/Href' - VrfVirtualCircuitType: - enum: - - vrf - type: string - BgpRoute: - properties: - exact: - type: boolean - route: - example: 10.32.16.0/31 - type: string - type: object - Disk: - example: - partitions: - - number: 3 - size: size - label: label - - number: 3 - size: size - label: label - wipeTable: true - device: device - properties: - device: - type: string - wipeTable: - type: boolean - partitions: - items: - $ref: '#/components/schemas/Partition' - type: array - type: object - Raid: - example: - devices: - - devices - - devices - level: level - name: name - properties: - devices: - items: - type: string - type: array - level: - type: string - name: - type: string - type: object - Filesystem: - example: - mount: - format: format - options: - - options - - options - device: device - point: point - properties: - mount: - $ref: '#/components/schemas/Mount' - type: object - Partition: - example: - number: 3 - size: size - label: label - properties: - label: - type: string - number: - format: int32 - type: integer - size: - type: string - type: object - Mount: - example: - format: format - options: - - options - - options - device: device - point: point - properties: - device: - type: string - format: - type: string - point: - type: string - options: - items: - type: string - type: array - type: object - findTraffic_timeframe_parameter: - properties: - ended_at: - format: date-time - type: string - started_at: - format: date-time - type: string - required: - - ended_at - - started_at - type: object - activateHardwareReservation_request: - properties: - description: - type: string - type: object - moveHardwareReservation_request: - properties: - project_id: - format: uuid - type: string - type: object - findIPAddressById_200_response: - oneOf: - - $ref: '#/components/schemas/IPAssignment' - - $ref: '#/components/schemas/IPReservation' - - $ref: '#/components/schemas/VrfIpReservation' - findMetalGatewayById_200_response: - oneOf: - - $ref: '#/components/schemas/MetalGateway' - - $ref: '#/components/schemas/VrfMetalGateway' - createOrganizationInterconnection_request: - oneOf: - - $ref: '#/components/schemas/DedicatedPortCreateInput' - - $ref: '#/components/schemas/VlanFabricVcCreateInput' - - $ref: '#/components/schemas/VrfFabricVcCreateInput' - createDevice_request: - oneOf: - - $ref: '#/components/schemas/DeviceCreateInMetroInput' - - $ref: '#/components/schemas/DeviceCreateInFacilityInput' - requestIPReservation_request: - oneOf: - - $ref: '#/components/schemas/IPReservationRequestInput' - - $ref: '#/components/schemas/VrfIpReservationCreateInput' - requestIPReservation_201_response: - oneOf: - - $ref: '#/components/schemas/IPReservation' - - $ref: '#/components/schemas/VrfIpReservation' - createMetalGateway_request: - oneOf: - - $ref: '#/components/schemas/MetalGatewayCreateInput' - - $ref: '#/components/schemas/VrfMetalGatewayCreateInput' - AuthToken_project: - allOf: - - $ref: '#/components/schemas/Project' - - description: Available only for project tokens - type: object - AuthToken_user: - allOf: - - $ref: '#/components/schemas/User' - - description: Available only for user tokens - type: object - CreateSelfServiceReservationRequest_period: - example: - unit: monthly - count: 1 - properties: - count: - enum: - - 12 - - 36 - type: integer - unit: - enum: - - monthly - type: string - type: object - Device_created_by: - allOf: - - $ref: '#/components/schemas/UserLite' - - description: The user that created the device. - type: object - Device_metro: - allOf: - - $ref: '#/components/schemas/Metro' - - description: The metro the facility is in - type: object - Device_actions_inner: - example: - name: name - type: type - properties: - type: - type: string - name: - type: string - type: object - Device_project: - allOf: - - $ref: '#/components/schemas/Href' - - description: Full version of project object when included - type: object - Device_project_lite: - allOf: - - $ref: '#/components/schemas/Href' - - description: Lite version of project object when included - type: object - IPAssignment_metro: - allOf: - - $ref: '#/components/schemas/Metro' - - description: The metro the IP address is in - type: object - IPReservation_facility: - allOf: - - $ref: '#/components/schemas/Facility' - - description: "The facility the IP reservation is in. If the facility the IP\ - \ reservation was requested in is in a metro, a metro value will also be\ - \ set, and the subsequent IP reservation can be used on a metro level. Can\ - \ be null if requesting an IP reservation in a metro." - type: object - IPReservation_metro: - allOf: - - $ref: '#/components/schemas/Metro' - - description: "The metro the IP reservation is in. As long as the IP reservation\ - \ has a metro, it can be used on a metro level. Can be null if requesting\ - \ an IP reservation in a facility that is not in a metro." - type: object - IPReservationList_ip_addresses_inner: - anyOf: - - $ref: '#/components/schemas/IPReservation' - - $ref: '#/components/schemas/VrfIpReservation' - InstancesBatchCreateInput_batches_inner: - allOf: - - properties: - hostnames: - items: - type: string - type: array - quantity: - description: "The number of devices to create in this batch. The hostname\ - \ may contain an `{{index}}` placeholder, which will be replaced with\ - \ the index of the device in the batch. For example, if the hostname\ - \ is `device-{{index}}`, the first device in the batch will have the\ - \ hostname `device-01`, the second device will have the hostname `device-02`,\ - \ and so on." - type: integer - type: object - - oneOf: - - $ref: '#/components/schemas/DeviceCreateInMetroInput' - - $ref: '#/components/schemas/DeviceCreateInFacilityInput' - Metadata_network_network_bonding: - example: - link_aggregation: link_aggregation - mode: 0 - mac: mac - properties: - link_aggregation: - type: string - mac: - type: string - mode: - type: integer - type: object - Metadata_network_network: - example: - bonding: - link_aggregation: link_aggregation - mode: 0 - mac: mac - properties: - bonding: - $ref: '#/components/schemas/Metadata_network_network_bonding' - type: object - Metadata_network: - example: - addresses: - - addresses - - addresses - interfaces: - - "{}" - - "{}" - network: - bonding: - link_aggregation: link_aggregation - mode: 0 - mac: mac - properties: - addresses: - items: - type: string - type: array - interfaces: - items: - type: object - type: array - network: - $ref: '#/components/schemas/Metadata_network_network' - type: object - MetalGatewayList_metal_gateways_inner: - anyOf: - - $ref: '#/components/schemas/VrfMetalGateway' - - $ref: '#/components/schemas/MetalGateway' - Plan_available_in_inner_price: - example: - hour: 1.23 - properties: - hour: - example: 1.23 - format: double - type: number - type: object - Plan_available_in_inner: - example: - price: - hour: 1.23 - href: href - properties: - href: - description: href to the Facility - type: string - price: - $ref: '#/components/schemas/Plan_available_in_inner_price' - type: object - Plan_available_in_metros_inner: - example: - price: - hour: 1.23 - href: href - properties: - href: - description: href to the Metro - type: string - price: - $ref: '#/components/schemas/Plan_available_in_inner_price' - type: object - Plan_specs_cpus_inner: - example: - count: 6 - type: type - properties: - count: - type: integer - type: - type: string - type: object - Plan_specs_memory: - example: - total: total - properties: - total: - type: string - type: object - Plan_specs_drives_inner: - example: - size: 3.84TB - count: 1 - type: HDD - category: boot - properties: - count: - type: integer - type: - enum: - - HDD - - SSD - - NVME - type: string - size: - example: 3.84TB - type: string - category: - enum: - - boot - - cache - - storage - type: string - type: object - Plan_specs_nics_inner: - example: - count: 2 - type: 1Gbps - properties: - count: - example: 2 - type: integer - type: - enum: - - 1Gbps - - 10Gbps - - 25Gbps - type: string - type: object - Plan_specs_features: - example: - txt: true - uefi: true - raid: true - properties: - raid: - type: boolean - txt: - type: boolean - uefi: - type: boolean - type: object - Plan_specs: - example: - features: - txt: true - uefi: true - raid: true - memory: - total: total - cpus: - - count: 6 - type: type - - count: 6 - type: type - drives: - - size: 3.84TB - count: 1 - type: HDD - category: boot - - size: 3.84TB - count: 1 - type: HDD - category: boot - nics: - - count: 2 - type: 1Gbps - - count: 2 - type: 1Gbps - properties: - cpus: - items: - $ref: '#/components/schemas/Plan_specs_cpus_inner' - type: array - memory: - $ref: '#/components/schemas/Plan_specs_memory' - drives: - items: - $ref: '#/components/schemas/Plan_specs_drives_inner' - type: array - nics: - items: - $ref: '#/components/schemas/Plan_specs_nics_inner' - type: array - features: - $ref: '#/components/schemas/Plan_specs_features' - type: object - PortConvertLayer3Input_request_ips_inner: - example: - address_family: 0 - public: true - properties: - address_family: - type: integer - public: - type: boolean - type: object - PortVlanAssignmentBatch_vlan_assignments_inner: - example: - vlan: 6 - native: true - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - state: assigned - properties: - id: - format: uuid - type: string - native: - type: boolean - state: - enum: - - assigned - - unassigned - type: string - vlan: - type: integer - type: object - PortVlanAssignmentBatchCreateInput_vlan_assignments_inner: - example: - vlan: vlan - native: true - state: assigned - properties: - native: - type: boolean - state: - enum: - - assigned - - unassigned - type: string - vlan: - type: string - type: object - SpotMarketRequest_metro: - allOf: - - $ref: '#/components/schemas/Metro' - - description: The metro the spot market request was created in - type: object - SpotMarketRequestCreateInput_instance_parameters: - example: - user_ssh_keys: - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - private_ipv4_subnet_size: 1 - description: description - hostnames: - - hostnames - - hostnames - termination_time: 2000-01-23T04:56:07.000+00:00 - project_ssh_keys: - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - tags: - - tags - - tags - features: - - features - - features - userdata: userdata - hostname: hostname - no_ssh_keys: true - public_ipv4_subnet_size: 5 - operating_system: operating_system - always_pxe: true - billing_cycle: billing_cycle - customdata: "{}" - locked: true - plan: plan - properties: - always_pxe: - type: boolean - billing_cycle: - type: string - customdata: - type: object - description: - type: string - features: - items: - type: string - type: array - hostname: - type: string - hostnames: - items: - type: string - type: array - locked: - description: "Whether the device should be locked, preventing accidental\ - \ deletion." - type: boolean - no_ssh_keys: - type: boolean - operating_system: - type: string - plan: - type: string - private_ipv4_subnet_size: - type: integer - project_ssh_keys: - items: - format: uuid - type: string - type: array - public_ipv4_subnet_size: - type: integer - tags: - items: - type: string - type: array - termination_time: - format: date-time - type: string - user_ssh_keys: - description: The UUIDs of users whose SSH keys should be included on the - provisioned device. - items: - format: uuid - type: string - type: array - userdata: - type: string - type: object - securitySchemes: - x_auth_token: - description: | - HTTP header containing the User or Project API key that will be used to authenticate the request. - in: header - name: X-Auth-Token - type: apiKey - x-displayName: X-Auth-Token -x-tagGroups: -- name: Accounts and Organization - tags: - - Authentication - - Emails - - Invitations - - Memberships - - Organizations - - OTPs - - PasswordResetTokens - - PaymentMethods - - Projects - - SSHKeys - - SupportRequest - - TransferRequests - - TwoFactorAuth - - Users - - UserVerificationTokens -- name: Services and Billing - tags: - - Events - - Facilities - - Incidents - - Invoices - - Licenses - - Metros - - Plans - - Usages -- name: Servers - tags: - - Devices - - Batches - - Capacity - - HardwareReservations - - OperatingSystems - - Ports - - SelfServiceReservations - - SpotMarket - - Userdata - - Volumes -- name: Networking - tags: - - BGP - - Interconnections - - IPAddresses - - MetalGateways - - VLANs - - VRFs - diff --git a/equinix-openapi-metal/build.gradle b/equinix-openapi-metal/build.gradle deleted file mode 100644 index c47b420f5..000000000 --- a/equinix-openapi-metal/build.gradle +++ /dev/null @@ -1,168 +0,0 @@ -apply plugin: 'idea' -apply plugin: 'eclipse' -apply plugin: 'java' -apply plugin: 'com.diffplug.spotless' - -group = 'com.equinix' -version = '0.10.1' - -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' - } -} - -repositories { - mavenCentral() -} -sourceSets { - main.java.srcDirs = ['src/main/java'] -} - -if(hasProperty('target') && target == 'android') { - - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 25 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task) - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'java' - apply plugin: 'maven-publish' - - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - - publishing { - publications { - maven(MavenPublication) { - artifactId = 'equinix-openapi-metal' - from components.java - } - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -ext { - jakarta_annotation_version = "1.3.5" -} - -dependencies { - implementation 'io.swagger:swagger-annotations:1.6.8' - implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.10.0' - implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0' - implementation 'com.google.code.gson:gson:2.9.1' - implementation 'io.gsonfire:gson-fire:1.8.5' - implementation 'javax.ws.rs:jsr311-api:1.1.1' - implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' - implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' - implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' - testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' -} - -javadoc { - options.tags = [ "http.response.details:a:Http Response Details" ] -} - -// Use spotless plugin to automatically format code, remove unused import, etc -// To apply changes directly to the file, run `gradlew spotlessApply` -// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle -spotless { - // comment out below to run spotless as part of the `check` task - enforceCheck false - - format 'misc', { - // define the files (e.g. '*.gradle', '*.md') to apply `misc` to - target '.gitignore' - - // define the steps to apply to those files - trimTrailingWhitespace() - indentWithSpaces() // Takes an integer argument if you don't like 4 - endWithNewline() - } - java { - // don't need to set target, it is inferred from java - - // apply a specific flavor of google-java-format - googleJavaFormat('1.8').aosp().reflowLongStrings() - - removeUnusedImports() - importOrder() - } -} - -test { - // Enable JUnit 5 (Gradle 4.6+). - useJUnitPlatform() - - // Always run tests, even when nothing changed. - dependsOn 'cleanTest' - - // Show test results. - testLogging { - events "passed", "skipped", "failed" - } - -} diff --git a/equinix-openapi-metal/build.sbt b/equinix-openapi-metal/build.sbt deleted file mode 100644 index 55fe6f88b..000000000 --- a/equinix-openapi-metal/build.sbt +++ /dev/null @@ -1,28 +0,0 @@ -lazy val root = (project in file(".")). - settings( - organization := "com.equinix", - name := "equinix-openapi-metal", - version := "0.10.1", - scalaVersion := "2.11.4", - scalacOptions ++= Seq("-feature"), - javacOptions in compile ++= Seq("-Xlint:deprecation"), - publishArtifact in (Compile, packageDoc) := false, - resolvers += Resolver.mavenLocal, - libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.10.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", - "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.12.0", - "javax.ws.rs" % "jsr311-api" % "1.1.1", - "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", - "org.openapitools" % "jackson-databind-nullable" % "0.2.6", - "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", - "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", - "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test", - "org.mockito" % "mockito-core" % "3.12.4" % "test" - ) - ) diff --git a/equinix-openapi-metal/docs/ActivateHardwareReservationRequest.md b/equinix-openapi-metal/docs/ActivateHardwareReservationRequest.md deleted file mode 100644 index 66621967a..000000000 --- a/equinix-openapi-metal/docs/ActivateHardwareReservationRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ActivateHardwareReservationRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/Address.md b/equinix-openapi-metal/docs/Address.md deleted file mode 100644 index 5fc1866fd..000000000 --- a/equinix-openapi-metal/docs/Address.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# Address - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | **String** | | | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**coordinates** | [**Coordinates**](Coordinates.md) | | [optional] | -|**country** | **String** | | | -|**state** | **String** | | [optional] | -|**zipCode** | **String** | | | - - - diff --git a/equinix-openapi-metal/docs/Attribute.md b/equinix-openapi-metal/docs/Attribute.md deleted file mode 100644 index c5d6ca382..000000000 --- a/equinix-openapi-metal/docs/Attribute.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# Attribute - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespace** | **String** | Attribute namespace | [optional] [readonly] | -|**createdAt** | **OffsetDateTime** | Datetime when the block was created. | [optional] [readonly] | -|**updatedAt** | **OffsetDateTime** | Datetime when the block was updated. | [optional] [readonly] | -|**data** | [**AttributeData**](AttributeData.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/AttributeData.md b/equinix-openapi-metal/docs/AttributeData.md deleted file mode 100644 index 5fe4f0c9b..000000000 --- a/equinix-openapi-metal/docs/AttributeData.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AttributeData - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**latest** | **Boolean** | Boolean flag to know if the firmware set is the latest for the model and vendor | [optional] [readonly] | -|**model** | **String** | Model on which this firmware set can be applied | [optional] [readonly] | -|**vendor** | **String** | Vendor on which this firmware set can be applied | [optional] [readonly] | -|**plan** | **String** | Plan where the firmware set can be applied | [optional] [readonly] | - - - diff --git a/equinix-openapi-metal/docs/AuthToken.md b/equinix-openapi-metal/docs/AuthToken.md deleted file mode 100644 index 6cb980722..000000000 --- a/equinix-openapi-metal/docs/AuthToken.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# AuthToken - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**description** | **String** | Available only for API keys | [optional] | -|**id** | **UUID** | | [optional] | -|**project** | [**AuthTokenProject**](AuthTokenProject.md) | | [optional] | -|**readOnly** | **Boolean** | | [optional] | -|**token** | **String** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**user** | [**AuthTokenUser**](AuthTokenUser.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/AuthTokenInput.md b/equinix-openapi-metal/docs/AuthTokenInput.md deleted file mode 100644 index 1e94af527..000000000 --- a/equinix-openapi-metal/docs/AuthTokenInput.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AuthTokenInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**readOnly** | **Boolean** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/AuthTokenList.md b/equinix-openapi-metal/docs/AuthTokenList.md deleted file mode 100644 index 21c35731e..000000000 --- a/equinix-openapi-metal/docs/AuthTokenList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# AuthTokenList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**apiKeys** | [**List<AuthToken>**](AuthToken.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/AuthTokenProject.md b/equinix-openapi-metal/docs/AuthTokenProject.md deleted file mode 100644 index 6806cdeee..000000000 --- a/equinix-openapi-metal/docs/AuthTokenProject.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# AuthTokenProject - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpConfig** | [**Href**](Href.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**devices** | [**List<Href>**](Href.md) | | [optional] | -|**id** | **UUID** | | [optional] | -|**invitations** | [**List<Href>**](Href.md) | | [optional] | -|**maxDevices** | **Object** | | [optional] | -|**members** | [**List<Href>**](Href.md) | | [optional] | -|**memberships** | [**List<Href>**](Href.md) | | [optional] | -|**name** | **String** | The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. | [optional] | -|**networkStatus** | **Object** | | [optional] | -|**organization** | [**Organization**](Organization.md) | | [optional] | -|**paymentMethod** | [**Href**](Href.md) | | [optional] | -|**sshKeys** | [**List<Href>**](Href.md) | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**volumes** | [**List<Href>**](Href.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. | [optional] | -|**tags** | **List<String>** | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| DEFAULT | "default" | -| VMCE | "vmce" | - - - diff --git a/equinix-openapi-metal/docs/AuthTokenUser.md b/equinix-openapi-metal/docs/AuthTokenUser.md deleted file mode 100644 index ca4dc955e..000000000 --- a/equinix-openapi-metal/docs/AuthTokenUser.md +++ /dev/null @@ -1,34 +0,0 @@ - - -# AuthTokenUser - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**avatarThumbUrl** | **String** | | [optional] | -|**avatarUrl** | **String** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**defaultOrganizationId** | **UUID** | | [optional] | -|**defaultProjectId** | **UUID** | | [optional] | -|**email** | **String** | | [optional] | -|**emails** | [**List<Href>**](Href.md) | | [optional] | -|**firstName** | **String** | | [optional] | -|**fraudScore** | **String** | | [optional] | -|**fullName** | **String** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**lastLoginAt** | **OffsetDateTime** | | [optional] | -|**lastName** | **String** | | [optional] | -|**maxOrganizations** | **Integer** | | [optional] | -|**maxProjects** | **Integer** | | [optional] | -|**phoneNumber** | **String** | | [optional] | -|**shortId** | **String** | | [optional] | -|**timezone** | **String** | | [optional] | -|**twoFactorAuth** | **String** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/AuthenticationApi.md b/equinix-openapi-metal/docs/AuthenticationApi.md deleted file mode 100644 index 3ba646eb2..000000000 --- a/equinix-openapi-metal/docs/AuthenticationApi.md +++ /dev/null @@ -1,450 +0,0 @@ -# AuthenticationApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createAPIKey**](AuthenticationApi.md#createAPIKey) | **POST** /user/api-keys | Create an API key | -| [**createProjectAPIKey**](AuthenticationApi.md#createProjectAPIKey) | **POST** /projects/{id}/api-keys | Create an API key for a project. | -| [**deleteAPIKey**](AuthenticationApi.md#deleteAPIKey) | **DELETE** /api-keys/{id} | Delete the API key | -| [**deleteUserAPIKey**](AuthenticationApi.md#deleteUserAPIKey) | **DELETE** /user/api-keys/{id} | Delete the API key | -| [**findAPIKeys**](AuthenticationApi.md#findAPIKeys) | **GET** /user/api-keys | Retrieve all user API keys | -| [**findProjectAPIKeys**](AuthenticationApi.md#findProjectAPIKeys) | **GET** /projects/{id}/api-keys | Retrieve all API keys for the project. | - - - -# **createAPIKey** -> AuthToken createAPIKey(authTokenInput, include) - -Create an API key - -Creates a API key for the current user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.AuthenticationApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); - AuthTokenInput authTokenInput = new AuthTokenInput(); // AuthTokenInput | API key to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - AuthToken result = apiInstance.createAPIKey(authTokenInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#createAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **authTokenInput** | [**AuthTokenInput**](AuthTokenInput.md)| API key to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**AuthToken**](AuthToken.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createProjectAPIKey** -> AuthToken createProjectAPIKey(id, authTokenInput, include) - -Create an API key for a project. - -Creates an API key for a project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.AuthenticationApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - AuthTokenInput authTokenInput = new AuthTokenInput(); // AuthTokenInput | API Key to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - AuthToken result = apiInstance.createProjectAPIKey(id, authTokenInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#createProjectAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **authTokenInput** | [**AuthTokenInput**](AuthTokenInput.md)| API Key to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**AuthToken**](AuthToken.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteAPIKey** -> deleteAPIKey(id) - -Delete the API key - -Deletes the API key. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.AuthenticationApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | API Key UUID - try { - apiInstance.deleteAPIKey(id); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#deleteAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| API Key UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **deleteUserAPIKey** -> deleteUserAPIKey(id) - -Delete the API key - -Deletes the current user API key. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.AuthenticationApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | API Key UUID - try { - apiInstance.deleteUserAPIKey(id); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#deleteUserAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| API Key UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findAPIKeys** -> AuthTokenList findAPIKeys(search, include) - -Retrieve all user API keys - -Returns all API keys for the current user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.AuthenticationApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); - String search = "search_example"; // String | Search by description - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - AuthTokenList result = apiInstance.findAPIKeys(search, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#findAPIKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **search** | **String**| Search by description | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**AuthTokenList**](AuthTokenList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findProjectAPIKeys** -> AuthTokenList findProjectAPIKeys(id, include) - -Retrieve all API keys for the project. - -Returns all API keys for a specific project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.AuthenticationApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - AuthTokenList result = apiInstance.findProjectAPIKeys(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationApi#findProjectAPIKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**AuthTokenList**](AuthTokenList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/BGPSessionInput.md b/equinix-openapi-metal/docs/BGPSessionInput.md deleted file mode 100644 index 0a877e88f..000000000 --- a/equinix-openapi-metal/docs/BGPSessionInput.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# BGPSessionInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addressFamily** | [**AddressFamilyEnum**](#AddressFamilyEnum) | Address family for BGP session. | [optional] | -|**defaultRoute** | **Boolean** | Set the default route policy. | [optional] | - - - -## Enum: AddressFamilyEnum - -| Name | Value | -|---- | -----| -| IPV4 | "ipv4" | -| IPV6 | "ipv6" | - - - diff --git a/equinix-openapi-metal/docs/Batch.md b/equinix-openapi-metal/docs/Batch.md deleted file mode 100644 index 31bd8b25f..000000000 --- a/equinix-openapi-metal/docs/Batch.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# Batch - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**devices** | [**List<Href>**](Href.md) | | [optional] | -|**errorMessages** | **List<String>** | | [optional] | -|**id** | **UUID** | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**quantity** | **Integer** | | [optional] | -|**state** | **String** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/BatchesApi.md b/equinix-openapi-metal/docs/BatchesApi.md deleted file mode 100644 index 1210629b6..000000000 --- a/equinix-openapi-metal/docs/BatchesApi.md +++ /dev/null @@ -1,306 +0,0 @@ -# BatchesApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createDeviceBatch**](BatchesApi.md#createDeviceBatch) | **POST** /projects/{id}/devices/batch | Create a devices batch | -| [**deleteBatch**](BatchesApi.md#deleteBatch) | **DELETE** /batches/{id} | Delete the Batch | -| [**findBatchById**](BatchesApi.md#findBatchById) | **GET** /batches/{id} | Retrieve a Batch | -| [**findBatchesByProject**](BatchesApi.md#findBatchesByProject) | **GET** /projects/{id}/batches | Retrieve all batches by project | - - - -# **createDeviceBatch** -> BatchesList createDeviceBatch(id, instancesBatchCreateInput) - -Create a devices batch - -Creates new devices in batch and provisions them in our datacenter. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BatchesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BatchesApi apiInstance = new BatchesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - InstancesBatchCreateInput instancesBatchCreateInput = new InstancesBatchCreateInput(); // InstancesBatchCreateInput | Batches to create - try { - BatchesList result = apiInstance.createDeviceBatch(id, instancesBatchCreateInput); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling BatchesApi#createDeviceBatch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **instancesBatchCreateInput** | [**InstancesBatchCreateInput**](InstancesBatchCreateInput.md)| Batches to create | | - -### Return type - -[**BatchesList**](BatchesList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteBatch** -> deleteBatch(id, removeAssociatedInstances) - -Delete the Batch - -Deletes the Batch. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BatchesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BatchesApi apiInstance = new BatchesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Batch UUID - Boolean removeAssociatedInstances = false; // Boolean | Delete all instances created from this batch - try { - apiInstance.deleteBatch(id, removeAssociatedInstances); - } catch (ApiException e) { - System.err.println("Exception when calling BatchesApi#deleteBatch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Batch UUID | | -| **removeAssociatedInstances** | **Boolean**| Delete all instances created from this batch | [optional] [default to false] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findBatchById** -> Batch findBatchById(id, include) - -Retrieve a Batch - -Returns a Batch - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BatchesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BatchesApi apiInstance = new BatchesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Batch UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Batch result = apiInstance.findBatchById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling BatchesApi#findBatchById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Batch UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Batch**](Batch.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findBatchesByProject** -> BatchesList findBatchesByProject(id, include) - -Retrieve all batches by project - -Returns all batches for the given project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BatchesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BatchesApi apiInstance = new BatchesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - BatchesList result = apiInstance.findBatchesByProject(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling BatchesApi#findBatchesByProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**BatchesList**](BatchesList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/BatchesList.md b/equinix-openapi-metal/docs/BatchesList.md deleted file mode 100644 index 13f948746..000000000 --- a/equinix-openapi-metal/docs/BatchesList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# BatchesList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**batches** | [**List<Batch>**](Batch.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/BgpApi.md b/equinix-openapi-metal/docs/BgpApi.md deleted file mode 100644 index 1e2e96e66..000000000 --- a/equinix-openapi-metal/docs/BgpApi.md +++ /dev/null @@ -1,527 +0,0 @@ -# BgpApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deleteBgpSession**](BgpApi.md#deleteBgpSession) | **DELETE** /bgp/sessions/{id} | Delete the BGP session | -| [**findBgpConfigByProject**](BgpApi.md#findBgpConfigByProject) | **GET** /projects/{id}/bgp-config | Retrieve a bgp config | -| [**findBgpSessionById**](BgpApi.md#findBgpSessionById) | **GET** /bgp/sessions/{id} | Retrieve a BGP session | -| [**findGlobalBgpRanges**](BgpApi.md#findGlobalBgpRanges) | **GET** /projects/{id}/global-bgp-ranges | Retrieve all global bgp ranges | -| [**findProjectBgpSessions**](BgpApi.md#findProjectBgpSessions) | **GET** /projects/{id}/bgp/sessions | Retrieve all BGP sessions for project | -| [**requestBgpConfig**](BgpApi.md#requestBgpConfig) | **POST** /projects/{id}/bgp-configs | Requesting bgp config | -| [**updateBgpSession**](BgpApi.md#updateBgpSession) | **PUT** /bgp/sessions/{id} | Update the BGP session | - - - -# **deleteBgpSession** -> deleteBgpSession(id) - -Delete the BGP session - -Deletes the BGP session. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BgpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BgpApi apiInstance = new BgpApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | BGP session UUID - try { - apiInstance.deleteBgpSession(id); - } catch (ApiException e) { - System.err.println("Exception when calling BgpApi#deleteBgpSession"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| BGP session UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findBgpConfigByProject** -> BgpConfig findBgpConfigByProject(id, include) - -Retrieve a bgp config - -Returns a bgp config - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BgpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BgpApi apiInstance = new BgpApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - BgpConfig result = apiInstance.findBgpConfigByProject(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling BgpApi#findBgpConfigByProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**BgpConfig**](BgpConfig.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok When BGP configuration is not enabled empty structure is returned. When BGP configuration is disabled after being enabled BGP configuration data is returned with status disabled. | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found The project was not found. | - | - - -# **findBgpSessionById** -> BgpSession findBgpSessionById(id, include) - -Retrieve a BGP session - -Returns a BGP session - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BgpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BgpApi apiInstance = new BgpApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | BGP session UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - BgpSession result = apiInstance.findBgpSessionById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling BgpApi#findBgpSessionById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| BGP session UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**BgpSession**](BgpSession.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findGlobalBgpRanges** -> GlobalBgpRangeList findGlobalBgpRanges(id) - -Retrieve all global bgp ranges - -Returns all global bgp ranges for a project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BgpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BgpApi apiInstance = new BgpApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - try { - GlobalBgpRangeList result = apiInstance.findGlobalBgpRanges(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling BgpApi#findGlobalBgpRanges"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | - -### Return type - -[**GlobalBgpRangeList**](GlobalBgpRangeList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectBgpSessions** -> BgpSessionList findProjectBgpSessions(id) - -Retrieve all BGP sessions for project - -Provides a listing of available BGP sessions for the project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BgpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BgpApi apiInstance = new BgpApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - try { - BgpSessionList result = apiInstance.findProjectBgpSessions(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling BgpApi#findProjectBgpSessions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | - -### Return type - -[**BgpSessionList**](BgpSessionList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **requestBgpConfig** -> requestBgpConfig(id, bgpConfigRequestInput, include) - -Requesting bgp config - -Requests to enable bgp configuration for a project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BgpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BgpApi apiInstance = new BgpApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - BgpConfigRequestInput bgpConfigRequestInput = new BgpConfigRequestInput(); // BgpConfigRequestInput | BGP config Request to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - apiInstance.requestBgpConfig(id, bgpConfigRequestInput, include); - } catch (ApiException e) { - System.err.println("Exception when calling BgpApi#requestBgpConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **bgpConfigRequestInput** | [**BgpConfigRequestInput**](BgpConfigRequestInput.md)| BGP config Request to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **updateBgpSession** -> updateBgpSession(id, body) - -Update the BGP session - -Updates the BGP session by either enabling or disabling the default route functionality. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.BgpApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - BgpApi apiInstance = new BgpApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | BGP session UUID - Boolean body = true; // Boolean | Default route - try { - apiInstance.updateBgpSession(id, body); - } catch (ApiException e) { - System.err.println("Exception when calling BgpApi#updateBgpSession"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| BGP session UUID | | -| **body** | **Boolean**| Default route | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/BgpConfig.md b/equinix-openapi-metal/docs/BgpConfig.md deleted file mode 100644 index a3a157a49..000000000 --- a/equinix-openapi-metal/docs/BgpConfig.md +++ /dev/null @@ -1,44 +0,0 @@ - - -# BgpConfig - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asn** | **Integer** | Autonomous System Number. ASN is required with Global BGP. With Local BGP the private ASN, 65000, is assigned. | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**deploymentType** | [**DeploymentTypeEnum**](#DeploymentTypeEnum) | In a Local BGP deployment, a customer uses an internal ASN to control routes within a single Equinix Metal datacenter. This means that the routes are never advertised to the global Internet. Global BGP, on the other hand, requires a customer to have a registered ASN and IP space. | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**maxPrefix** | **Integer** | The maximum number of route filters allowed per server | [optional] | -|**md5** | **String** | (Optional) Password for BGP session in plaintext (not a checksum) | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**ranges** | [**List<GlobalBgpRange>**](GlobalBgpRange.md) | The IP block ranges associated to the ASN (Populated in Global BGP only) | [optional] | -|**requestedAt** | **OffsetDateTime** | | [optional] | -|**routeObject** | **String** | Specifies AS-MACRO (aka AS-SET) to use when building client route filters | [optional] | -|**sessions** | [**List<BgpSession>**](BgpSession.md) | The direct connections between neighboring routers that want to exchange routing information. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | Status of the BGP Config. Status \"requested\" is valid only with the \"global\" deployment_type. | [optional] | - - - -## Enum: DeploymentTypeEnum - -| Name | Value | -|---- | -----| -| GLOBAL | "global" | -| LOCAL | "local" | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| REQUESTED | "requested" | -| ENABLED | "enabled" | -| DISABLED | "disabled" | - - - diff --git a/equinix-openapi-metal/docs/BgpConfigRequestInput.md b/equinix-openapi-metal/docs/BgpConfigRequestInput.md deleted file mode 100644 index d7849a977..000000000 --- a/equinix-openapi-metal/docs/BgpConfigRequestInput.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# BgpConfigRequestInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**asn** | **Integer** | Autonomous System Number for local BGP deployment. | | -|**deploymentType** | [**DeploymentTypeEnum**](#DeploymentTypeEnum) | Wether the BGP deployment is local or global. Local deployments are configured immediately. Global deployments will need to be reviewed by Equinix Metal engineers. | | -|**md5** | **String** | The plaintext password to share between BGP neighbors as an MD5 checksum: * must be 10-20 characters long * may not include punctuation * must be a combination of numbers and letters * must contain at least one lowercase, uppercase, and digit character | [optional] | -|**useCase** | **String** | A use case explanation (necessary for global BGP request review). | [optional] | - - - -## Enum: DeploymentTypeEnum - -| Name | Value | -|---- | -----| -| LOCAL | "local" | -| GLOBAL | "global" | - - - diff --git a/equinix-openapi-metal/docs/BgpDynamicNeighbor.md b/equinix-openapi-metal/docs/BgpDynamicNeighbor.md deleted file mode 100644 index 3d61bae7c..000000000 --- a/equinix-openapi-metal/docs/BgpDynamicNeighbor.md +++ /dev/null @@ -1,33 +0,0 @@ - - -# BgpDynamicNeighbor - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **UUID** | The unique identifier for the resource | [optional] [readonly] | -|**bgpNeighborAsn** | **Integer** | The ASN of the dynamic BGP neighbor | [optional] | -|**bgpNeighborRange** | **String** | Network range of the dynamic BGP neighbor in CIDR format | [optional] | -|**metalGateway** | [**VrfMetalGateway**](VrfMetalGateway.md) | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | | [optional] [readonly] | -|**href** | **String** | | [optional] [readonly] | -|**createdAt** | **OffsetDateTime** | | [optional] [readonly] | -|**createdBy** | [**UserLimited**](UserLimited.md) | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] [readonly] | -|**tags** | **List<String>** | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| ACTIVE | "active" | -| DELETING | "deleting" | -| PENDING | "pending" | -| READY | "ready" | - - - diff --git a/equinix-openapi-metal/docs/BgpDynamicNeighborCreateInput.md b/equinix-openapi-metal/docs/BgpDynamicNeighborCreateInput.md deleted file mode 100644 index 5e0181d30..000000000 --- a/equinix-openapi-metal/docs/BgpDynamicNeighborCreateInput.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# BgpDynamicNeighborCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpNeighborRange** | **String** | Network range of the dynamic BGP neighbor in CIDR format | | -|**bgpNeighborAsn** | **Integer** | The ASN of the dynamic BGP neighbor | | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/BgpDynamicNeighborList.md b/equinix-openapi-metal/docs/BgpDynamicNeighborList.md deleted file mode 100644 index e3758db0c..000000000 --- a/equinix-openapi-metal/docs/BgpDynamicNeighborList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# BgpDynamicNeighborList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpDynamicNeighbors** | [**List<BgpDynamicNeighbor>**](BgpDynamicNeighbor.md) | | [optional] | -|**meta** | [**Meta**](Meta.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/BgpNeighborData.md b/equinix-openapi-metal/docs/BgpNeighborData.md deleted file mode 100644 index 72aa6f7a6..000000000 --- a/equinix-openapi-metal/docs/BgpNeighborData.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# BgpNeighborData - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addressFamily** | **Integer** | Address Family for IP Address. Accepted values are 4 or 6 | [optional] | -|**customerAs** | **Integer** | The customer's ASN. In a local BGP deployment, this will be an internal ASN used to route within the data center. For a global BGP deployment, this will be the your own ASN, configured when you set up BGP for your project. | [optional] | -|**customerIp** | **String** | The device's IP address. For an IPv4 BGP session, this is typically the private bond0 address for the device. | [optional] | -|**md5Enabled** | **Boolean** | True if an MD5 password is configured for the project. | [optional] | -|**md5Password** | **String** | The MD5 password configured for the project, if set. | [optional] | -|**multihop** | **Boolean** | True when the BGP session should be configured as multihop. | [optional] | -|**peerAs** | **Integer** | The Peer ASN to use when configuring BGP on your device. | [optional] | -|**peerIps** | **List<String>** | A list of one or more IP addresses to use for the Peer IP section of your BGP configuration. For non-multihop sessions, this will typically be a single gateway address for the device. For multihop sessions, it will be a list of IPs. | [optional] | -|**routesIn** | [**List<BgpRoute>**](BgpRoute.md) | A list of project subnets | [optional] | -|**routesOut** | [**List<BgpRoute>**](BgpRoute.md) | A list of outgoing routes. Only populated if the BGP session has default route enabled. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/BgpRoute.md b/equinix-openapi-metal/docs/BgpRoute.md deleted file mode 100644 index bf7bcc205..000000000 --- a/equinix-openapi-metal/docs/BgpRoute.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# BgpRoute - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**exact** | **Boolean** | | [optional] | -|**route** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/BgpSession.md b/equinix-openapi-metal/docs/BgpSession.md deleted file mode 100644 index dd89c94e9..000000000 --- a/equinix-openapi-metal/docs/BgpSession.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# BgpSession - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addressFamily** | [**AddressFamilyEnum**](#AddressFamilyEnum) | | | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**defaultRoute** | **Boolean** | | [optional] | -|**device** | [**Href**](Href.md) | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**learnedRoutes** | **List<String>** | | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The status of the BGP Session. Multiple status values may be reported when the device is connected to multiple switches, one value per switch. Each status will start with \"unknown\" and progress to \"up\" or \"down\" depending on the connected device. Subsequent \"unknown\" values indicate a problem acquiring status from the switch. | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - -## Enum: AddressFamilyEnum - -| Name | Value | -|---- | -----| -| IPV4 | "ipv4" | -| IPV6 | "ipv6" | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| UNKNOWN | "unknown" | -| UP | "up" | -| DOWN | "down" | - - - diff --git a/equinix-openapi-metal/docs/BgpSessionList.md b/equinix-openapi-metal/docs/BgpSessionList.md deleted file mode 100644 index b144e2f71..000000000 --- a/equinix-openapi-metal/docs/BgpSessionList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# BgpSessionList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpSessions** | [**List<BgpSession>**](BgpSession.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/BgpSessionNeighbors.md b/equinix-openapi-metal/docs/BgpSessionNeighbors.md deleted file mode 100644 index 28776c5a3..000000000 --- a/equinix-openapi-metal/docs/BgpSessionNeighbors.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# BgpSessionNeighbors - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpNeighbors** | [**List<BgpNeighborData>**](BgpNeighborData.md) | A list of BGP session neighbor data | [optional] | - - - diff --git a/equinix-openapi-metal/docs/BondPortData.md b/equinix-openapi-metal/docs/BondPortData.md deleted file mode 100644 index f6927afbb..000000000 --- a/equinix-openapi-metal/docs/BondPortData.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# BondPortData - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **UUID** | ID of the bonding port | [optional] | -|**name** | **String** | Name of the port interface for the bond (\"bond0\") | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CapacityApi.md b/equinix-openapi-metal/docs/CapacityApi.md deleted file mode 100644 index 6dd0e64bf..000000000 --- a/equinix-openapi-metal/docs/CapacityApi.md +++ /dev/null @@ -1,430 +0,0 @@ -# CapacityApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**checkCapacityForFacility**](CapacityApi.md#checkCapacityForFacility) | **POST** /capacity | Check capacity | -| [**checkCapacityForMetro**](CapacityApi.md#checkCapacityForMetro) | **POST** /capacity/metros | Check capacity for a metro | -| [**findCapacityForFacility**](CapacityApi.md#findCapacityForFacility) | **GET** /capacity | View capacity | -| [**findCapacityForMetro**](CapacityApi.md#findCapacityForMetro) | **GET** /capacity/metros | View capacity for metros | -| [**findOrganizationCapacityPerFacility**](CapacityApi.md#findOrganizationCapacityPerFacility) | **GET** /organizations/{id}/capacity | View available hardware plans per Facility for given organization | -| [**findOrganizationCapacityPerMetro**](CapacityApi.md#findOrganizationCapacityPerMetro) | **GET** /organizations/{id}/capacity/metros | View available hardware plans per Metro for given organization | - - - -# **checkCapacityForFacility** -> CapacityCheckPerFacilityList checkCapacityForFacility(capacityInput) - -Check capacity - -Validates if a deploy can be fulfilled. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.CapacityApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - CapacityApi apiInstance = new CapacityApi(defaultClient); - CapacityInput capacityInput = new CapacityInput(); // CapacityInput | Facility to check capacity in - try { - CapacityCheckPerFacilityList result = apiInstance.checkCapacityForFacility(capacityInput); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CapacityApi#checkCapacityForFacility"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **capacityInput** | [**CapacityInput**](CapacityInput.md)| Facility to check capacity in | | - -### Return type - -[**CapacityCheckPerFacilityList**](CapacityCheckPerFacilityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **checkCapacityForMetro** -> CapacityCheckPerMetroList checkCapacityForMetro(capacityInput) - -Check capacity for a metro - -Validates if a deploy can be fulfilled in a metro. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.CapacityApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - CapacityApi apiInstance = new CapacityApi(defaultClient); - CapacityInput capacityInput = new CapacityInput(); // CapacityInput | Metro to check capacity in - try { - CapacityCheckPerMetroList result = apiInstance.checkCapacityForMetro(capacityInput); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CapacityApi#checkCapacityForMetro"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **capacityInput** | [**CapacityInput**](CapacityInput.md)| Metro to check capacity in | | - -### Return type - -[**CapacityCheckPerMetroList**](CapacityCheckPerMetroList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **findCapacityForFacility** -> CapacityList findCapacityForFacility() - -View capacity - -Returns a list of facilities and plans with their current capacity. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.CapacityApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - CapacityApi apiInstance = new CapacityApi(defaultClient); - try { - CapacityList result = apiInstance.findCapacityForFacility(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CapacityApi#findCapacityForFacility"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**CapacityList**](CapacityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findCapacityForMetro** -> CapacityList findCapacityForMetro() - -View capacity for metros - -Returns a list of metros and plans with their current capacity. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.CapacityApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - CapacityApi apiInstance = new CapacityApi(defaultClient); - try { - CapacityList result = apiInstance.findCapacityForMetro(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CapacityApi#findCapacityForMetro"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**CapacityList**](CapacityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findOrganizationCapacityPerFacility** -> CapacityList findOrganizationCapacityPerFacility(id) - -View available hardware plans per Facility for given organization - -Returns a list of facilities and plans with their current capacity. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.CapacityApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - CapacityApi apiInstance = new CapacityApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - try { - CapacityList result = apiInstance.findOrganizationCapacityPerFacility(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CapacityApi#findOrganizationCapacityPerFacility"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | - -### Return type - -[**CapacityList**](CapacityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | - - -# **findOrganizationCapacityPerMetro** -> CapacityList findOrganizationCapacityPerMetro(id) - -View available hardware plans per Metro for given organization - -Returns a list of metros and plans with their current capacity. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.CapacityApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - CapacityApi apiInstance = new CapacityApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - try { - CapacityList result = apiInstance.findOrganizationCapacityPerMetro(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CapacityApi#findOrganizationCapacityPerMetro"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | - -### Return type - -[**CapacityList**](CapacityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | - diff --git a/equinix-openapi-metal/docs/CapacityCheckPerFacilityInfo.md b/equinix-openapi-metal/docs/CapacityCheckPerFacilityInfo.md deleted file mode 100644 index 0d24d6260..000000000 --- a/equinix-openapi-metal/docs/CapacityCheckPerFacilityInfo.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CapacityCheckPerFacilityInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**available** | **Boolean** | | [optional] | -|**facility** | **String** | | [optional] | -|**plan** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CapacityCheckPerFacilityList.md b/equinix-openapi-metal/docs/CapacityCheckPerFacilityList.md deleted file mode 100644 index fcc2ae455..000000000 --- a/equinix-openapi-metal/docs/CapacityCheckPerFacilityList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CapacityCheckPerFacilityList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**servers** | [**List<CapacityCheckPerFacilityInfo>**](CapacityCheckPerFacilityInfo.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CapacityCheckPerMetroInfo.md b/equinix-openapi-metal/docs/CapacityCheckPerMetroInfo.md deleted file mode 100644 index 38522cf35..000000000 --- a/equinix-openapi-metal/docs/CapacityCheckPerMetroInfo.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CapacityCheckPerMetroInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**available** | **Boolean** | Returns true if there is enough capacity in the metro to fulfill the quantity set. Returns false if there is not enough. | [optional] | -|**metro** | **String** | The metro ID or code sent to check capacity. | [optional] | -|**plan** | **String** | The plan ID or slug sent to check capacity. | [optional] | -|**quantity** | **String** | The number of servers sent to check capacity. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CapacityCheckPerMetroList.md b/equinix-openapi-metal/docs/CapacityCheckPerMetroList.md deleted file mode 100644 index 311da309b..000000000 --- a/equinix-openapi-metal/docs/CapacityCheckPerMetroList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CapacityCheckPerMetroList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**servers** | [**List<CapacityCheckPerMetroInfo>**](CapacityCheckPerMetroInfo.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CapacityInput.md b/equinix-openapi-metal/docs/CapacityInput.md deleted file mode 100644 index d9c15b02e..000000000 --- a/equinix-openapi-metal/docs/CapacityInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CapacityInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**servers** | [**List<ServerInfo>**](ServerInfo.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CapacityLevelPerBaremetal.md b/equinix-openapi-metal/docs/CapacityLevelPerBaremetal.md deleted file mode 100644 index 9bc5ba8a1..000000000 --- a/equinix-openapi-metal/docs/CapacityLevelPerBaremetal.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CapacityLevelPerBaremetal - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**level** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CapacityList.md b/equinix-openapi-metal/docs/CapacityList.md deleted file mode 100644 index 5552cada5..000000000 --- a/equinix-openapi-metal/docs/CapacityList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CapacityList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**capacity** | **Map<String, Map<String, CapacityLevelPerBaremetal>>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/Component.md b/equinix-openapi-metal/docs/Component.md deleted file mode 100644 index e7b33abc0..000000000 --- a/equinix-openapi-metal/docs/Component.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# Component - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**uuid** | **UUID** | Component UUID | [optional] [readonly] | -|**vendor** | **String** | Component vendor | [optional] [readonly] | -|**model** | **List<String>** | List of models where this component version can be applied | [optional] [readonly] | -|**filename** | **String** | name of the file | [optional] [readonly] | -|**version** | **String** | Version of the component | [optional] [readonly] | -|**component** | **String** | Component type | [optional] [readonly] | -|**checksum** | **String** | File checksum | [optional] [readonly] | -|**upstreamUrl** | **String** | Location of the file | [optional] [readonly] | -|**repositoryUrl** | **String** | Location of the file in the repository | [optional] [readonly] | -|**createdAt** | **OffsetDateTime** | Datetime when the block was created. | [optional] [readonly] | -|**updatedAt** | **OffsetDateTime** | Datetime when the block was updated. | [optional] [readonly] | - - - diff --git a/equinix-openapi-metal/docs/ConsoleLogDetailsApi.md b/equinix-openapi-metal/docs/ConsoleLogDetailsApi.md deleted file mode 100644 index 2ab551c81..000000000 --- a/equinix-openapi-metal/docs/ConsoleLogDetailsApi.md +++ /dev/null @@ -1,81 +0,0 @@ -# ConsoleLogDetailsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**captureScreenshot**](ConsoleLogDetailsApi.md#captureScreenshot) | **GET** /devices/{id}/diagnostics/screenshot | | - - - -# **captureScreenshot** -> File captureScreenshot(id) - - - -Capture a screenshot from the device, if supported, via the BMC. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ConsoleLogDetailsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ConsoleLogDetailsApi apiInstance = new ConsoleLogDetailsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - try { - File result = apiInstance.captureScreenshot(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ConsoleLogDetailsApi#captureScreenshot"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | - -### Return type - -[**File**](File.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/jpeg, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | An image file | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **501** | not implemented for device | - | - diff --git a/equinix-openapi-metal/docs/Coordinates.md b/equinix-openapi-metal/docs/Coordinates.md deleted file mode 100644 index a3c582e21..000000000 --- a/equinix-openapi-metal/docs/Coordinates.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# Coordinates - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**latitude** | **String** | | [optional] | -|**longitude** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CreateDeviceRequest.md b/equinix-openapi-metal/docs/CreateDeviceRequest.md deleted file mode 100644 index 89b199df5..000000000 --- a/equinix-openapi-metal/docs/CreateDeviceRequest.md +++ /dev/null @@ -1,50 +0,0 @@ - - -# CreateDeviceRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**metro** | **String** | Metro code or ID of where the instance should be provisioned in. Either metro or facility must be provided. | | -|**alwaysPxe** | **Boolean** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] | -|**billingCycle** | [**BillingCycleEnum**](#BillingCycleEnum) | The billing cycle of the device. | [optional] | -|**customdata** | **Map<String, Object>** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] | -|**description** | **String** | Any description of the device or how it will be used. This may be used to inform other API consumers with project access. | [optional] | -|**features** | **List<String>** | The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. | [optional] | -|**hardwareReservationId** | **String** | The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] | -|**hostname** | **String** | The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. | [optional] | -|**ipAddresses** | [**List<IPAddress>**](IPAddress.md) | The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. | [optional] | -|**ipxeScriptUrl** | **String** | When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] | -|**locked** | **Boolean** | Whether the device should be locked, preventing accidental deletion. | [optional] | -|**networkFrozen** | **Boolean** | If true, this instance can not be converted to a different network type. | [optional] | -|**noSshKeys** | **Boolean** | Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified | [optional] | -|**operatingSystem** | **String** | The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. | | -|**plan** | **String** | The slug of the device plan to provision. | | -|**privateIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. | [optional] | -|**projectSshKeys** | **List<UUID>** | A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**publicIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. | [optional] | -|**spotInstance** | **Boolean** | Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. | [optional] | -|**spotPriceMax** | **Float** | The maximum amount to bid for a spot instance. | [optional] | -|**sshKeys** | [**List<SSHKeyInput>**](SSHKeyInput.md) | A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. | [optional] | -|**storage** | [**Storage**](Storage.md) | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**terminationTime** | **OffsetDateTime** | When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. | [optional] | -|**userSshKeys** | **List<UUID>** | A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**userdata** | **String** | The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [optional] | -|**facility** | **List<String>** | The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. | | - - - -## Enum: BillingCycleEnum - -| Name | Value | -|---- | -----| -| HOURLY | "hourly" | -| DAILY | "daily" | -| MONTHLY | "monthly" | -| YEARLY | "yearly" | - - - diff --git a/equinix-openapi-metal/docs/CreateEmailInput.md b/equinix-openapi-metal/docs/CreateEmailInput.md deleted file mode 100644 index d5bd0e933..000000000 --- a/equinix-openapi-metal/docs/CreateEmailInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CreateEmailInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | **String** | | | - - - diff --git a/equinix-openapi-metal/docs/CreateMetalGatewayRequest.md b/equinix-openapi-metal/docs/CreateMetalGatewayRequest.md deleted file mode 100644 index 98567d170..000000000 --- a/equinix-openapi-metal/docs/CreateMetalGatewayRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateMetalGatewayRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ipReservationId** | **UUID** | The UUID an a VRF IP Reservation that belongs to the same project as the one in which the Metal Gateway is to be created. Additionally, the VRF IP Reservation and the Virtual Network must reside in the same Metro. | | -|**privateIpv4SubnetSize** | **Integer** | The subnet size (8, 16, 32, 64, or 128) of the private IPv4 reservation that will be created for the metal gateway. This field is required unless a project IP reservation was specified. Please keep in mind that the number of private metal gateway ranges are limited per project. If you would like to increase the limit per project, please contact support for assistance. | [optional] | -|**virtualNetworkId** | **UUID** | THe UUID of a Metro Virtual Network that belongs to the same project as the one in which the Metal Gateway is to be created. Additionally, the Virtual Network and the VRF IP Reservation must reside in the same metro. | | - - - diff --git a/equinix-openapi-metal/docs/CreateOrganizationInterconnectionRequest.md b/equinix-openapi-metal/docs/CreateOrganizationInterconnectionRequest.md deleted file mode 100644 index f49813a40..000000000 --- a/equinix-openapi-metal/docs/CreateOrganizationInterconnectionRequest.md +++ /dev/null @@ -1,54 +0,0 @@ - - -# CreateOrganizationInterconnectionRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**billingAccountName** | **String** | The billing account name of the Equinix Fabric account. | [optional] | -|**contactEmail** | **String** | The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. | [optional] | -|**description** | **String** | | [optional] | -|**metro** | **String** | A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. | | -|**mode** | [**ModeEnum**](#ModeEnum) | The mode of the interconnection (only relevant to Dedicated Ports). Fabric VCs won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. | [optional] | -|**name** | **String** | | | -|**project** | **String** | | [optional] | -|**redundancy** | **String** | Either 'primary' or 'redundant'. | | -|**speed** | **Integer** | A interconnection speed, in bps, mbps, or gbps. For Fabric VCs, this represents the maximum speed of the interconnection. For Fabric VCs (Metal Billed), this can only be one of the following: ''50mbps'', ''200mbps'', ''500mbps'', ''1gbps'', ''2gbps'', ''5gbps'' or ''10gbps'', and is required for creation. For Fabric VCs (Fabric Billed), this field will always default to ''10gbps'' even if it is not provided. For example, ''500000000'', ''50m'', or' ''500mbps'' will all work as valid inputs. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | When requesting for a dedicated port, the value of this field should be 'dedicated'. | | -|**useCase** | **String** | The intended use case of the dedicated port. | [optional] | -|**serviceTokenType** | [**ServiceTokenTypeEnum**](#ServiceTokenTypeEnum) | Either 'a_side' or 'z_side'. Setting this field to 'a_side' will create an interconnection with Fabric VCs (Metal Billed). Setting this field to 'z_side' will create an interconnection with Fabric VCs (Fabric Billed). This is required when the 'type' is 'shared', but this is not applicable when the 'type' is 'dedicated'. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. | | -|**vlans** | **List<Integer>** | A list of one or two metro-based VLANs that will be set on the virtual circuits of primary and/or secondary (if redundant) interconnections respectively when creating Fabric VCs. VLANs can also be set after the interconnection is created, but are required to fully activate the virtual circuits. | [optional] | -|**vrfs** | **List<UUID>** | This field holds a list of VRF UUIDs that will be set automatically on the virtual circuits of Fabric VCs on creation, and can hold up to two UUIDs. Two UUIDs are required when requesting redundant Fabric VCs. The first UUID will be set on the primary virtual circuit, while the second UUID will be set on the secondary. The two UUIDs can be the same if both the primary and secondary virtual circuits will be in the same VRF. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. | | - - - -## Enum: ModeEnum - -| Name | Value | -|---- | -----| -| STANDARD | "standard" | -| TUNNEL | "tunnel" | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| DEDICATED | "dedicated" | -| SHARED | "shared" | - - - -## Enum: ServiceTokenTypeEnum - -| Name | Value | -|---- | -----| -| A_SIDE | "a_side" | -| Z_SIDE | "z_side" | - - - diff --git a/equinix-openapi-metal/docs/CreateSelfServiceReservationRequest.md b/equinix-openapi-metal/docs/CreateSelfServiceReservationRequest.md deleted file mode 100644 index 1457b48c3..000000000 --- a/equinix-openapi-metal/docs/CreateSelfServiceReservationRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# CreateSelfServiceReservationRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**item** | [**List<SelfServiceReservationItemRequest>**](SelfServiceReservationItemRequest.md) | | [optional] | -|**notes** | **String** | | [optional] | -|**period** | [**CreateSelfServiceReservationRequestPeriod**](CreateSelfServiceReservationRequestPeriod.md) | | [optional] | -|**startDate** | **OffsetDateTime** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/CreateSelfServiceReservationRequestPeriod.md b/equinix-openapi-metal/docs/CreateSelfServiceReservationRequestPeriod.md deleted file mode 100644 index 86280e439..000000000 --- a/equinix-openapi-metal/docs/CreateSelfServiceReservationRequestPeriod.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# CreateSelfServiceReservationRequestPeriod - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**count** | [**CountEnum**](#CountEnum) | | [optional] | -|**unit** | [**UnitEnum**](#UnitEnum) | | [optional] | - - - -## Enum: CountEnum - -| Name | Value | -|---- | -----| -| NUMBER_12 | 12 | -| NUMBER_36 | 36 | - - - -## Enum: UnitEnum - -| Name | Value | -|---- | -----| -| MONTHLY | "monthly" | - - - diff --git a/equinix-openapi-metal/docs/DedicatedPortCreateInput.md b/equinix-openapi-metal/docs/DedicatedPortCreateInput.md deleted file mode 100644 index e255e69ed..000000000 --- a/equinix-openapi-metal/docs/DedicatedPortCreateInput.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# DedicatedPortCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**billingAccountName** | **String** | The billing account name of the Equinix Fabric account. | [optional] | -|**contactEmail** | **String** | The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. | [optional] | -|**description** | **String** | | [optional] | -|**metro** | **String** | A Metro ID or code. For interconnections with Dedicated Ports, this will be the location of the issued Dedicated Ports. | | -|**mode** | [**ModeEnum**](#ModeEnum) | The mode of the interconnection (only relevant to Dedicated Ports). Fabric VCs won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. | [optional] | -|**name** | **String** | | | -|**project** | **String** | | [optional] | -|**redundancy** | **String** | Either 'primary' or 'redundant'. | | -|**speed** | **Integer** | A interconnection speed, in bps, mbps, or gbps. For Dedicated Ports, this can be 10Gbps or 100Gbps. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | When requesting for a dedicated port, the value of this field should be 'dedicated'. | | -|**useCase** | **String** | The intended use case of the dedicated port. | [optional] | - - - -## Enum: ModeEnum - -| Name | Value | -|---- | -----| -| STANDARD | "standard" | -| TUNNEL | "tunnel" | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| DEDICATED | "dedicated" | - - - diff --git a/equinix-openapi-metal/docs/Device.md b/equinix-openapi-metal/docs/Device.md deleted file mode 100644 index 3d2f5ec89..000000000 --- a/equinix-openapi-metal/docs/Device.md +++ /dev/null @@ -1,72 +0,0 @@ - - -# Device - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**alwaysPxe** | **Boolean** | | [optional] | -|**billingCycle** | **String** | | [optional] | -|**bondingMode** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**createdBy** | [**DeviceCreatedBy**](DeviceCreatedBy.md) | | [optional] | -|**customdata** | **Map<String, Object>** | | [optional] | -|**description** | **String** | | [optional] | -|**facility** | [**Facility**](Facility.md) | | [optional] | -|**firmwareSetId** | **UUID** | The UUID of the firmware set to associate with the device. | [optional] | -|**hardwareReservation** | [**HardwareReservation**](HardwareReservation.md) | | [optional] | -|**hostname** | **String** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**imageUrl** | **String** | | [optional] | -|**ipAddresses** | [**List<IPAssignment>**](IPAssignment.md) | | [optional] | -|**ipxeScriptUrl** | **String** | | [optional] | -|**iqn** | **String** | | [optional] | -|**locked** | **Boolean** | Prevents accidental deletion of this resource when set to true. | [optional] | -|**metro** | [**DeviceMetro**](DeviceMetro.md) | | [optional] | -|**networkFrozen** | **Boolean** | Whether network mode changes such as converting to/from Layer2 or Layer3 networking, bonding or disbonding network interfaces are permitted for the device. | [optional] | -|**networkPorts** | [**List<Port>**](Port.md) | By default, servers at Equinix Metal are configured in a “bonded” mode using LACP (Link Aggregation Control Protocol). Each 2-NIC server is configured with a single bond (namely bond0) with both interfaces eth0 and eth1 as members of the bond in a default Layer 3 mode. Some device plans may have a different number of ports and bonds available. | [optional] | -|**operatingSystem** | [**OperatingSystem**](OperatingSystem.md) | | [optional] | -|**actions** | [**List<DeviceActionsInner>**](DeviceActionsInner.md) | Actions supported by the device instance. | [optional] | -|**plan** | [**Plan**](Plan.md) | | [optional] | -|**project** | [**DeviceProject**](DeviceProject.md) | | [optional] | -|**projectLite** | [**DeviceProjectLite**](DeviceProjectLite.md) | | [optional] | -|**provisioningEvents** | [**List<Event>**](Event.md) | | [optional] | -|**provisioningPercentage** | **Float** | Only visible while device provisioning | [optional] | -|**rootPassword** | **String** | Root password is automatically generated when server is provisioned and it is removed after 24 hours | [optional] | -|**shortId** | **String** | | [optional] | -|**spotInstance** | **Boolean** | Whether or not the device is a spot instance. | [optional] | -|**spotPriceMax** | **Float** | The maximum price per hour you are willing to pay to keep this spot instance. If you are outbid, the termination will be set allowing two minutes before shutdown. | [optional] | -|**sshKeys** | [**List<Href>**](Href.md) | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The current state the instance is in. * When an instance is initially created it will be in the `queued` state until it is picked up by the provisioner. * Once provisioning has begun on the instance it's state will move to `provisioning`. * When an instance is deleted, it will move to `deprovisioning` state until the deprovision is completed and the instance state moves to `deleted`. * If an instance fails to provision or deprovision it will move to `failed` state. * Once an instance has completed provisioning it will move to `active` state. * If an instance is currently powering off or powering on it will move to `powering_off` or `powering_on` states respectively. * When the instance is powered off completely it will move to the `inactive` state. * When an instance is powered on completely it will move to the `active` state. * Using the reinstall action to install a new OS on the instance will cause the instance state to change to `reinstalling`. * When the reinstall action is complete the instance will move to `active` state. | [optional] | -|**storage** | [**Storage**](Storage.md) | | [optional] | -|**switchUuid** | **String** | Switch short id. This can be used to determine if two devices are connected to the same switch, for example. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**terminationTime** | **OffsetDateTime** | When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**user** | **String** | | [optional] | -|**userdata** | **String** | | [optional] | -|**volumes** | [**List<Href>**](Href.md) | | [optional] | -|**sos** | **String** | Hostname used to connect to the instance via the SOS (Serial over SSH) out-of-band console. | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| QUEUED | "queued" | -| PROVISIONING | "provisioning" | -| DEPROVISIONING | "deprovisioning" | -| REINSTALLING | "reinstalling" | -| ACTIVE | "active" | -| INACTIVE | "inactive" | -| FAILED | "failed" | -| POWERING_ON | "powering_on" | -| POWERING_OFF | "powering_off" | -| DELETED | "deleted" | - - - diff --git a/equinix-openapi-metal/docs/DeviceActionInput.md b/equinix-openapi-metal/docs/DeviceActionInput.md deleted file mode 100644 index 1b43262c7..000000000 --- a/equinix-openapi-metal/docs/DeviceActionInput.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# DeviceActionInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | Action to perform. See Device.actions for possible actions. | | -|**forceDelete** | **Boolean** | May be required to perform actions under certain conditions | [optional] | -|**deprovisionFast** | **Boolean** | When type is `reinstall`, enabling fast deprovisioning will bypass full disk wiping. | [optional] | -|**preserveData** | **Boolean** | When type is `reinstall`, preserve the existing data on all disks except the operating-system disk. | [optional] | -|**operatingSystem** | **String** | When type is `reinstall`, use this `operating_system` (defaults to the current `operating system`) | [optional] | -|**ipxeScriptUrl** | **String** | When type is `reinstall`, use this `ipxe_script_url` (`operating_system` must be `custom_ipxe`, defaults to the current `ipxe_script_url`) | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| POWER_ON | "power_on" | -| POWER_OFF | "power_off" | -| REBOOT | "reboot" | -| RESCUE | "rescue" | -| REINSTALL | "reinstall" | - - - diff --git a/equinix-openapi-metal/docs/DeviceActionsInner.md b/equinix-openapi-metal/docs/DeviceActionsInner.md deleted file mode 100644 index ec0fb7ccf..000000000 --- a/equinix-openapi-metal/docs/DeviceActionsInner.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeviceActionsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **String** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/DeviceCreateInFacilityInput.md b/equinix-openapi-metal/docs/DeviceCreateInFacilityInput.md deleted file mode 100644 index 5171cc288..000000000 --- a/equinix-openapi-metal/docs/DeviceCreateInFacilityInput.md +++ /dev/null @@ -1,49 +0,0 @@ - - -# DeviceCreateInFacilityInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**facility** | **List<String>** | The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. | | -|**alwaysPxe** | **Boolean** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] | -|**billingCycle** | [**BillingCycleEnum**](#BillingCycleEnum) | The billing cycle of the device. | [optional] | -|**customdata** | **Map<String, Object>** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] | -|**description** | **String** | Any description of the device or how it will be used. This may be used to inform other API consumers with project access. | [optional] | -|**features** | **List<String>** | The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. | [optional] | -|**hardwareReservationId** | **String** | The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] | -|**hostname** | **String** | The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. | [optional] | -|**ipAddresses** | [**List<IPAddress>**](IPAddress.md) | The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. | [optional] | -|**ipxeScriptUrl** | **String** | When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] | -|**locked** | **Boolean** | Whether the device should be locked, preventing accidental deletion. | [optional] | -|**networkFrozen** | **Boolean** | If true, this instance can not be converted to a different network type. | [optional] | -|**noSshKeys** | **Boolean** | Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified | [optional] | -|**operatingSystem** | **String** | The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. | | -|**plan** | **String** | The slug of the device plan to provision. | | -|**privateIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. | [optional] | -|**projectSshKeys** | **List<UUID>** | A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**publicIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. | [optional] | -|**spotInstance** | **Boolean** | Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. | [optional] | -|**spotPriceMax** | **Float** | The maximum amount to bid for a spot instance. | [optional] | -|**sshKeys** | [**List<SSHKeyInput>**](SSHKeyInput.md) | A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. | [optional] | -|**storage** | [**Storage**](Storage.md) | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**terminationTime** | **OffsetDateTime** | When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. | [optional] | -|**userSshKeys** | **List<UUID>** | A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**userdata** | **String** | The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [optional] | - - - -## Enum: BillingCycleEnum - -| Name | Value | -|---- | -----| -| HOURLY | "hourly" | -| DAILY | "daily" | -| MONTHLY | "monthly" | -| YEARLY | "yearly" | - - - diff --git a/equinix-openapi-metal/docs/DeviceCreateInMetroInput.md b/equinix-openapi-metal/docs/DeviceCreateInMetroInput.md deleted file mode 100644 index e348bb478..000000000 --- a/equinix-openapi-metal/docs/DeviceCreateInMetroInput.md +++ /dev/null @@ -1,49 +0,0 @@ - - -# DeviceCreateInMetroInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**metro** | **String** | Metro code or ID of where the instance should be provisioned in. Either metro or facility must be provided. | | -|**alwaysPxe** | **Boolean** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] | -|**billingCycle** | [**BillingCycleEnum**](#BillingCycleEnum) | The billing cycle of the device. | [optional] | -|**customdata** | **Map<String, Object>** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] | -|**description** | **String** | Any description of the device or how it will be used. This may be used to inform other API consumers with project access. | [optional] | -|**features** | **List<String>** | The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. | [optional] | -|**hardwareReservationId** | **String** | The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] | -|**hostname** | **String** | The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. | [optional] | -|**ipAddresses** | [**List<IPAddress>**](IPAddress.md) | The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. | [optional] | -|**ipxeScriptUrl** | **String** | When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] | -|**locked** | **Boolean** | Whether the device should be locked, preventing accidental deletion. | [optional] | -|**networkFrozen** | **Boolean** | If true, this instance can not be converted to a different network type. | [optional] | -|**noSshKeys** | **Boolean** | Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified | [optional] | -|**operatingSystem** | **String** | The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. | | -|**plan** | **String** | The slug of the device plan to provision. | | -|**privateIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. | [optional] | -|**projectSshKeys** | **List<UUID>** | A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**publicIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. | [optional] | -|**spotInstance** | **Boolean** | Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. | [optional] | -|**spotPriceMax** | **Float** | The maximum amount to bid for a spot instance. | [optional] | -|**sshKeys** | [**List<SSHKeyInput>**](SSHKeyInput.md) | A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. | [optional] | -|**storage** | [**Storage**](Storage.md) | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**terminationTime** | **OffsetDateTime** | When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. | [optional] | -|**userSshKeys** | **List<UUID>** | A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**userdata** | **String** | The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [optional] | - - - -## Enum: BillingCycleEnum - -| Name | Value | -|---- | -----| -| HOURLY | "hourly" | -| DAILY | "daily" | -| MONTHLY | "monthly" | -| YEARLY | "yearly" | - - - diff --git a/equinix-openapi-metal/docs/DeviceCreateInput.md b/equinix-openapi-metal/docs/DeviceCreateInput.md deleted file mode 100644 index 5224e7309..000000000 --- a/equinix-openapi-metal/docs/DeviceCreateInput.md +++ /dev/null @@ -1,48 +0,0 @@ - - -# DeviceCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**alwaysPxe** | **Boolean** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] | -|**billingCycle** | [**BillingCycleEnum**](#BillingCycleEnum) | The billing cycle of the device. | [optional] | -|**customdata** | **Map<String, Object>** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] | -|**description** | **String** | Any description of the device or how it will be used. This may be used to inform other API consumers with project access. | [optional] | -|**features** | **List<String>** | The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. | [optional] | -|**hardwareReservationId** | **String** | The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] | -|**hostname** | **String** | The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. | [optional] | -|**ipAddresses** | [**List<IPAddress>**](IPAddress.md) | The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. | [optional] | -|**ipxeScriptUrl** | **String** | When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] | -|**locked** | **Boolean** | Whether the device should be locked, preventing accidental deletion. | [optional] | -|**networkFrozen** | **Boolean** | If true, this instance can not be converted to a different network type. | [optional] | -|**noSshKeys** | **Boolean** | Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified | [optional] | -|**operatingSystem** | **String** | The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. | | -|**plan** | **String** | The slug of the device plan to provision. | | -|**privateIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. | [optional] | -|**projectSshKeys** | **List<UUID>** | A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**publicIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. | [optional] | -|**spotInstance** | **Boolean** | Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. | [optional] | -|**spotPriceMax** | **Float** | The maximum amount to bid for a spot instance. | [optional] | -|**sshKeys** | [**List<SSHKeyInput>**](SSHKeyInput.md) | A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. | [optional] | -|**storage** | [**Storage**](Storage.md) | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**terminationTime** | **OffsetDateTime** | When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. | [optional] | -|**userSshKeys** | **List<UUID>** | A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**userdata** | **String** | The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [optional] | - - - -## Enum: BillingCycleEnum - -| Name | Value | -|---- | -----| -| HOURLY | "hourly" | -| DAILY | "daily" | -| MONTHLY | "monthly" | -| YEARLY | "yearly" | - - - diff --git a/equinix-openapi-metal/docs/DeviceCreatedBy.md b/equinix-openapi-metal/docs/DeviceCreatedBy.md deleted file mode 100644 index 94e2fbcca..000000000 --- a/equinix-openapi-metal/docs/DeviceCreatedBy.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# DeviceCreatedBy - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**avatarThumbUrl** | **String** | Avatar thumbnail URL of the User | [optional] | -|**createdAt** | **OffsetDateTime** | When the user was created | [optional] | -|**email** | **String** | Primary email address of the User | [optional] | -|**firstName** | **String** | First name of the User | [optional] | -|**fullName** | **String** | Full name of the User | [optional] | -|**href** | **String** | API URL uniquely representing the User | [optional] | -|**id** | **UUID** | ID of the User | | -|**lastName** | **String** | Last name of the User | [optional] | -|**shortId** | **String** | Short ID of the User | | -|**updatedAt** | **OffsetDateTime** | When the user details were last updated | [optional] | - - - diff --git a/equinix-openapi-metal/docs/DeviceHealthRollup.md b/equinix-openapi-metal/docs/DeviceHealthRollup.md deleted file mode 100644 index 18d98c1b0..000000000 --- a/equinix-openapi-metal/docs/DeviceHealthRollup.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# DeviceHealthRollup - -Represents a Device Health Status - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**healthRollup** | [**HealthRollupEnum**](#HealthRollupEnum) | Health Status | [optional] [readonly] | -|**updatedAt** | **OffsetDateTime** | Last update of health status. | [optional] [readonly] | - - - -## Enum: HealthRollupEnum - -| Name | Value | -|---- | -----| -| OK | "ok" | -| WARNING | "warning" | -| CRITICAL | "critical" | - - - diff --git a/equinix-openapi-metal/docs/DeviceList.md b/equinix-openapi-metal/docs/DeviceList.md deleted file mode 100644 index 21de44969..000000000 --- a/equinix-openapi-metal/docs/DeviceList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DeviceList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**devices** | [**List<Device>**](Device.md) | | [optional] | -|**meta** | [**Meta**](Meta.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/DeviceMetro.md b/equinix-openapi-metal/docs/DeviceMetro.md deleted file mode 100644 index 2f35cf3d6..000000000 --- a/equinix-openapi-metal/docs/DeviceMetro.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# DeviceMetro - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**country** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/DeviceProject.md b/equinix-openapi-metal/docs/DeviceProject.md deleted file mode 100644 index 4f29e73d3..000000000 --- a/equinix-openapi-metal/docs/DeviceProject.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeviceProject - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **String** | | | - - - diff --git a/equinix-openapi-metal/docs/DeviceProjectLite.md b/equinix-openapi-metal/docs/DeviceProjectLite.md deleted file mode 100644 index c4c136b12..000000000 --- a/equinix-openapi-metal/docs/DeviceProjectLite.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeviceProjectLite - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **String** | | | - - - diff --git a/equinix-openapi-metal/docs/DeviceUpdateInput.md b/equinix-openapi-metal/docs/DeviceUpdateInput.md deleted file mode 100644 index 9fb2be030..000000000 --- a/equinix-openapi-metal/docs/DeviceUpdateInput.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# DeviceUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**alwaysPxe** | **Boolean** | | [optional] | -|**billingCycle** | **String** | | [optional] | -|**customdata** | **Map<String, Object>** | | [optional] | -|**description** | **String** | | [optional] | -|**hostname** | **String** | | [optional] | -|**firmwareSetId** | **String** | | [optional] | -|**ipxeScriptUrl** | **String** | | [optional] | -|**locked** | **Boolean** | Whether the device should be locked, preventing accidental deletion. | [optional] | -|**networkFrozen** | **Boolean** | If true, this instance can not be converted to a different network type. | [optional] | -|**spotInstance** | **Boolean** | Can be set to false to convert a spot-market instance to on-demand. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**userdata** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/DeviceUsage.md b/equinix-openapi-metal/docs/DeviceUsage.md deleted file mode 100644 index c69bd4a23..000000000 --- a/equinix-openapi-metal/docs/DeviceUsage.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DeviceUsage - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**quantity** | **String** | | [optional] | -|**total** | **String** | | [optional] | -|**unit** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/DeviceUsageList.md b/equinix-openapi-metal/docs/DeviceUsageList.md deleted file mode 100644 index 34dfc3310..000000000 --- a/equinix-openapi-metal/docs/DeviceUsageList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeviceUsageList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**usages** | [**List<DeviceUsage>**](DeviceUsage.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/DevicesApi.md b/equinix-openapi-metal/docs/DevicesApi.md deleted file mode 100644 index 16ba53068..000000000 --- a/equinix-openapi-metal/docs/DevicesApi.md +++ /dev/null @@ -1,1564 +0,0 @@ -# DevicesApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createBgpSession**](DevicesApi.md#createBgpSession) | **POST** /devices/{id}/bgp/sessions | Create a BGP session | -| [**createDevice**](DevicesApi.md#createDevice) | **POST** /projects/{id}/devices | Create a device | -| [**createIPAssignment**](DevicesApi.md#createIPAssignment) | **POST** /devices/{id}/ips | Create an ip assignment | -| [**deleteDevice**](DevicesApi.md#deleteDevice) | **DELETE** /devices/{id} | Delete the device | -| [**findBgpSessions**](DevicesApi.md#findBgpSessions) | **GET** /devices/{id}/bgp/sessions | Retrieve all BGP sessions | -| [**findDeviceById**](DevicesApi.md#findDeviceById) | **GET** /devices/{id} | Retrieve a device | -| [**findDeviceCustomdata**](DevicesApi.md#findDeviceCustomdata) | **GET** /devices/{id}/customdata | Retrieve the custom metadata of an instance | -| [**findDeviceMetadataByID**](DevicesApi.md#findDeviceMetadataByID) | **GET** /devices/{id}/metadata | Retrieve metadata | -| [**findDeviceUserdataByID**](DevicesApi.md#findDeviceUserdataByID) | **GET** /devices/{id}/userdata | Retrieve userdata | -| [**findIPAssignmentCustomdata**](DevicesApi.md#findIPAssignmentCustomdata) | **GET** /devices/{instance_id}/ips/{id}/customdata | Retrieve the custom metadata of an IP Assignment | -| [**findIPAssignments**](DevicesApi.md#findIPAssignments) | **GET** /devices/{id}/ips | Retrieve all ip assignments | -| [**findInstanceBandwidth**](DevicesApi.md#findInstanceBandwidth) | **GET** /devices/{id}/bandwidth | Retrieve an instance bandwidth | -| [**findOrganizationDevices**](DevicesApi.md#findOrganizationDevices) | **GET** /organizations/{id}/devices | Retrieve all devices of an organization | -| [**findProjectDevices**](DevicesApi.md#findProjectDevices) | **GET** /projects/{id}/devices | Retrieve all devices of a project | -| [**findTraffic**](DevicesApi.md#findTraffic) | **GET** /devices/{id}/traffic | Retrieve device traffic | -| [**getBgpNeighborData**](DevicesApi.md#getBgpNeighborData) | **GET** /devices/{id}/bgp/neighbors | Retrieve BGP neighbor data for this device | -| [**getDeviceFirmwareSets**](DevicesApi.md#getDeviceFirmwareSets) | **GET** /devices/{id}/firmware-sets | Get Device's associated Firmware Set | -| [**getDeviceHealthRollup**](DevicesApi.md#getDeviceHealthRollup) | **GET** /devices/{id}/diagnostics/health/rollup | Get Device's Health Status | -| [**performAction**](DevicesApi.md#performAction) | **POST** /devices/{id}/actions | Perform an action | -| [**updateDevice**](DevicesApi.md#updateDevice) | **PUT** /devices/{id} | Update the device | - - - -# **createBgpSession** -> BgpSession createBgpSession(id, bgPSessionInput, include) - -Create a BGP session - -Creates a BGP session. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - BGPSessionInput bgPSessionInput = new BGPSessionInput(); // BGPSessionInput | BGP session to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - BgpSession result = apiInstance.createBgpSession(id, bgPSessionInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#createBgpSession"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **bgPSessionInput** | [**BGPSessionInput**](BGPSessionInput.md)| BGP session to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**BgpSession**](BgpSession.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **422** | unprocessable entity | - | - - -# **createDevice** -> Device createDevice(id, createDeviceRequest, include, exclude) - -Create a device - -Creates a new device and provisions it in the specified location. Device type-specific options are accepted. For example, `baremetal` devices accept `operating_system`, `hostname`, and `plan`. These parameters may not be accepted for other device types. The default device type is `baremetal`. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - CreateDeviceRequest createDeviceRequest = new CreateDeviceRequest(); // CreateDeviceRequest | Device to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Device result = apiInstance.createDevice(id, createDeviceRequest, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#createDevice"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **createDeviceRequest** | [**CreateDeviceRequest**](CreateDeviceRequest.md)| Device to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Device**](Device.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createIPAssignment** -> IPAssignment createIPAssignment(id, ipAssignmentInput, include, exclude) - -Create an ip assignment - -Creates an ip assignment for a device. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - IPAssignmentInput ipAssignmentInput = new IPAssignmentInput(); // IPAssignmentInput | IPAssignment to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - IPAssignment result = apiInstance.createIPAssignment(id, ipAssignmentInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#createIPAssignment"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **ipAssignmentInput** | [**IPAssignmentInput**](IPAssignmentInput.md)| IPAssignment to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**IPAssignment**](IPAssignment.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteDevice** -> deleteDevice(id, forceDelete) - -Delete the device - -Deletes a device and deprovisions it in our datacenter. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - Boolean forceDelete = true; // Boolean | Force the deletion of the device, by detaching any storage volume still active. - try { - apiInstance.deleteDevice(id, forceDelete); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#deleteDevice"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **forceDelete** | **Boolean**| Force the deletion of the device, by detaching any storage volume still active. | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **findBgpSessions** -> BgpSessionList findBgpSessions(id, include) - -Retrieve all BGP sessions - -Provides a listing of available BGP sessions for the device. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - BgpSessionList result = apiInstance.findBgpSessions(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findBgpSessions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**BgpSessionList**](BgpSessionList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | - - -# **findDeviceById** -> Device findDeviceById(id, include, exclude) - -Retrieve a device - -Type-specific options (such as facility for baremetal devices) will be included as part of the main data structure. State value can be one of: active inactive queued or provisioning - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Device result = apiInstance.findDeviceById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findDeviceById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Device**](Device.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findDeviceCustomdata** -> findDeviceCustomdata(id) - -Retrieve the custom metadata of an instance - -Provides the custom metadata stored for this instance in json format - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Instance UUID - try { - apiInstance.findDeviceCustomdata(id); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findDeviceCustomdata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Instance UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findDeviceMetadataByID** -> Metadata findDeviceMetadataByID(id) - -Retrieve metadata - -Retrieve device metadata - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - try { - Metadata result = apiInstance.findDeviceMetadataByID(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findDeviceMetadataByID"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | - -### Return type - -[**Metadata**](Metadata.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **findDeviceUserdataByID** -> Userdata findDeviceUserdataByID(id) - -Retrieve userdata - -Retrieve device userdata - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - try { - Userdata result = apiInstance.findDeviceUserdataByID(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findDeviceUserdataByID"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | - -### Return type - -[**Userdata**](Userdata.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **findIPAssignmentCustomdata** -> findIPAssignmentCustomdata(instanceId, id) - -Retrieve the custom metadata of an IP Assignment - -Provides the custom metadata stored for this IP Assignment in json format - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID instanceId = UUID.randomUUID(); // UUID | Instance UUID - UUID id = UUID.randomUUID(); // UUID | Ip Assignment UUID - try { - apiInstance.findIPAssignmentCustomdata(instanceId, id); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findIPAssignmentCustomdata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **instanceId** | **UUID**| Instance UUID | | -| **id** | **UUID**| Ip Assignment UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findIPAssignments** -> IPAssignmentList findIPAssignments(id, include, exclude) - -Retrieve all ip assignments - -Returns all ip assignments for a device. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - IPAssignmentList result = apiInstance.findIPAssignments(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findIPAssignments"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**IPAssignmentList**](IPAssignmentList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findInstanceBandwidth** -> findInstanceBandwidth(id, from, until) - -Retrieve an instance bandwidth - -Retrieve an instance bandwidth for a given period of time. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - String from = "from_example"; // String | Timestamp from range - String until = "until_example"; // String | Timestamp to range - try { - apiInstance.findInstanceBandwidth(id, from, until); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findInstanceBandwidth"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **from** | **String**| Timestamp from range | | -| **until** | **String**| Timestamp to range | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findOrganizationDevices** -> DeviceList findOrganizationDevices(id, search, categories, facility, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage) - -Retrieve all devices of an organization - -Provides a collection of devices for a given organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - String search = "search_example"; // String | Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. - List categories = Arrays.asList(); // List | Filter by plan category - String facility = "facility_example"; // String | Filter by device facility - String hostname = "hostname_example"; // String | Filter by partial hostname - Boolean reserved = true; // Boolean | Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. - String tag = "tag_example"; // String | Filter by device tag - String type = "type_example"; // String | Filter by instance type (ondemand,spot,reserved) - Boolean hasTerminationTime = true; // Boolean | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - DeviceList result = apiInstance.findOrganizationDevices(id, search, categories, facility, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findOrganizationDevices"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **search** | **String**| Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. | [optional] | -| **categories** | [**List<String>**](String.md)| Filter by plan category | [optional] [enum: compute, storage, vmce] | -| **facility** | **String**| Filter by device facility | [optional] | -| **hostname** | **String**| Filter by partial hostname | [optional] | -| **reserved** | **Boolean**| Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. | [optional] | -| **tag** | **String**| Filter by device tag | [optional] | -| **type** | **String**| Filter by instance type (ondemand,spot,reserved) | [optional] | -| **hasTerminationTime** | **Boolean**| Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**DeviceList**](DeviceList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectDevices** -> DeviceList findProjectDevices(id, search, categories, facility, metro, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage) - -Retrieve all devices of a project - -Provides a collection of devices for a given project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - String search = "search_example"; // String | Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. - List categories = Arrays.asList(); // List | Filter by plan category - String facility = "facility_example"; // String | Filter by device facility - String metro = "metro_example"; // String | Filter by device metro - String hostname = "hostname_example"; // String | Filter by partial hostname - Boolean reserved = true; // Boolean | Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. - String tag = "tag_example"; // String | Filter by device tag - String type = "type_example"; // String | Filter by instance type (ondemand,spot,reserved) - Boolean hasTerminationTime = true; // Boolean | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - DeviceList result = apiInstance.findProjectDevices(id, search, categories, facility, metro, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findProjectDevices"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **search** | **String**| Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. | [optional] | -| **categories** | [**List<String>**](String.md)| Filter by plan category | [optional] [enum: compute, storage, vmce] | -| **facility** | **String**| Filter by device facility | [optional] | -| **metro** | **String**| Filter by device metro | [optional] | -| **hostname** | **String**| Filter by partial hostname | [optional] | -| **reserved** | **Boolean**| Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. | [optional] | -| **tag** | **String**| Filter by device tag | [optional] | -| **type** | **String**| Filter by instance type (ondemand,spot,reserved) | [optional] | -| **hasTerminationTime** | **Boolean**| Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**DeviceList**](DeviceList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findTraffic** -> findTraffic(id, direction, interval, bucket, timeframe) - -Retrieve device traffic - -Returns traffic for a specific device. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - String direction = "inbound"; // String | Traffic direction - String interval = "minute"; // String | Traffic interval - String bucket = "internal"; // String | Traffic bucket - FindTrafficTimeframeParameter timeframe = new FindTrafficTimeframeParameter(); // FindTrafficTimeframeParameter | - try { - apiInstance.findTraffic(id, direction, interval, bucket, timeframe); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#findTraffic"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **direction** | **String**| Traffic direction | [enum: inbound, outbound] | -| **interval** | **String**| Traffic interval | [optional] [enum: minute, hour, day, week, month, year, hour_of_day, day_of_week, day_of_month, month_of_year] | -| **bucket** | **String**| Traffic bucket | [optional] [enum: internal, external] | -| **timeframe** | [**FindTrafficTimeframeParameter**](.md)| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **getBgpNeighborData** -> BgpSessionNeighbors getBgpNeighborData(id, include) - -Retrieve BGP neighbor data for this device - -Provides a summary of the BGP neighbor data associated to the BGP sessions for this device. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - BgpSessionNeighbors result = apiInstance.getBgpNeighborData(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#getBgpNeighborData"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**BgpSessionNeighbors**](BgpSessionNeighbors.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **getDeviceFirmwareSets** -> FirmwareSetResponse getDeviceFirmwareSets(id) - -Get Device's associated Firmware Set - -Returns the firmware set associated with the device. If a custom firmware set is associated with the device, then it is returned. Otherwise, if a default firmware set is available it is returned. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - try { - FirmwareSetResponse result = apiInstance.getDeviceFirmwareSets(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#getDeviceFirmwareSets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | - -### Return type - -[**FirmwareSetResponse**](FirmwareSetResponse.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **401** | Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. | - | -| **404** | Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. | - | -| **500** | Internal Server Error | - | - - -# **getDeviceHealthRollup** -> DeviceHealthRollup getDeviceHealthRollup(id) - -Get Device's Health Status - -Returns the health rollup status of the device. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - try { - DeviceHealthRollup result = apiInstance.getDeviceHealthRollup(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#getDeviceHealthRollup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | - -### Return type - -[**DeviceHealthRollup**](DeviceHealthRollup.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **401** | Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. | - | -| **404** | Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. | - | -| **500** | Internal Server Error | - | - - -# **performAction** -> performAction(id, deviceActionInput) - -Perform an action - -Performs an action for the given device. Possible actions include: power_on, power_off, reboot, reinstall, and rescue (reboot the device into rescue OS.) - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - DeviceActionInput deviceActionInput = new DeviceActionInput(); // DeviceActionInput | Action to perform - try { - apiInstance.performAction(id, deviceActionInput); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#performAction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **deviceActionInput** | [**DeviceActionInput**](DeviceActionInput.md)| Action to perform | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **202** | accepted | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **updateDevice** -> Device updateDevice(id, deviceUpdateInput, include, exclude) - -Update the device - -Updates the device. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.DevicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - DevicesApi apiInstance = new DevicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - DeviceUpdateInput deviceUpdateInput = new DeviceUpdateInput(); // DeviceUpdateInput | Device to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Device result = apiInstance.updateDevice(id, deviceUpdateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DevicesApi#updateDevice"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **deviceUpdateInput** | [**DeviceUpdateInput**](DeviceUpdateInput.md)| Device to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Device**](Device.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Disk.md b/equinix-openapi-metal/docs/Disk.md deleted file mode 100644 index fb0a78d0a..000000000 --- a/equinix-openapi-metal/docs/Disk.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Disk - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**device** | **String** | | [optional] | -|**wipeTable** | **Boolean** | | [optional] | -|**partitions** | [**List<Partition>**](Partition.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/Email.md b/equinix-openapi-metal/docs/Email.md deleted file mode 100644 index f58ce686c..000000000 --- a/equinix-openapi-metal/docs/Email.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# Email - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | **String** | | [optional] | -|**_default** | **Boolean** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**verified** | **Boolean** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/EmailInput.md b/equinix-openapi-metal/docs/EmailInput.md deleted file mode 100644 index 0be12cc2d..000000000 --- a/equinix-openapi-metal/docs/EmailInput.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# EmailInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | **String** | | | -|**_default** | **Boolean** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/EmailsApi.md b/equinix-openapi-metal/docs/EmailsApi.md deleted file mode 100644 index cb54ecf45..000000000 --- a/equinix-openapi-metal/docs/EmailsApi.md +++ /dev/null @@ -1,301 +0,0 @@ -# EmailsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createEmail**](EmailsApi.md#createEmail) | **POST** /emails | Create an email | -| [**deleteEmail**](EmailsApi.md#deleteEmail) | **DELETE** /emails/{id} | Delete the email | -| [**findEmailById**](EmailsApi.md#findEmailById) | **GET** /emails/{id} | Retrieve an email | -| [**updateEmail**](EmailsApi.md#updateEmail) | **PUT** /emails/{id} | Update the email | - - - -# **createEmail** -> Email createEmail(createEmailInput) - -Create an email - -Add a new email address to the current user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EmailsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EmailsApi apiInstance = new EmailsApi(defaultClient); - CreateEmailInput createEmailInput = new CreateEmailInput(); // CreateEmailInput | Email to create - try { - Email result = apiInstance.createEmail(createEmailInput); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EmailsApi#createEmail"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **createEmailInput** | [**CreateEmailInput**](CreateEmailInput.md)| Email to create | | - -### Return type - -[**Email**](Email.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **deleteEmail** -> deleteEmail(id) - -Delete the email - -Deletes the email. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EmailsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EmailsApi apiInstance = new EmailsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Email UUID - try { - apiInstance.deleteEmail(id); - } catch (ApiException e) { - System.err.println("Exception when calling EmailsApi#deleteEmail"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Email UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findEmailById** -> Email findEmailById(id) - -Retrieve an email - -Provides one of the user’s emails. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EmailsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EmailsApi apiInstance = new EmailsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Email UUID - try { - Email result = apiInstance.findEmailById(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EmailsApi#findEmailById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Email UUID | | - -### Return type - -[**Email**](Email.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **updateEmail** -> Email updateEmail(id, updateEmailInput) - -Update the email - -Updates the email. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EmailsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EmailsApi apiInstance = new EmailsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Email UUID - UpdateEmailInput updateEmailInput = new UpdateEmailInput(); // UpdateEmailInput | email to update - try { - Email result = apiInstance.updateEmail(id, updateEmailInput); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EmailsApi#updateEmail"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Email UUID | | -| **updateEmailInput** | [**UpdateEmailInput**](UpdateEmailInput.md)| email to update | | - -### Return type - -[**Email**](Email.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Entitlement.md b/equinix-openapi-metal/docs/Entitlement.md deleted file mode 100644 index e5651996b..000000000 --- a/equinix-openapi-metal/docs/Entitlement.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# Entitlement - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**featureAccess** | **Object** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | | -|**instanceQuota** | **Object** | | [optional] | -|**ipQuota** | **Object** | | [optional] | -|**name** | **String** | | [optional] | -|**projectQuota** | **Integer** | | [optional] | -|**slug** | **String** | | | -|**volumeLimits** | **Object** | | [optional] | -|**volumeQuota** | **Object** | | [optional] | -|**weight** | **Integer** | | | - - - diff --git a/equinix-openapi-metal/docs/Error.md b/equinix-openapi-metal/docs/Error.md deleted file mode 100644 index 54bf06feb..000000000 --- a/equinix-openapi-metal/docs/Error.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Error - -Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**error** | **String** | A description of the error that caused the request to fail. | [optional] | -|**errors** | **List<String>** | A list of errors that contributed to the request failing. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/Event.md b/equinix-openapi-metal/docs/Event.md deleted file mode 100644 index a5c9fc503..000000000 --- a/equinix-openapi-metal/docs/Event.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# Event - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**body** | **String** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**interpolated** | **String** | | [optional] | -|**relationships** | [**List<Href>**](Href.md) | | [optional] | -|**state** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**modifiedBy** | **Object** | | [optional] | -|**ip** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/EventList.md b/equinix-openapi-metal/docs/EventList.md deleted file mode 100644 index ff16d5bc2..000000000 --- a/equinix-openapi-metal/docs/EventList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# EventList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**events** | [**List<Event>**](Event.md) | | [optional] | -|**meta** | [**Meta**](Meta.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/EventsApi.md b/equinix-openapi-metal/docs/EventsApi.md deleted file mode 100644 index 67971be1e..000000000 --- a/equinix-openapi-metal/docs/EventsApi.md +++ /dev/null @@ -1,731 +0,0 @@ -# EventsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findDeviceEvents**](EventsApi.md#findDeviceEvents) | **GET** /devices/{id}/events | Retrieve device's events | -| [**findEventById**](EventsApi.md#findEventById) | **GET** /events/{id} | Retrieve an event | -| [**findEvents**](EventsApi.md#findEvents) | **GET** /events | Retrieve current user's events | -| [**findInterconnectionEvents**](EventsApi.md#findInterconnectionEvents) | **GET** /connections/{connection_id}/events | Retrieve interconnection events | -| [**findInterconnectionPortEvents**](EventsApi.md#findInterconnectionPortEvents) | **GET** /connections/{connection_id}/ports/{id}/events | Retrieve interconnection port events | -| [**findOrganizationEvents**](EventsApi.md#findOrganizationEvents) | **GET** /organizations/{id}/events | Retrieve organization's events | -| [**findProjectEvents**](EventsApi.md#findProjectEvents) | **GET** /projects/{id}/events | Retrieve project's events | -| [**findVirtualCircuitEvents**](EventsApi.md#findVirtualCircuitEvents) | **GET** /virtual-circuits/{id}/events | Retrieve virtual circuit events | -| [**findVrfRouteEvents**](EventsApi.md#findVrfRouteEvents) | **GET** /routes/{id}/events | Retrieve VRF route events | - - - -# **findDeviceEvents** -> EventList findDeviceEvents(id, include, exclude, page, perPage) - -Retrieve device's events - -Returns a list of events pertaining to a specific device - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - EventList result = apiInstance.findDeviceEvents(id, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findDeviceEvents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**EventList**](EventList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findEventById** -> Event findEventById(id, include, exclude) - -Retrieve an event - -Returns a single event if the user has access - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Event UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Event result = apiInstance.findEventById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findEventById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Event UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Event**](Event.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findEvents** -> EventList findEvents(include, exclude, page, perPage) - -Retrieve current user's events - -Returns a list of the current user’s events - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - EventList result = apiInstance.findEvents(include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findEvents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**EventList**](EventList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findInterconnectionEvents** -> EventList findInterconnectionEvents(connectionId, include, exclude, page, perPage) - -Retrieve interconnection events - -Returns a list of the interconnection events - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | Interconnection UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - EventList result = apiInstance.findInterconnectionEvents(connectionId, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findInterconnectionEvents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| Interconnection UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**EventList**](EventList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findInterconnectionPortEvents** -> Event findInterconnectionPortEvents(connectionId, id, include, exclude, page, perPage) - -Retrieve interconnection port events - -Returns a list of the interconnection port events - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | Interconnection UUID - UUID id = UUID.randomUUID(); // UUID | Interconnection Port UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - Event result = apiInstance.findInterconnectionPortEvents(connectionId, id, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findInterconnectionPortEvents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| Interconnection UUID | | -| **id** | **UUID**| Interconnection Port UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**Event**](Event.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findOrganizationEvents** -> EventList findOrganizationEvents(id, include, exclude, page, perPage) - -Retrieve organization's events - -Returns a list of events for a single organization - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - EventList result = apiInstance.findOrganizationEvents(id, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findOrganizationEvents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**EventList**](EventList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectEvents** -> EventList findProjectEvents(id, include, exclude, page, perPage) - -Retrieve project's events - -Returns a list of events for a single project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - EventList result = apiInstance.findProjectEvents(id, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findProjectEvents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**EventList**](EventList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findVirtualCircuitEvents** -> Event findVirtualCircuitEvents(id, include, exclude, page, perPage) - -Retrieve virtual circuit events - -Returns a list of the virtual circuit events - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Virtual Circuit UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - Event result = apiInstance.findVirtualCircuitEvents(id, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findVirtualCircuitEvents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Virtual Circuit UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**Event**](Event.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findVrfRouteEvents** -> Event findVrfRouteEvents(id, include, exclude, page, perPage) - -Retrieve VRF route events - -Returns a list of the VRF route events - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.EventsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - EventsApi apiInstance = new EventsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF Route UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - Event result = apiInstance.findVrfRouteEvents(id, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EventsApi#findVrfRouteEvents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF Route UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**Event**](Event.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/FabricServiceToken.md b/equinix-openapi-metal/docs/FabricServiceToken.md deleted file mode 100644 index 39b29f25a..000000000 --- a/equinix-openapi-metal/docs/FabricServiceToken.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# FabricServiceToken - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**expiresAt** | **OffsetDateTime** | The expiration date and time of the Fabric service token. Once a service token is expired, it is no longer redeemable. | [optional] | -|**id** | **UUID** | The UUID that can be used on the Fabric Portal to redeem either an A-Side or Z-Side Service Token. For Fabric VCs (Metal Billed), this UUID will represent an A-Side Service Token, which will allow interconnections to be made from Equinix Metal to other Service Providers on Fabric. For Fabric VCs (Fabric Billed), this UUID will represent a Z-Side Service Token, which will allow interconnections to be made to connect an owned Fabric Port or Virtual Device to Equinix Metal. | [optional] | -|**maxAllowedSpeed** | **Integer** | The maximum speed that can be selected on the Fabric Portal when configuring a interconnection with either an A-Side or Z-Side Service Token. For Fabric VCs (Metal Billed), this is what the billing is based off of, and can be one of the following options, '50mbps', '200mbps', '500mbps', '1gbps', '2gbps', '5gbps' or '10gbps'. For Fabric VCs (Fabric Billed), this will default to 10Gbps. | [optional] | -|**role** | [**RoleEnum**](#RoleEnum) | Either primary or secondary, depending on which interconnection the service token is associated to. | [optional] | -|**serviceTokenType** | [**ServiceTokenTypeEnum**](#ServiceTokenTypeEnum) | Either 'a_side' or 'z_side', depending on which type of Fabric VC was requested. | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The state of the service token that corresponds with the service token state on Fabric. An 'inactive' state refers to a token that has not been redeemed yet on the Fabric side, an 'active' state refers to a token that has already been redeemed, and an 'expired' state refers to a token that has reached its expiry time. | [optional] | - - - -## Enum: RoleEnum - -| Name | Value | -|---- | -----| -| PRIMARY | "primary" | -| SECONDARY | "secondary" | - - - -## Enum: ServiceTokenTypeEnum - -| Name | Value | -|---- | -----| -| A_SIDE | "a_side" | -| Z_SIDE | "z_side" | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| INACTIVE | "inactive" | -| ACTIVE | "active" | -| EXPIRED | "expired" | - - - diff --git a/equinix-openapi-metal/docs/FacilitiesApi.md b/equinix-openapi-metal/docs/FacilitiesApi.md deleted file mode 100644 index b6d3704ba..000000000 --- a/equinix-openapi-metal/docs/FacilitiesApi.md +++ /dev/null @@ -1,235 +0,0 @@ -# FacilitiesApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findFacilities**](FacilitiesApi.md#findFacilities) | **GET** /facilities | Retrieve all facilities | -| [**findFacilitiesByOrganization**](FacilitiesApi.md#findFacilitiesByOrganization) | **GET** /organizations/{id}/facilities | Retrieve all facilities visible by the organization | -| [**findFacilitiesByProject**](FacilitiesApi.md#findFacilitiesByProject) | **GET** /projects/{id}/facilities | Retrieve all facilities visible by the project | - - - -# **findFacilities** -> FacilityList findFacilities(include, exclude) - -Retrieve all facilities - -Provides a listing of available datacenters where you can provision Packet devices. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.FacilitiesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - FacilitiesApi apiInstance = new FacilitiesApi(defaultClient); - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - FacilityList result = apiInstance.findFacilities(include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FacilitiesApi#findFacilities"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] [enum: address, labels] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] [enum: address, labels] | - -### Return type - -[**FacilityList**](FacilityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findFacilitiesByOrganization** -> FacilityList findFacilitiesByOrganization(id, include, exclude) - -Retrieve all facilities visible by the organization - -Returns a listing of available datacenters for the given organization - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.FacilitiesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - FacilitiesApi apiInstance = new FacilitiesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - FacilityList result = apiInstance.findFacilitiesByOrganization(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FacilitiesApi#findFacilitiesByOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**FacilityList**](FacilityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findFacilitiesByProject** -> FacilityList findFacilitiesByProject(id, include, exclude) - -Retrieve all facilities visible by the project - -Returns a listing of available datacenters for the given project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.FacilitiesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - FacilitiesApi apiInstance = new FacilitiesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - FacilityList result = apiInstance.findFacilitiesByProject(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FacilitiesApi#findFacilitiesByProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**FacilityList**](FacilityList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/Facility.md b/equinix-openapi-metal/docs/Facility.md deleted file mode 100644 index ac4739569..000000000 --- a/equinix-openapi-metal/docs/Facility.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# Facility - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | [**Address**](Address.md) | | [optional] | -|**code** | **String** | | [optional] | -|**features** | [**List<FeaturesEnum>**](#List<FeaturesEnum>) | | [optional] | -|**id** | **UUID** | | [optional] | -|**ipRanges** | **List<String>** | IP ranges registered in facility. Can be used for GeoIP location | [optional] | -|**metro** | [**DeviceMetro**](DeviceMetro.md) | | [optional] | -|**name** | **String** | | [optional] | - - - -## Enum: List<FeaturesEnum> - -| Name | Value | -|---- | -----| -| BAREMETAL | "baremetal" | -| BACKEND_TRANSFER | "backend_transfer" | -| LAYER_2 | "layer_2" | -| GLOBAL_IPV4 | "global_ipv4" | -| IBX | "ibx" | - - - diff --git a/equinix-openapi-metal/docs/FacilityInput.md b/equinix-openapi-metal/docs/FacilityInput.md deleted file mode 100644 index f87a5c6d3..000000000 --- a/equinix-openapi-metal/docs/FacilityInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# FacilityInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**facility** | **List<String>** | The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. | | - - - diff --git a/equinix-openapi-metal/docs/FacilityList.md b/equinix-openapi-metal/docs/FacilityList.md deleted file mode 100644 index 7842b8f6d..000000000 --- a/equinix-openapi-metal/docs/FacilityList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# FacilityList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**facilities** | [**List<Facility>**](Facility.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/Filesystem.md b/equinix-openapi-metal/docs/Filesystem.md deleted file mode 100644 index d68ef7c43..000000000 --- a/equinix-openapi-metal/docs/Filesystem.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Filesystem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**mount** | [**Mount**](Mount.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/FindIPAddressById200Response.md b/equinix-openapi-metal/docs/FindIPAddressById200Response.md deleted file mode 100644 index 582253728..000000000 --- a/equinix-openapi-metal/docs/FindIPAddressById200Response.md +++ /dev/null @@ -1,58 +0,0 @@ - - -# FindIPAddressById200Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | **String** | | [optional] | -|**addressFamily** | **Integer** | | [optional] | -|**assignedTo** | [**Href**](Href.md) | | [optional] | -|**cidr** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**enabled** | **Boolean** | | [optional] | -|**gateway** | **String** | | [optional] | -|**globalIp** | **Boolean** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**manageable** | **Boolean** | | [optional] | -|**management** | **Boolean** | | [optional] | -|**metro** | [**Metro**](Metro.md) | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**parentBlock** | [**ParentBlock**](ParentBlock.md) | | [optional] | -|**_public** | **Boolean** | | [optional] | -|**state** | **String** | | [optional] | -|**nextHop** | **String** | Only set when this is a Metal Gateway Elastic IP Assignment. The IP address within the Metal Gateway to which requests to the Elastic IP are forwarded. | [optional] | -|**addon** | **Boolean** | | [optional] | -|**assignments** | [**List<IPAssignment>**](IPAssignment.md) | | [optional] | -|**available** | **String** | | [optional] | -|**bill** | **Boolean** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**details** | **String** | | [optional] | -|**facility** | [**IPReservationFacility**](IPReservationFacility.md) | | [optional] | -|**metalGateway** | [**MetalGatewayLite**](MetalGatewayLite.md) | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**projectLite** | [**Project**](Project.md) | | [optional] | -|**requestedBy** | [**Href**](Href.md) | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| GLOBAL_IPV4 | "global_ipv4" | -| PUBLIC_IPV4 | "public_ipv4" | -| PRIVATE_IPV4 | "private_ipv4" | -| PUBLIC_IPV6 | "public_ipv6" | -| VRF | "vrf" | - - - diff --git a/equinix-openapi-metal/docs/FindMetalGatewayById200Response.md b/equinix-openapi-metal/docs/FindMetalGatewayById200Response.md deleted file mode 100644 index f22529e98..000000000 --- a/equinix-openapi-metal/docs/FindMetalGatewayById200Response.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# FindMetalGatewayById200Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**ipReservation** | [**VrfIpReservationOrHref**](VrfIpReservationOrHref.md) | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**virtualNetwork** | [**VirtualNetwork**](VirtualNetwork.md) | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| READY | "ready" | -| ACTIVE | "active" | -| DELETING | "deleting" | - - - diff --git a/equinix-openapi-metal/docs/FindTrafficTimeframeParameter.md b/equinix-openapi-metal/docs/FindTrafficTimeframeParameter.md deleted file mode 100644 index d18d853d2..000000000 --- a/equinix-openapi-metal/docs/FindTrafficTimeframeParameter.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FindTrafficTimeframeParameter - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**endedAt** | **OffsetDateTime** | | | -|**startedAt** | **OffsetDateTime** | | | - - - diff --git a/equinix-openapi-metal/docs/FirmwareSet.md b/equinix-openapi-metal/docs/FirmwareSet.md deleted file mode 100644 index 7d4d45489..000000000 --- a/equinix-openapi-metal/docs/FirmwareSet.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# FirmwareSet - -Represents a Firmware Set - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**uuid** | **UUID** | Firmware Set UUID | [readonly] | -|**name** | **String** | Firmware Set Name | [readonly] | -|**createdAt** | **OffsetDateTime** | Datetime when the block was created. | [optional] [readonly] | -|**updatedAt** | **OffsetDateTime** | Datetime when the block was updated. | [optional] [readonly] | -|**attributes** | [**List<Attribute>**](Attribute.md) | Represents a list of attributes | [optional] | -|**componentFirmware** | [**List<Component>**](Component.md) | List of components versions | [optional] | - - - diff --git a/equinix-openapi-metal/docs/FirmwareSetListResponse.md b/equinix-openapi-metal/docs/FirmwareSetListResponse.md deleted file mode 100644 index 23b782e63..000000000 --- a/equinix-openapi-metal/docs/FirmwareSetListResponse.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# FirmwareSetListResponse - -Represents collection of Firmware Sets - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pageSize** | **Integer** | Max number of items returned in a page | [optional] | -|**page** | **Integer** | Page returned | [optional] | -|**pageCount** | **Integer** | Items returned in current page | [optional] | -|**totalPages** | **Integer** | Total count of pages | [optional] | -|**totalRecordCount** | **Integer** | Total count of items | [optional] | -|**records** | [**List<FirmwareSet>**](FirmwareSet.md) | Represents a list of FirmwareSets | [optional] | - - - diff --git a/equinix-openapi-metal/docs/FirmwareSetResponse.md b/equinix-openapi-metal/docs/FirmwareSetResponse.md deleted file mode 100644 index 154fa0e99..000000000 --- a/equinix-openapi-metal/docs/FirmwareSetResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FirmwareSetResponse - -Represents single Firmware set response - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**record** | [**FirmwareSet**](FirmwareSet.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/FirmwareSetsApi.md b/equinix-openapi-metal/docs/FirmwareSetsApi.md deleted file mode 100644 index 6b08f7c98..000000000 --- a/equinix-openapi-metal/docs/FirmwareSetsApi.md +++ /dev/null @@ -1,162 +0,0 @@ -# FirmwareSetsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getOrganizationFirmwareSets**](FirmwareSetsApi.md#getOrganizationFirmwareSets) | **GET** /organizations/{id}/firmware-sets | Get Organization's Firmware Sets | -| [**getProjectFirmwareSets**](FirmwareSetsApi.md#getProjectFirmwareSets) | **GET** /projects/{id}/firmware-sets | Get Project's Firmware Sets | - - - -# **getOrganizationFirmwareSets** -> FirmwareSetListResponse getOrganizationFirmwareSets(id, page, perPage) - -Get Organization's Firmware Sets - -Returns all firmware sets associated with the organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.FirmwareSetsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - FirmwareSetsApi apiInstance = new FirmwareSetsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - Integer page = 56; // Integer | page number to return - Integer perPage = 56; // Integer | items returned per page. - try { - FirmwareSetListResponse result = apiInstance.getOrganizationFirmwareSets(id, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FirmwareSetsApi#getOrganizationFirmwareSets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **page** | **Integer**| page number to return | [optional] | -| **perPage** | **Integer**| items returned per page. | [optional] | - -### Return type - -[**FirmwareSetListResponse**](FirmwareSetListResponse.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **401** | Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. | - | -| **404** | Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. | - | -| **500** | Internal Server Error | - | - - -# **getProjectFirmwareSets** -> FirmwareSetListResponse getProjectFirmwareSets(id, page, perPage) - -Get Project's Firmware Sets - -Returns all firmware sets associated with the project or organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.FirmwareSetsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - FirmwareSetsApi apiInstance = new FirmwareSetsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - Integer page = 56; // Integer | page number to return - Integer perPage = 56; // Integer | items returned per page. - try { - FirmwareSetListResponse result = apiInstance.getProjectFirmwareSets(id, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FirmwareSetsApi#getProjectFirmwareSets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **page** | **Integer**| page number to return | [optional] | -| **perPage** | **Integer**| items returned per page. | [optional] | - -### Return type - -[**FirmwareSetListResponse**](FirmwareSetListResponse.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **401** | Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. | - | -| **404** | Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. | - | -| **500** | Internal Server Error | - | - diff --git a/equinix-openapi-metal/docs/GlobalBgpRange.md b/equinix-openapi-metal/docs/GlobalBgpRange.md deleted file mode 100644 index 228791ff2..000000000 --- a/equinix-openapi-metal/docs/GlobalBgpRange.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# GlobalBgpRange - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addressFamily** | **Integer** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**range** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/GlobalBgpRangeList.md b/equinix-openapi-metal/docs/GlobalBgpRangeList.md deleted file mode 100644 index 9d8a5c49e..000000000 --- a/equinix-openapi-metal/docs/GlobalBgpRangeList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# GlobalBgpRangeList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**globalBgpRanges** | [**List<GlobalBgpRange>**](GlobalBgpRange.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/HardwareReservation.md b/equinix-openapi-metal/docs/HardwareReservation.md deleted file mode 100644 index 78d977c22..000000000 --- a/equinix-openapi-metal/docs/HardwareReservation.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# HardwareReservation - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customRate** | **Float** | Amount that will be charged for every billing_cycle. | [optional] | -|**device** | [**Device**](Device.md) | | [optional] | -|**facility** | [**Facility**](Facility.md) | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**needOfService** | **Boolean** | Whether this Device requires assistance from Equinix Metal. | [optional] | -|**plan** | [**Plan**](Plan.md) | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**provisionable** | **Boolean** | Whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first. | [optional] | -|**shortId** | **String** | Short version of the ID. | [optional] | -|**spare** | **Boolean** | Whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Equinix Metal | [optional] | -|**switchUuid** | **String** | Switch short id. This can be used to determine if two devices are connected to the same switch, for example. | [optional] | -|**terminationTime** | **OffsetDateTime** | Expiration date for the reservation. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/HardwareReservationList.md b/equinix-openapi-metal/docs/HardwareReservationList.md deleted file mode 100644 index a440451a8..000000000 --- a/equinix-openapi-metal/docs/HardwareReservationList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# HardwareReservationList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**hardwareReservations** | [**List<HardwareReservation>**](HardwareReservation.md) | | [optional] | -|**meta** | [**Meta**](Meta.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/HardwareReservationsApi.md b/equinix-openapi-metal/docs/HardwareReservationsApi.md deleted file mode 100644 index d72ce2939..000000000 --- a/equinix-openapi-metal/docs/HardwareReservationsApi.md +++ /dev/null @@ -1,330 +0,0 @@ -# HardwareReservationsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**activateHardwareReservation**](HardwareReservationsApi.md#activateHardwareReservation) | **POST** /hardware-reservations/{id}/activate | Activate a spare hardware reservation | -| [**findHardwareReservationById**](HardwareReservationsApi.md#findHardwareReservationById) | **GET** /hardware-reservations/{id} | Retrieve a hardware reservation | -| [**findProjectHardwareReservations**](HardwareReservationsApi.md#findProjectHardwareReservations) | **GET** /projects/{id}/hardware-reservations | Retrieve all hardware reservations for a given project | -| [**moveHardwareReservation**](HardwareReservationsApi.md#moveHardwareReservation) | **POST** /hardware-reservations/{id}/move | Move a hardware reservation | - - - -# **activateHardwareReservation** -> HardwareReservation activateHardwareReservation(id, include, exclude, activateHardwareReservationRequest) - -Activate a spare hardware reservation - -Activate a spare hardware reservation - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.HardwareReservationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - HardwareReservationsApi apiInstance = new HardwareReservationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Hardware Reservation UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - ActivateHardwareReservationRequest activateHardwareReservationRequest = new ActivateHardwareReservationRequest(); // ActivateHardwareReservationRequest | Note to attach to the reservation - try { - HardwareReservation result = apiInstance.activateHardwareReservation(id, include, exclude, activateHardwareReservationRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling HardwareReservationsApi#activateHardwareReservation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Hardware Reservation UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **activateHardwareReservationRequest** | [**ActivateHardwareReservationRequest**](ActivateHardwareReservationRequest.md)| Note to attach to the reservation | [optional] | - -### Return type - -[**HardwareReservation**](HardwareReservation.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findHardwareReservationById** -> HardwareReservation findHardwareReservationById(id, include, exclude) - -Retrieve a hardware reservation - -Returns a single hardware reservation - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.HardwareReservationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - HardwareReservationsApi apiInstance = new HardwareReservationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | HardwareReservation UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - HardwareReservation result = apiInstance.findHardwareReservationById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling HardwareReservationsApi#findHardwareReservationById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| HardwareReservation UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**HardwareReservation**](HardwareReservation.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectHardwareReservations** -> HardwareReservationList findProjectHardwareReservations(id, query, state, provisionable, include, exclude, page, perPage) - -Retrieve all hardware reservations for a given project - -Provides a collection of hardware reservations for a given project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.HardwareReservationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - HardwareReservationsApi apiInstance = new HardwareReservationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - String query = "query_example"; // String | Search by facility code, plan name, project name, reservation short ID or device hostname - String state = "active"; // String | Filter by hardware reservation state - String provisionable = "only"; // String | Filter hardware reservation that is provisionable - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - HardwareReservationList result = apiInstance.findProjectHardwareReservations(id, query, state, provisionable, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling HardwareReservationsApi#findProjectHardwareReservations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **query** | **String**| Search by facility code, plan name, project name, reservation short ID or device hostname | [optional] | -| **state** | **String**| Filter by hardware reservation state | [optional] [enum: active, spare, need_of_service] | -| **provisionable** | **String**| Filter hardware reservation that is provisionable | [optional] [enum: only] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**HardwareReservationList**](HardwareReservationList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **moveHardwareReservation** -> HardwareReservation moveHardwareReservation(id, moveHardwareReservationRequest, include, exclude) - -Move a hardware reservation - -Move a hardware reservation to another project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.HardwareReservationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - HardwareReservationsApi apiInstance = new HardwareReservationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Hardware Reservation UUID - MoveHardwareReservationRequest moveHardwareReservationRequest = new MoveHardwareReservationRequest(); // MoveHardwareReservationRequest | Destination Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - HardwareReservation result = apiInstance.moveHardwareReservation(id, moveHardwareReservationRequest, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling HardwareReservationsApi#moveHardwareReservation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Hardware Reservation UUID | | -| **moveHardwareReservationRequest** | [**MoveHardwareReservationRequest**](MoveHardwareReservationRequest.md)| Destination Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**HardwareReservation**](HardwareReservation.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/Href.md b/equinix-openapi-metal/docs/Href.md deleted file mode 100644 index d12871c9b..000000000 --- a/equinix-openapi-metal/docs/Href.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Href - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **String** | | | - - - diff --git a/equinix-openapi-metal/docs/IPAddress.md b/equinix-openapi-metal/docs/IPAddress.md deleted file mode 100644 index aa02d8d92..000000000 --- a/equinix-openapi-metal/docs/IPAddress.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# IPAddress - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addressFamily** | [**AddressFamilyEnum**](#AddressFamilyEnum) | Address Family for IP Address | [optional] | -|**cidr** | **Integer** | Cidr Size for the IP Block created. Valid values depends on the operating system being provisioned. (28..32 for IPv4 addresses, 124..127 for IPv6 addresses) | [optional] | -|**ipReservations** | **List<String>** | UUIDs of any IP reservations to use when assigning IPs | [optional] | -|**_public** | **Boolean** | Address Type for IP Address | [optional] | - - - -## Enum: AddressFamilyEnum - -| Name | Value | -|---- | -----| -| NUMBER_4 | 4 | -| NUMBER_6 | 6 | - - - diff --git a/equinix-openapi-metal/docs/IPAssignment.md b/equinix-openapi-metal/docs/IPAssignment.md deleted file mode 100644 index e6e904e8d..000000000 --- a/equinix-openapi-metal/docs/IPAssignment.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# IPAssignment - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | **String** | | [optional] | -|**addressFamily** | **Integer** | | [optional] | -|**assignedTo** | [**Href**](Href.md) | | [optional] | -|**cidr** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**enabled** | **Boolean** | | [optional] | -|**gateway** | **String** | | [optional] | -|**globalIp** | **Boolean** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**manageable** | **Boolean** | | [optional] | -|**management** | **Boolean** | | [optional] | -|**metro** | [**IPAssignmentMetro**](IPAssignmentMetro.md) | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**parentBlock** | [**ParentBlock**](ParentBlock.md) | | [optional] | -|**_public** | **Boolean** | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | Only set when this is a Metal Gateway Elastic IP Assignment. Describes the current configuration state of this IP on the network. | [optional] | -|**nextHop** | **String** | Only set when this is a Metal Gateway Elastic IP Assignment. The IP address within the Metal Gateway to which requests to the Elastic IP are forwarded. | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| PENDING | "pending" | -| ACTIVE | "active" | -| DELETING | "deleting" | - - - diff --git a/equinix-openapi-metal/docs/IPAssignmentInput.md b/equinix-openapi-metal/docs/IPAssignmentInput.md deleted file mode 100644 index 8ed521f9f..000000000 --- a/equinix-openapi-metal/docs/IPAssignmentInput.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# IPAssignmentInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | **String** | | | -|**customdata** | **Object** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/IPAssignmentList.md b/equinix-openapi-metal/docs/IPAssignmentList.md deleted file mode 100644 index 1f8b4470c..000000000 --- a/equinix-openapi-metal/docs/IPAssignmentList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# IPAssignmentList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ipAddresses** | [**List<IPAssignment>**](IPAssignment.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/IPAssignmentMetro.md b/equinix-openapi-metal/docs/IPAssignmentMetro.md deleted file mode 100644 index 518ffd85f..000000000 --- a/equinix-openapi-metal/docs/IPAssignmentMetro.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# IPAssignmentMetro - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**country** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/IPAssignmentUpdateInput.md b/equinix-openapi-metal/docs/IPAssignmentUpdateInput.md deleted file mode 100644 index 64a732237..000000000 --- a/equinix-openapi-metal/docs/IPAssignmentUpdateInput.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# IPAssignmentUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**details** | **String** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/IPAvailabilitiesList.md b/equinix-openapi-metal/docs/IPAvailabilitiesList.md deleted file mode 100644 index 2bc2f86e8..000000000 --- a/equinix-openapi-metal/docs/IPAvailabilitiesList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# IPAvailabilitiesList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**available** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/IPReservation.md b/equinix-openapi-metal/docs/IPReservation.md deleted file mode 100644 index 54ac2f413..000000000 --- a/equinix-openapi-metal/docs/IPReservation.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# IPReservation - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addon** | **Boolean** | | [optional] | -|**address** | **String** | | [optional] | -|**addressFamily** | **Integer** | | [optional] | -|**assignments** | [**List<IPAssignment>**](IPAssignment.md) | | [optional] | -|**available** | **String** | | [optional] | -|**bill** | **Boolean** | | [optional] | -|**cidr** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**enabled** | **Boolean** | | [optional] | -|**details** | **String** | | [optional] | -|**facility** | [**IPReservationFacility**](IPReservationFacility.md) | | [optional] | -|**gateway** | **String** | | [optional] | -|**globalIp** | **Boolean** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**manageable** | **Boolean** | | [optional] | -|**management** | **Boolean** | | [optional] | -|**metalGateway** | [**MetalGatewayLite**](MetalGatewayLite.md) | | [optional] | -|**metro** | [**IPReservationMetro**](IPReservationMetro.md) | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**projectLite** | [**Href**](Href.md) | | [optional] | -|**requestedBy** | [**Href**](Href.md) | | [optional] | -|**_public** | **Boolean** | | [optional] | -|**state** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| GLOBAL_IPV4 | "global_ipv4" | -| PUBLIC_IPV4 | "public_ipv4" | -| PRIVATE_IPV4 | "private_ipv4" | -| PUBLIC_IPV6 | "public_ipv6" | - - - diff --git a/equinix-openapi-metal/docs/IPReservationFacility.md b/equinix-openapi-metal/docs/IPReservationFacility.md deleted file mode 100644 index d3dcfbfdf..000000000 --- a/equinix-openapi-metal/docs/IPReservationFacility.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# IPReservationFacility - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | [**Address**](Address.md) | | [optional] | -|**code** | **String** | | [optional] | -|**features** | [**List<FeaturesEnum>**](#List<FeaturesEnum>) | | [optional] | -|**id** | **UUID** | | [optional] | -|**ipRanges** | **List<String>** | IP ranges registered in facility. Can be used for GeoIP location | [optional] | -|**metro** | [**DeviceMetro**](DeviceMetro.md) | | [optional] | -|**name** | **String** | | [optional] | - - - -## Enum: List<FeaturesEnum> - -| Name | Value | -|---- | -----| -| BAREMETAL | "baremetal" | -| BACKEND_TRANSFER | "backend_transfer" | -| LAYER_2 | "layer_2" | -| GLOBAL_IPV4 | "global_ipv4" | -| IBX | "ibx" | - - - diff --git a/equinix-openapi-metal/docs/IPReservationList.md b/equinix-openapi-metal/docs/IPReservationList.md deleted file mode 100644 index 894becb01..000000000 --- a/equinix-openapi-metal/docs/IPReservationList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# IPReservationList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ipAddresses** | [**List<IPReservationListIpAddressesInner>**](IPReservationListIpAddressesInner.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/IPReservationListIpAddressesInner.md b/equinix-openapi-metal/docs/IPReservationListIpAddressesInner.md deleted file mode 100644 index 757616d86..000000000 --- a/equinix-openapi-metal/docs/IPReservationListIpAddressesInner.md +++ /dev/null @@ -1,55 +0,0 @@ - - -# IPReservationListIpAddressesInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addon** | **Boolean** | | [optional] | -|**address** | **String** | | [optional] | -|**addressFamily** | **Integer** | | [optional] | -|**assignments** | [**List<IPAssignment>**](IPAssignment.md) | | [optional] | -|**available** | **String** | | [optional] | -|**bill** | **Boolean** | | [optional] | -|**cidr** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**enabled** | **Boolean** | | [optional] | -|**details** | **String** | | [optional] | -|**facility** | [**IPReservationFacility**](IPReservationFacility.md) | | [optional] | -|**gateway** | **String** | | [optional] | -|**globalIp** | **Boolean** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**manageable** | **Boolean** | | [optional] | -|**management** | **Boolean** | | [optional] | -|**metalGateway** | [**MetalGatewayLite**](MetalGatewayLite.md) | | [optional] | -|**metro** | [**Metro**](Metro.md) | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**projectLite** | [**Project**](Project.md) | | [optional] | -|**requestedBy** | [**Href**](Href.md) | | [optional] | -|**_public** | **Boolean** | | [optional] | -|**state** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| GLOBAL_IPV4 | "global_ipv4" | -| PUBLIC_IPV4 | "public_ipv4" | -| PRIVATE_IPV4 | "private_ipv4" | -| PUBLIC_IPV6 | "public_ipv6" | -| VRF | "vrf" | - - - diff --git a/equinix-openapi-metal/docs/IPReservationMetro.md b/equinix-openapi-metal/docs/IPReservationMetro.md deleted file mode 100644 index 43c1e9aae..000000000 --- a/equinix-openapi-metal/docs/IPReservationMetro.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# IPReservationMetro - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**country** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/IPReservationOrHref.md b/equinix-openapi-metal/docs/IPReservationOrHref.md deleted file mode 100644 index 0d1fed4d6..000000000 --- a/equinix-openapi-metal/docs/IPReservationOrHref.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# IPReservationOrHref - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addon** | **Boolean** | | [optional] | -|**address** | **String** | | [optional] | -|**addressFamily** | **Integer** | | [optional] | -|**assignments** | [**List<IPAssignment>**](IPAssignment.md) | | [optional] | -|**available** | **String** | | [optional] | -|**bill** | **Boolean** | | [optional] | -|**cidr** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**enabled** | **Boolean** | | [optional] | -|**details** | **String** | | [optional] | -|**facility** | [**IPReservationFacility**](IPReservationFacility.md) | | [optional] | -|**gateway** | **String** | | [optional] | -|**globalIp** | **Boolean** | | [optional] | -|**href** | **String** | | | -|**id** | **UUID** | | [optional] | -|**manageable** | **Boolean** | | [optional] | -|**management** | **Boolean** | | [optional] | -|**metalGateway** | [**MetalGatewayLite**](MetalGatewayLite.md) | | [optional] | -|**metro** | [**IPReservationMetro**](IPReservationMetro.md) | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**projectLite** | [**Href**](Href.md) | | [optional] | -|**requestedBy** | [**Href**](Href.md) | | [optional] | -|**_public** | **Boolean** | | [optional] | -|**state** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| GLOBAL_IPV4 | "global_ipv4" | -| PUBLIC_IPV4 | "public_ipv4" | -| PRIVATE_IPV4 | "private_ipv4" | -| PUBLIC_IPV6 | "public_ipv6" | - - - diff --git a/equinix-openapi-metal/docs/IPReservationRequestInput.md b/equinix-openapi-metal/docs/IPReservationRequestInput.md deleted file mode 100644 index 35626f61a..000000000 --- a/equinix-openapi-metal/docs/IPReservationRequestInput.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# IPReservationRequestInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**comments** | **String** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**details** | **String** | | [optional] | -|**facility** | **String** | | [optional] | -|**failOnApprovalRequired** | **Boolean** | | [optional] | -|**metro** | **String** | The code of the metro you are requesting the IP reservation in. | [optional] | -|**quantity** | **Integer** | | | -|**tags** | **List<String>** | | [optional] | -|**type** | **String** | | | - - - diff --git a/equinix-openapi-metal/docs/IncidentsApi.md b/equinix-openapi-metal/docs/IncidentsApi.md deleted file mode 100644 index dd11d20e2..000000000 --- a/equinix-openapi-metal/docs/IncidentsApi.md +++ /dev/null @@ -1,80 +0,0 @@ -# IncidentsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findIncidents**](IncidentsApi.md#findIncidents) | **GET** /incidents | Retrieve the number of incidents | - - - -# **findIncidents** -> findIncidents(include, exclude) - -Retrieve the number of incidents - -Retrieve the number of incidents. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.IncidentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - IncidentsApi apiInstance = new IncidentsApi(defaultClient); - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - apiInstance.findIncidents(include, exclude); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentsApi#findIncidents"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - diff --git a/equinix-openapi-metal/docs/InstancesBatchCreateInput.md b/equinix-openapi-metal/docs/InstancesBatchCreateInput.md deleted file mode 100644 index 74d5cb163..000000000 --- a/equinix-openapi-metal/docs/InstancesBatchCreateInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# InstancesBatchCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**batches** | [**List<InstancesBatchCreateInputBatchesInner>**](InstancesBatchCreateInputBatchesInner.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/InstancesBatchCreateInputBatchesInner.md b/equinix-openapi-metal/docs/InstancesBatchCreateInputBatchesInner.md deleted file mode 100644 index 201d6d344..000000000 --- a/equinix-openapi-metal/docs/InstancesBatchCreateInputBatchesInner.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# InstancesBatchCreateInputBatchesInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**hostnames** | **List<String>** | | [optional] | -|**quantity** | **Integer** | The number of devices to create in this batch. The hostname may contain an `{{index}}` placeholder, which will be replaced with the index of the device in the batch. For example, if the hostname is `device-{{index}}`, the first device in the batch will have the hostname `device-01`, the second device will have the hostname `device-02`, and so on. | [optional] | -|**metro** | **String** | Metro code or ID of where the instance should be provisioned in. Either metro or facility must be provided. | | -|**alwaysPxe** | **Boolean** | When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. | [optional] | -|**billingCycle** | [**BillingCycleEnum**](#BillingCycleEnum) | The billing cycle of the device. | [optional] | -|**customdata** | **Map<String, Object>** | Customdata is an arbitrary JSON value that can be accessed via the metadata service. | [optional] | -|**description** | **String** | Any description of the device or how it will be used. This may be used to inform other API consumers with project access. | [optional] | -|**features** | **List<String>** | The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. | [optional] | -|**hardwareReservationId** | **String** | The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. | [optional] | -|**hostname** | **String** | The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. | [optional] | -|**ipAddresses** | [**List<IPAddress>**](IPAddress.md) | The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. | [optional] | -|**ipxeScriptUrl** | **String** | When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. | [optional] | -|**locked** | **Boolean** | Whether the device should be locked, preventing accidental deletion. | [optional] | -|**networkFrozen** | **Boolean** | If true, this instance can not be converted to a different network type. | [optional] | -|**noSshKeys** | **Boolean** | Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified | [optional] | -|**operatingSystem** | **String** | The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. | | -|**plan** | **String** | The slug of the device plan to provision. | | -|**privateIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. | [optional] | -|**projectSshKeys** | **List<UUID>** | A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**publicIpv4SubnetSize** | **Integer** | Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. | [optional] | -|**spotInstance** | **Boolean** | Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. | [optional] | -|**spotPriceMax** | **Float** | The maximum amount to bid for a spot instance. | [optional] | -|**sshKeys** | [**List<SSHKeyInput>**](SSHKeyInput.md) | A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. | [optional] | -|**storage** | [**Storage**](Storage.md) | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**terminationTime** | **OffsetDateTime** | When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. | [optional] | -|**userSshKeys** | **List<UUID>** | A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. | [optional] | -|**userdata** | **String** | The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. | [optional] | -|**facility** | **List<String>** | The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. | | - - - -## Enum: BillingCycleEnum - -| Name | Value | -|---- | -----| -| HOURLY | "hourly" | -| DAILY | "daily" | -| MONTHLY | "monthly" | -| YEARLY | "yearly" | - - - diff --git a/equinix-openapi-metal/docs/Interconnection.md b/equinix-openapi-metal/docs/Interconnection.md deleted file mode 100644 index 5eed9ef67..000000000 --- a/equinix-openapi-metal/docs/Interconnection.md +++ /dev/null @@ -1,58 +0,0 @@ - - -# Interconnection - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**contactEmail** | **String** | | [optional] | -|**description** | **String** | | [optional] | -|**facility** | [**Href**](Href.md) | | [optional] | -|**id** | **UUID** | | [optional] | -|**metro** | [**Metro**](Metro.md) | | [optional] | -|**mode** | [**ModeEnum**](#ModeEnum) | The mode of the interconnection (only relevant to Dedicated Ports). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. | [optional] | -|**name** | **String** | | [optional] | -|**organization** | [**Href**](Href.md) | | [optional] | -|**ports** | [**List<InterconnectionPort>**](InterconnectionPort.md) | For Fabric VCs, these represent Virtual Port(s) created for the interconnection. For dedicated interconnections, these represent the Dedicated Port(s). | [optional] | -|**redundancy** | [**RedundancyEnum**](#RedundancyEnum) | Either 'primary', meaning a single interconnection, or 'redundant', meaning a redundant interconnection. | [optional] | -|**serviceTokens** | [**List<FabricServiceToken>**](FabricServiceToken.md) | For Fabric VCs (Metal Billed), this will show details of the A-Side service tokens issued for the interconnection. For Fabric VCs (Fabric Billed), this will show the details of the Z-Side service tokens issued for the interconnection. Dedicated interconnections will not have any service tokens issued. There will be one per interconnection, so for redundant interconnections, there should be two service tokens issued. | [optional] | -|**speed** | **Integer** | For interconnections on Dedicated Ports and shared connections, this represents the interconnection's speed in bps. For Fabric VCs, this field refers to the maximum speed of the interconnection in bps. This value will default to 10Gbps for Fabric VCs (Fabric Billed). | [optional] | -|**status** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**token** | **UUID** | This token is used for shared interconnections to be used as the Fabric Token. This field is entirely deprecated. | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | The 'shared' type of interconnection refers to shared connections, or later also known as Fabric Virtual Connections (or Fabric VCs). The 'dedicated' type of interconnection refers to interconnections created with Dedicated Ports. | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**requestedBy** | [**Href**](Href.md) | | [optional] | - - - -## Enum: ModeEnum - -| Name | Value | -|---- | -----| -| STANDARD | "standard" | -| TUNNEL | "tunnel" | - - - -## Enum: RedundancyEnum - -| Name | Value | -|---- | -----| -| PRIMARY | "primary" | -| REDUNDANT | "redundant" | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| SHARED | "shared" | -| DEDICATED | "dedicated" | - - - diff --git a/equinix-openapi-metal/docs/InterconnectionList.md b/equinix-openapi-metal/docs/InterconnectionList.md deleted file mode 100644 index 74ce011b0..000000000 --- a/equinix-openapi-metal/docs/InterconnectionList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# InterconnectionList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**interconnections** | [**List<Interconnection>**](Interconnection.md) | | [optional] | -|**meta** | [**Meta**](Meta.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/InterconnectionPort.md b/equinix-openapi-metal/docs/InterconnectionPort.md deleted file mode 100644 index 6bb89fb8a..000000000 --- a/equinix-openapi-metal/docs/InterconnectionPort.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# InterconnectionPort - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **UUID** | | [optional] | -|**organization** | [**Href**](Href.md) | | [optional] | -|**role** | [**RoleEnum**](#RoleEnum) | Either 'primary' or 'secondary'. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | For both Fabric VCs and Dedicated Ports, this will be 'requested' on creation and 'deleting' on deletion. Once the Fabric VC has found its corresponding Fabric connection, this will turn to 'active'. For Dedicated Ports, once the dedicated port is associated, this will also turn to 'active'. For Fabric VCs, this can turn into an 'expired' state if the service token associated is expired. | [optional] | -|**switchId** | **String** | A switch 'short ID' | [optional] | -|**virtualCircuits** | [**List<VirtualCircuit>**](VirtualCircuit.md) | | [optional] | -|**name** | **String** | | [optional] | -|**speed** | **Integer** | | [optional] | -|**linkStatus** | **String** | | [optional] | -|**href** | **String** | | [optional] | - - - -## Enum: RoleEnum - -| Name | Value | -|---- | -----| -| PRIMARY | "primary" | -| SECONDARY | "secondary" | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| REQUESTED | "requested" | -| ACTIVE | "active" | -| DELETING | "deleting" | -| EXPIRED | "expired" | -| DELETE_FAILED | "delete_failed" | - - - diff --git a/equinix-openapi-metal/docs/InterconnectionPortList.md b/equinix-openapi-metal/docs/InterconnectionPortList.md deleted file mode 100644 index 760014adc..000000000 --- a/equinix-openapi-metal/docs/InterconnectionPortList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# InterconnectionPortList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ports** | [**List<InterconnectionPort>**](InterconnectionPort.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/InterconnectionUpdateInput.md b/equinix-openapi-metal/docs/InterconnectionUpdateInput.md deleted file mode 100644 index 2304913ea..000000000 --- a/equinix-openapi-metal/docs/InterconnectionUpdateInput.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# InterconnectionUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**contactEmail** | **String** | | [optional] | -|**description** | **String** | | [optional] | -|**mode** | [**ModeEnum**](#ModeEnum) | The mode of the interconnection (only relevant to Dedicated Ports). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. | [optional] | -|**name** | **String** | | [optional] | -|**redundancy** | **String** | Updating from 'redundant' to 'primary' will remove a secondary port, while updating from 'primary' to 'redundant' will add one. | [optional] | -|**tags** | **List<String>** | | [optional] | - - - -## Enum: ModeEnum - -| Name | Value | -|---- | -----| -| STANDARD | "standard" | -| TUNNEL | "tunnel" | - - - diff --git a/equinix-openapi-metal/docs/InterconnectionsApi.md b/equinix-openapi-metal/docs/InterconnectionsApi.md deleted file mode 100644 index a638ada0d..000000000 --- a/equinix-openapi-metal/docs/InterconnectionsApi.md +++ /dev/null @@ -1,1158 +0,0 @@ -# InterconnectionsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createInterconnectionPortVirtualCircuit**](InterconnectionsApi.md#createInterconnectionPortVirtualCircuit) | **POST** /connections/{connection_id}/ports/{port_id}/virtual-circuits | Create a new Virtual Circuit | -| [**createOrganizationInterconnection**](InterconnectionsApi.md#createOrganizationInterconnection) | **POST** /organizations/{organization_id}/connections | Request a new interconnection for the organization | -| [**createProjectInterconnection**](InterconnectionsApi.md#createProjectInterconnection) | **POST** /projects/{project_id}/connections | Request a new interconnection for the project's organization | -| [**deleteInterconnection**](InterconnectionsApi.md#deleteInterconnection) | **DELETE** /connections/{connection_id} | Delete interconnection | -| [**deleteVirtualCircuit**](InterconnectionsApi.md#deleteVirtualCircuit) | **DELETE** /virtual-circuits/{id} | Delete a virtual circuit | -| [**getInterconnection**](InterconnectionsApi.md#getInterconnection) | **GET** /connections/{connection_id} | Get interconnection | -| [**getInterconnectionPort**](InterconnectionsApi.md#getInterconnectionPort) | **GET** /connections/{connection_id}/ports/{id} | Get a interconnection port | -| [**getVirtualCircuit**](InterconnectionsApi.md#getVirtualCircuit) | **GET** /virtual-circuits/{id} | Get a virtual circuit | -| [**listInterconnectionPortVirtualCircuits**](InterconnectionsApi.md#listInterconnectionPortVirtualCircuits) | **GET** /connections/{connection_id}/ports/{port_id}/virtual-circuits | List a interconnection port's virtual circuits | -| [**listInterconnectionPorts**](InterconnectionsApi.md#listInterconnectionPorts) | **GET** /connections/{connection_id}/ports | List a interconnection's ports | -| [**listInterconnectionVirtualCircuits**](InterconnectionsApi.md#listInterconnectionVirtualCircuits) | **GET** /connections/{connection_id}/virtual-circuits | List a interconnection's virtual circuits | -| [**organizationListInterconnections**](InterconnectionsApi.md#organizationListInterconnections) | **GET** /organizations/{organization_id}/connections | List organization connections | -| [**projectListInterconnections**](InterconnectionsApi.md#projectListInterconnections) | **GET** /projects/{project_id}/connections | List project connections | -| [**updateInterconnection**](InterconnectionsApi.md#updateInterconnection) | **PUT** /connections/{connection_id} | Update interconnection | -| [**updateVirtualCircuit**](InterconnectionsApi.md#updateVirtualCircuit) | **PUT** /virtual-circuits/{id} | Update a virtual circuit | - - - -# **createInterconnectionPortVirtualCircuit** -> VirtualCircuit createInterconnectionPortVirtualCircuit(connectionId, portId, virtualCircuitCreateInput) - -Create a new Virtual Circuit - -Create a new Virtual Circuit on a Dedicated Port. To create a regular Virtual Circuit, specify a Virtual Network record and an NNI VLAN value. To create a VRF-based Virtual Circuit, specify the VRF ID and subnet, along with the NNI VLAN value. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | UUID of the interconnection - UUID portId = UUID.randomUUID(); // UUID | UUID of the interconnection port - VirtualCircuitCreateInput virtualCircuitCreateInput = new VirtualCircuitCreateInput(); // VirtualCircuitCreateInput | Virtual Circuit details - try { - VirtualCircuit result = apiInstance.createInterconnectionPortVirtualCircuit(connectionId, portId, virtualCircuitCreateInput); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#createInterconnectionPortVirtualCircuit"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| UUID of the interconnection | | -| **portId** | **UUID**| UUID of the interconnection port | | -| **virtualCircuitCreateInput** | [**VirtualCircuitCreateInput**](VirtualCircuitCreateInput.md)| Virtual Circuit details | | - -### Return type - -[**VirtualCircuit**](VirtualCircuit.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **createOrganizationInterconnection** -> Interconnection createOrganizationInterconnection(organizationId, createOrganizationInterconnectionRequest, include, exclude) - -Request a new interconnection for the organization - -Creates a new interconnection request. A Project ID must be specified in the request body for connections on shared ports. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID organizationId = UUID.randomUUID(); // UUID | UUID of the organization - CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest = new CreateOrganizationInterconnectionRequest(); // CreateOrganizationInterconnectionRequest | Dedicated port or shared interconnection (also known as Fabric VC) creation request - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Interconnection result = apiInstance.createOrganizationInterconnection(organizationId, createOrganizationInterconnectionRequest, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#createOrganizationInterconnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **organizationId** | **UUID**| UUID of the organization | | -| **createOrganizationInterconnectionRequest** | [**CreateOrganizationInterconnectionRequest**](CreateOrganizationInterconnectionRequest.md)| Dedicated port or shared interconnection (also known as Fabric VC) creation request | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Interconnection**](Interconnection.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createProjectInterconnection** -> Interconnection createProjectInterconnection(projectId, createOrganizationInterconnectionRequest, include, exclude) - -Request a new interconnection for the project's organization - -Creates a new interconnection request - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | UUID of the project - CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest = new CreateOrganizationInterconnectionRequest(); // CreateOrganizationInterconnectionRequest | Dedicated port or shared interconnection (also known as Fabric VC) creation request - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Interconnection result = apiInstance.createProjectInterconnection(projectId, createOrganizationInterconnectionRequest, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#createProjectInterconnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| UUID of the project | | -| **createOrganizationInterconnectionRequest** | [**CreateOrganizationInterconnectionRequest**](CreateOrganizationInterconnectionRequest.md)| Dedicated port or shared interconnection (also known as Fabric VC) creation request | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Interconnection**](Interconnection.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **403** | forbidden | - | -| **422** | unprocessable entity | - | - - -# **deleteInterconnection** -> Interconnection deleteInterconnection(connectionId, include, exclude) - -Delete interconnection - -Delete a interconnection, its associated ports and virtual circuits. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | Interconnection UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Interconnection result = apiInstance.deleteInterconnection(connectionId, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#deleteInterconnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| Interconnection UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Interconnection**](Interconnection.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **202** | accepted | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **deleteVirtualCircuit** -> VirtualCircuit deleteVirtualCircuit(id, include, exclude) - -Delete a virtual circuit - -Delete a virtual circuit from a Dedicated Port. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Virtual Circuit UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VirtualCircuit result = apiInstance.deleteVirtualCircuit(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#deleteVirtualCircuit"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Virtual Circuit UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VirtualCircuit**](VirtualCircuit.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **202** | accepted | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **getInterconnection** -> Interconnection getInterconnection(connectionId, include, exclude) - -Get interconnection - -Get the details of a interconnection - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | Interconnection UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Interconnection result = apiInstance.getInterconnection(connectionId, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#getInterconnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| Interconnection UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Interconnection**](Interconnection.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **getInterconnectionPort** -> InterconnectionPort getInterconnectionPort(connectionId, id, include, exclude) - -Get a interconnection port - -Get the details of an interconnection port. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | UUID of the interconnection - UUID id = UUID.randomUUID(); // UUID | Port UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - InterconnectionPort result = apiInstance.getInterconnectionPort(connectionId, id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#getInterconnectionPort"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| UUID of the interconnection | | -| **id** | **UUID**| Port UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**InterconnectionPort**](InterconnectionPort.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **getVirtualCircuit** -> VirtualCircuit getVirtualCircuit(id, include, exclude) - -Get a virtual circuit - -Get the details of a virtual circuit - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Virtual Circuit UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VirtualCircuit result = apiInstance.getVirtualCircuit(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#getVirtualCircuit"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Virtual Circuit UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VirtualCircuit**](VirtualCircuit.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **listInterconnectionPortVirtualCircuits** -> VirtualCircuitList listInterconnectionPortVirtualCircuits(connectionId, portId, include, exclude) - -List a interconnection port's virtual circuits - -List the virtual circuit record(s) associatiated with a particular interconnection port. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | UUID of the interconnection - UUID portId = UUID.randomUUID(); // UUID | UUID of the interconnection port - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VirtualCircuitList result = apiInstance.listInterconnectionPortVirtualCircuits(connectionId, portId, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#listInterconnectionPortVirtualCircuits"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| UUID of the interconnection | | -| **portId** | **UUID**| UUID of the interconnection port | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VirtualCircuitList**](VirtualCircuitList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **listInterconnectionPorts** -> InterconnectionPortList listInterconnectionPorts(connectionId) - -List a interconnection's ports - -List the ports associated to an interconnection. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | UUID of the interconnection - try { - InterconnectionPortList result = apiInstance.listInterconnectionPorts(connectionId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#listInterconnectionPorts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| UUID of the interconnection | | - -### Return type - -[**InterconnectionPortList**](InterconnectionPortList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **listInterconnectionVirtualCircuits** -> VirtualCircuitList listInterconnectionVirtualCircuits(connectionId) - -List a interconnection's virtual circuits - -List the virtual circuit record(s) associated with a particular interconnection id. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | UUID of the interconnection - try { - VirtualCircuitList result = apiInstance.listInterconnectionVirtualCircuits(connectionId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#listInterconnectionVirtualCircuits"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| UUID of the interconnection | | - -### Return type - -[**VirtualCircuitList**](VirtualCircuitList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **organizationListInterconnections** -> InterconnectionList organizationListInterconnections(organizationId, include, exclude) - -List organization connections - -List the connections belonging to the organization - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID organizationId = UUID.randomUUID(); // UUID | UUID of the organization - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - InterconnectionList result = apiInstance.organizationListInterconnections(organizationId, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#organizationListInterconnections"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **organizationId** | **UUID**| UUID of the organization | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**InterconnectionList**](InterconnectionList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **projectListInterconnections** -> InterconnectionList projectListInterconnections(projectId, include, exclude, page, perPage) - -List project connections - -List the connections belonging to the project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | UUID of the project - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - InterconnectionList result = apiInstance.projectListInterconnections(projectId, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#projectListInterconnections"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| UUID of the project | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**InterconnectionList**](InterconnectionList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **updateInterconnection** -> Interconnection updateInterconnection(connectionId, interconnectionUpdateInput, include, exclude) - -Update interconnection - -Update the details of a interconnection - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID connectionId = UUID.randomUUID(); // UUID | Interconnection UUID - InterconnectionUpdateInput interconnectionUpdateInput = new InterconnectionUpdateInput(); // InterconnectionUpdateInput | Updated interconnection details - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Interconnection result = apiInstance.updateInterconnection(connectionId, interconnectionUpdateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#updateInterconnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **connectionId** | **UUID**| Interconnection UUID | | -| **interconnectionUpdateInput** | [**InterconnectionUpdateInput**](InterconnectionUpdateInput.md)| Updated interconnection details | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Interconnection**](Interconnection.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **updateVirtualCircuit** -> VirtualCircuit updateVirtualCircuit(id, virtualCircuitUpdateInput, include, exclude) - -Update a virtual circuit - -Update the details of a virtual circuit. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InterconnectionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InterconnectionsApi apiInstance = new InterconnectionsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Virtual Circuit UUID - VirtualCircuitUpdateInput virtualCircuitUpdateInput = new VirtualCircuitUpdateInput(); // VirtualCircuitUpdateInput | Updated Virtual Circuit details - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VirtualCircuit result = apiInstance.updateVirtualCircuit(id, virtualCircuitUpdateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InterconnectionsApi#updateVirtualCircuit"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Virtual Circuit UUID | | -| **virtualCircuitUpdateInput** | [**VirtualCircuitUpdateInput**](VirtualCircuitUpdateInput.md)| Updated Virtual Circuit details | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VirtualCircuit**](VirtualCircuit.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **202** | accepted | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/Invitation.md b/equinix-openapi-metal/docs/Invitation.md deleted file mode 100644 index 5d7346a3b..000000000 --- a/equinix-openapi-metal/docs/Invitation.md +++ /dev/null @@ -1,34 +0,0 @@ - - -# Invitation - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**invitation** | [**Href**](Href.md) | | [optional] | -|**invitedBy** | [**Href**](Href.md) | | [optional] | -|**invitee** | **String** | | [optional] | -|**nonce** | **String** | | [optional] | -|**organization** | [**Href**](Href.md) | | [optional] | -|**projects** | [**List<Href>**](Href.md) | | [optional] | -|**roles** | [**List<RolesEnum>**](#List<RolesEnum>) | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - -## Enum: List<RolesEnum> - -| Name | Value | -|---- | -----| -| ADMIN | "admin" | -| BILLING | "billing" | -| COLLABORATOR | "collaborator" | -| LIMITED_COLLABORATOR | "limited_collaborator" | - - - diff --git a/equinix-openapi-metal/docs/InvitationInput.md b/equinix-openapi-metal/docs/InvitationInput.md deleted file mode 100644 index c91a63578..000000000 --- a/equinix-openapi-metal/docs/InvitationInput.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# InvitationInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**invitee** | **String** | | | -|**message** | **String** | | [optional] | -|**organizationId** | **UUID** | | [optional] | -|**projectsIds** | **List<UUID>** | | [optional] | -|**roles** | [**List<RolesEnum>**](#List<RolesEnum>) | | [optional] | - - - -## Enum: List<RolesEnum> - -| Name | Value | -|---- | -----| -| ADMIN | "admin" | -| BILLING | "billing" | -| COLLABORATOR | "collaborator" | -| LIMITED_COLLABORATOR | "limited_collaborator" | - - - diff --git a/equinix-openapi-metal/docs/InvitationList.md b/equinix-openapi-metal/docs/InvitationList.md deleted file mode 100644 index 5fd5a4153..000000000 --- a/equinix-openapi-metal/docs/InvitationList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# InvitationList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**invitations** | [**List<Membership>**](Membership.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/InvitationsApi.md b/equinix-openapi-metal/docs/InvitationsApi.md deleted file mode 100644 index ca85600a3..000000000 --- a/equinix-openapi-metal/docs/InvitationsApi.md +++ /dev/null @@ -1,230 +0,0 @@ -# InvitationsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**acceptInvitation**](InvitationsApi.md#acceptInvitation) | **PUT** /invitations/{id} | Accept an invitation | -| [**declineInvitation**](InvitationsApi.md#declineInvitation) | **DELETE** /invitations/{id} | Decline an invitation | -| [**findInvitationById**](InvitationsApi.md#findInvitationById) | **GET** /invitations/{id} | View an invitation | - - - -# **acceptInvitation** -> Membership acceptInvitation(id, include) - -Accept an invitation - -Accept an invitation. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InvitationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InvitationsApi apiInstance = new InvitationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Invitation UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Membership result = apiInstance.acceptInvitation(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationsApi#acceptInvitation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Invitation UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Membership**](Membership.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **declineInvitation** -> declineInvitation(id) - -Decline an invitation - -Decline an invitation. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InvitationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InvitationsApi apiInstance = new InvitationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Invitation UUID - try { - apiInstance.declineInvitation(id); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationsApi#declineInvitation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Invitation UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findInvitationById** -> Invitation findInvitationById(id, include) - -View an invitation - -Returns a single invitation. (It include the `invitable` to maintain backward compatibility but will be removed soon) - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InvitationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InvitationsApi apiInstance = new InvitationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Invitation UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Invitation result = apiInstance.findInvitationById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InvitationsApi#findInvitationById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Invitation UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Invitation**](Invitation.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/Invoice.md b/equinix-openapi-metal/docs/Invoice.md deleted file mode 100644 index ae5ab1927..000000000 --- a/equinix-openapi-metal/docs/Invoice.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# Invoice - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Float** | | [optional] | -|**balance** | **Float** | | [optional] | -|**createdOn** | **LocalDate** | | [optional] | -|**creditAmount** | **Float** | | [optional] | -|**creditsApplied** | **Float** | | [optional] | -|**currency** | **String** | | [optional] | -|**dueOn** | **LocalDate** | | [optional] | -|**id** | **UUID** | | [optional] | -|**items** | [**List<LineItem>**](LineItem.md) | | [optional] | -|**number** | **String** | | [optional] | -|**project** | [**ProjectIdName**](ProjectIdName.md) | | [optional] | -|**referenceNumber** | **String** | | [optional] | -|**status** | **String** | | [optional] | -|**targetDate** | **LocalDate** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/InvoiceList.md b/equinix-openapi-metal/docs/InvoiceList.md deleted file mode 100644 index 4e6d13c62..000000000 --- a/equinix-openapi-metal/docs/InvoiceList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# InvoiceList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**invoices** | [**List<Invoice>**](Invoice.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/InvoicesApi.md b/equinix-openapi-metal/docs/InvoicesApi.md deleted file mode 100644 index 078233313..000000000 --- a/equinix-openapi-metal/docs/InvoicesApi.md +++ /dev/null @@ -1,158 +0,0 @@ -# InvoicesApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findOrganizationInvoices**](InvoicesApi.md#findOrganizationInvoices) | **GET** /organizations/{id}/invoices | Retrieve all invoices for an organization | -| [**getInvoiceById**](InvoicesApi.md#getInvoiceById) | **GET** /invoices/{id} | Retrieve an invoice | - - - -# **findOrganizationInvoices** -> InvoiceList findOrganizationInvoices(id, page, perPage, status) - -Retrieve all invoices for an organization - -Returns all invoices for an organization - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InvoicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InvoicesApi apiInstance = new InvoicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - Integer page = 56; // Integer | page number - Integer perPage = 56; // Integer | per page - String status = "status_example"; // String | filter by status - try { - InvoiceList result = apiInstance.findOrganizationInvoices(id, page, perPage, status); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InvoicesApi#findOrganizationInvoices"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **page** | **Integer**| page number | [optional] | -| **perPage** | **Integer**| per page | [optional] | -| **status** | **String**| filter by status | [optional] | - -### Return type - -[**InvoiceList**](InvoiceList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **getInvoiceById** -> Invoice getInvoiceById(id) - -Retrieve an invoice - -Returns the invoice identified by the provided id - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.InvoicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - InvoicesApi apiInstance = new InvoicesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Invoice UUID - try { - Invoice result = apiInstance.getInvoiceById(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InvoicesApi#getInvoiceById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Invoice UUID | | - -### Return type - -[**Invoice**](Invoice.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/IpAddressesApi.md b/equinix-openapi-metal/docs/IpAddressesApi.md deleted file mode 100644 index eaf6484f4..000000000 --- a/equinix-openapi-metal/docs/IpAddressesApi.md +++ /dev/null @@ -1,544 +0,0 @@ -# IpAddressesApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deleteIPAddress**](IpAddressesApi.md#deleteIPAddress) | **DELETE** /ips/{id} | Unassign an ip address | -| [**findIPAddressById**](IpAddressesApi.md#findIPAddressById) | **GET** /ips/{id} | Retrieve an ip address | -| [**findIPAddressCustomdata**](IpAddressesApi.md#findIPAddressCustomdata) | **GET** /ips/{id}/customdata | Retrieve the custom metadata of an IP Reservation or IP Assignment | -| [**findIPAvailabilities**](IpAddressesApi.md#findIPAvailabilities) | **GET** /ips/{id}/available | Retrieve all available subnets of a particular reservation | -| [**findIPReservations**](IpAddressesApi.md#findIPReservations) | **GET** /projects/{id}/ips | Retrieve all ip reservations | -| [**requestIPReservation**](IpAddressesApi.md#requestIPReservation) | **POST** /projects/{id}/ips | Requesting IP reservations | -| [**updateIPAddress**](IpAddressesApi.md#updateIPAddress) | **PATCH** /ips/{id} | Update an ip address | - - - -# **deleteIPAddress** -> deleteIPAddress(id) - -Unassign an ip address - -This call can be used to un-assign an IP assignment or delete an IP reservation. Un-assign an IP address record. Use the assignment UUID you get after attaching the IP. This will remove the relationship between an IP and the device or metal gateway and will make the IP address available to be assigned to another device, once the IP has been un-configured from the network. Delete an IP reservation. Use the reservation UUID you get after adding the IP to the project. This will permanently delete the IP block reservation from the project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.IpAddressesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - IpAddressesApi apiInstance = new IpAddressesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | IP Address UUID - try { - apiInstance.deleteIPAddress(id); - } catch (ApiException e) { - System.err.println("Exception when calling IpAddressesApi#deleteIPAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| IP Address UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findIPAddressById** -> FindIPAddressById200Response findIPAddressById(id, include, exclude) - -Retrieve an ip address - -Returns a single ip address if the user has access. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.IpAddressesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - IpAddressesApi apiInstance = new IpAddressesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | IP Address UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - FindIPAddressById200Response result = apiInstance.findIPAddressById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IpAddressesApi#findIPAddressById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| IP Address UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**FindIPAddressById200Response**](FindIPAddressById200Response.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findIPAddressCustomdata** -> findIPAddressCustomdata(id) - -Retrieve the custom metadata of an IP Reservation or IP Assignment - -Provides the custom metadata stored for this IP Reservation or IP Assignment in json format - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.IpAddressesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - IpAddressesApi apiInstance = new IpAddressesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Ip Reservation UUID - try { - apiInstance.findIPAddressCustomdata(id); - } catch (ApiException e) { - System.err.println("Exception when calling IpAddressesApi#findIPAddressCustomdata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Ip Reservation UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findIPAvailabilities** -> IPAvailabilitiesList findIPAvailabilities(id, cidr) - -Retrieve all available subnets of a particular reservation - -Provides a list of IP resevations for a single project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.IpAddressesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - IpAddressesApi apiInstance = new IpAddressesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | IP Reservation UUID - String cidr = "20"; // String | Size of subnets in bits - try { - IPAvailabilitiesList result = apiInstance.findIPAvailabilities(id, cidr); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IpAddressesApi#findIPAvailabilities"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| IP Reservation UUID | | -| **cidr** | **String**| Size of subnets in bits | [enum: 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128] | - -### Return type - -[**IPAvailabilitiesList**](IPAvailabilitiesList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findIPReservations** -> IPReservationList findIPReservations(id, types, include, exclude, perPage) - -Retrieve all ip reservations - -Provides a paginated list of IP reservations for a single project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.IpAddressesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - IpAddressesApi apiInstance = new IpAddressesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List types = Arrays.asList(); // List | Filter project IP reservations by reservation type - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer perPage = 250; // Integer | Items returned per page - try { - IPReservationList result = apiInstance.findIPReservations(id, types, include, exclude, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IpAddressesApi#findIPReservations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **types** | [**List<String>**](String.md)| Filter project IP reservations by reservation type | [optional] [enum: global_ipv4, private_ipv4, public_ipv4, public_ipv6, vrf] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 250] | - -### Return type - -[**IPReservationList**](IPReservationList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **requestIPReservation** -> RequestIPReservation201Response requestIPReservation(id, requestIPReservationRequest, include, exclude) - -Requesting IP reservations - -Request more IP space for a project in order to have additional IP addresses to assign to devices. If the request is within the max quota, an IP reservation will be created. If the project will exceed its IP quota, a request will be submitted for review, and will return an IP Reservation with a `state` of `pending`. You can automatically have the request fail with HTTP status 422 instead of triggering the review process by providing the `fail_on_approval_required` parameter set to `true` in the request. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.IpAddressesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - IpAddressesApi apiInstance = new IpAddressesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - RequestIPReservationRequest requestIPReservationRequest = new RequestIPReservationRequest(); // RequestIPReservationRequest | IP Reservation Request to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - RequestIPReservation201Response result = apiInstance.requestIPReservation(id, requestIPReservationRequest, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IpAddressesApi#requestIPReservation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **requestIPReservationRequest** | [**RequestIPReservationRequest**](RequestIPReservationRequest.md)| IP Reservation Request to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**RequestIPReservation201Response**](RequestIPReservation201Response.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **updateIPAddress** -> FindIPAddressById200Response updateIPAddress(id, include, exclude, ipAssignmentUpdateInput) - -Update an ip address - -Update details about an ip address - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.IpAddressesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - IpAddressesApi apiInstance = new IpAddressesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | IP Address UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - IPAssignmentUpdateInput ipAssignmentUpdateInput = new IPAssignmentUpdateInput(); // IPAssignmentUpdateInput | - try { - FindIPAddressById200Response result = apiInstance.updateIPAddress(id, include, exclude, ipAssignmentUpdateInput); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IpAddressesApi#updateIPAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| IP Address UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **ipAssignmentUpdateInput** | [**IPAssignmentUpdateInput**](IPAssignmentUpdateInput.md)| | [optional] | - -### Return type - -[**FindIPAddressById200Response**](FindIPAddressById200Response.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/License.md b/equinix-openapi-metal/docs/License.md deleted file mode 100644 index 6625fd9b3..000000000 --- a/equinix-openapi-metal/docs/License.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# License - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**licenseKey** | **String** | | [optional] | -|**licenseeProduct** | [**Href**](Href.md) | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**size** | **BigDecimal** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/LicenseCreateInput.md b/equinix-openapi-metal/docs/LicenseCreateInput.md deleted file mode 100644 index 206769c66..000000000 --- a/equinix-openapi-metal/docs/LicenseCreateInput.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# LicenseCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**licenseeProductId** | **String** | | [optional] | -|**size** | **BigDecimal** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/LicenseList.md b/equinix-openapi-metal/docs/LicenseList.md deleted file mode 100644 index 4a0f1e24d..000000000 --- a/equinix-openapi-metal/docs/LicenseList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# LicenseList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**licenses** | [**List<License>**](License.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/LicenseUpdateInput.md b/equinix-openapi-metal/docs/LicenseUpdateInput.md deleted file mode 100644 index f9c9d1548..000000000 --- a/equinix-openapi-metal/docs/LicenseUpdateInput.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# LicenseUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**size** | **BigDecimal** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/LicensesApi.md b/equinix-openapi-metal/docs/LicensesApi.md deleted file mode 100644 index 724799e75..000000000 --- a/equinix-openapi-metal/docs/LicensesApi.md +++ /dev/null @@ -1,398 +0,0 @@ -# LicensesApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createLicense**](LicensesApi.md#createLicense) | **POST** /projects/{id}/licenses | Create a License | -| [**deleteLicense**](LicensesApi.md#deleteLicense) | **DELETE** /licenses/{id} | Delete the license | -| [**findLicenseById**](LicensesApi.md#findLicenseById) | **GET** /licenses/{id} | Retrieve a license | -| [**findProjectLicenses**](LicensesApi.md#findProjectLicenses) | **GET** /projects/{id}/licenses | Retrieve all licenses | -| [**updateLicense**](LicensesApi.md#updateLicense) | **PUT** /licenses/{id} | Update the license | - - - -# **createLicense** -> License createLicense(id, licenseCreateInput, include, exclude) - -Create a License - -Creates a new license for the given project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.LicensesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - LicensesApi apiInstance = new LicensesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - LicenseCreateInput licenseCreateInput = new LicenseCreateInput(); // LicenseCreateInput | License to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - License result = apiInstance.createLicense(id, licenseCreateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LicensesApi#createLicense"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **licenseCreateInput** | [**LicenseCreateInput**](LicenseCreateInput.md)| License to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**License**](License.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteLicense** -> deleteLicense(id) - -Delete the license - -Deletes a license. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.LicensesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - LicensesApi apiInstance = new LicensesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | License UUID - try { - apiInstance.deleteLicense(id); - } catch (ApiException e) { - System.err.println("Exception when calling LicensesApi#deleteLicense"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| License UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findLicenseById** -> License findLicenseById(id, include, exclude) - -Retrieve a license - -Returns a license - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.LicensesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - LicensesApi apiInstance = new LicensesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | License UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - License result = apiInstance.findLicenseById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LicensesApi#findLicenseById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| License UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**License**](License.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectLicenses** -> LicenseList findProjectLicenses(id, include, exclude, page, perPage) - -Retrieve all licenses - -Provides a collection of licenses for a given project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.LicensesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - LicensesApi apiInstance = new LicensesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - LicenseList result = apiInstance.findProjectLicenses(id, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LicensesApi#findProjectLicenses"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**LicenseList**](LicenseList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **updateLicense** -> License updateLicense(id, licenseUpdateInput, include, exclude) - -Update the license - -Updates the license. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.LicensesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - LicensesApi apiInstance = new LicensesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | License UUID - LicenseUpdateInput licenseUpdateInput = new LicenseUpdateInput(); // LicenseUpdateInput | License to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - License result = apiInstance.updateLicense(id, licenseUpdateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling LicensesApi#updateLicense"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| License UUID | | -| **licenseUpdateInput** | [**LicenseUpdateInput**](LicenseUpdateInput.md)| License to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**License**](License.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/LineItem.md b/equinix-openapi-metal/docs/LineItem.md deleted file mode 100644 index 4eb482261..000000000 --- a/equinix-openapi-metal/docs/LineItem.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# LineItem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Float** | | [optional] | -|**currency** | **String** | | [optional] | -|**description** | **String** | | [optional] | -|**details** | **String** | | [optional] | -|**plan** | [**Plan**](Plan.md) | | [optional] | -|**unit** | **String** | | [optional] | -|**unitPrice** | **Float** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/Membership.md b/equinix-openapi-metal/docs/Membership.md deleted file mode 100644 index 6eab73ce9..000000000 --- a/equinix-openapi-metal/docs/Membership.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# Membership - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**roles** | **List<String>** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**user** | [**Href**](Href.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MembershipInput.md b/equinix-openapi-metal/docs/MembershipInput.md deleted file mode 100644 index 7cfbecf7e..000000000 --- a/equinix-openapi-metal/docs/MembershipInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MembershipInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**role** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MembershipList.md b/equinix-openapi-metal/docs/MembershipList.md deleted file mode 100644 index 445c99110..000000000 --- a/equinix-openapi-metal/docs/MembershipList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MembershipList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**memberships** | [**List<Membership>**](Membership.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MembershipsApi.md b/equinix-openapi-metal/docs/MembershipsApi.md deleted file mode 100644 index 6fa7e5748..000000000 --- a/equinix-openapi-metal/docs/MembershipsApi.md +++ /dev/null @@ -1,233 +0,0 @@ -# MembershipsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deleteMembership**](MembershipsApi.md#deleteMembership) | **DELETE** /memberships/{id} | Delete the membership | -| [**findMembershipById**](MembershipsApi.md#findMembershipById) | **GET** /memberships/{id} | Retrieve a membership | -| [**updateMembership**](MembershipsApi.md#updateMembership) | **PUT** /memberships/{id} | Update the membership | - - - -# **deleteMembership** -> deleteMembership(id) - -Delete the membership - -Deletes the membership. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MembershipsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MembershipsApi apiInstance = new MembershipsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Membership UUID - try { - apiInstance.deleteMembership(id); - } catch (ApiException e) { - System.err.println("Exception when calling MembershipsApi#deleteMembership"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Membership UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findMembershipById** -> Membership findMembershipById(id, include) - -Retrieve a membership - -Returns a single membership. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MembershipsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MembershipsApi apiInstance = new MembershipsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Membership UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Membership result = apiInstance.findMembershipById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MembershipsApi#findMembershipById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Membership UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Membership**](Membership.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **updateMembership** -> Membership updateMembership(id, membershipInput, include) - -Update the membership - -Updates the membership. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MembershipsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MembershipsApi apiInstance = new MembershipsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Membership UUID - MembershipInput membershipInput = new MembershipInput(); // MembershipInput | Membership to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Membership result = apiInstance.updateMembership(id, membershipInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MembershipsApi#updateMembership"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Membership UUID | | -| **membershipInput** | [**MembershipInput**](MembershipInput.md)| Membership to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Membership**](Membership.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Meta.md b/equinix-openapi-metal/docs/Meta.md deleted file mode 100644 index 342c2e7c0..000000000 --- a/equinix-openapi-metal/docs/Meta.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# Meta - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**first** | [**Href**](Href.md) | | [optional] | -|**last** | [**Href**](Href.md) | | [optional] | -|**next** | [**Href**](Href.md) | | [optional] | -|**previous** | [**Href**](Href.md) | | [optional] | -|**self** | [**Href**](Href.md) | | [optional] | -|**total** | **Integer** | | [optional] | -|**currentPage** | **Integer** | | [optional] | -|**lastPage** | **Integer** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/Metadata.md b/equinix-openapi-metal/docs/Metadata.md deleted file mode 100644 index 2eba20e93..000000000 --- a/equinix-openapi-metal/docs/Metadata.md +++ /dev/null @@ -1,47 +0,0 @@ - - -# Metadata - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**propertyClass** | **String** | | [optional] | -|**customdata** | **Map<String, Object>** | | [optional] | -|**facility** | **String** | The facility code of the instance | [optional] | -|**hostname** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**iqn** | **String** | | [optional] | -|**metro** | **String** | The metro code of the instance | [optional] | -|**network** | [**MetadataNetwork**](MetadataNetwork.md) | | [optional] | -|**operatingSystem** | **Object** | | [optional] | -|**plan** | **String** | The plan slug of the instance | [optional] | -|**privateSubnets** | **List<String>** | An array of the private subnets | [optional] | -|**reserved** | **Boolean** | | [optional] | -|**specs** | **Object** | The specs of the plan version of the instance | [optional] | -|**sshKeys** | **List<String>** | | [optional] | -|**switchShortId** | **String** | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The current state the instance is in. * When an instance is initially created it will be in the `queued` state until it is picked up by the provisioner. * Once provisioning has begun on the instance it's state will move to `provisioning`. * When an instance is deleted, it will move to `deprovisioning` state until the deprovision is completed and the instance state moves to `deleted`. * If an instance fails to provision or deprovision it will move to `failed` state. * Once an instance has completed provisioning it will move to `active` state. * If an instance is currently powering off or powering on it will move to `powering_off` or `powering_on` states respectively. * When the instance is powered off completely it will move to the `inactive` state. * When an instance is powered on completely it will move to the `active` state. * Using the reinstall action to install a new OS on the instance will cause the instance state to change to `reinstalling`. * When the reinstall action is complete the instance will move to `active` state. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**volumes** | **List<String>** | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| QUEUED | "queued" | -| PROVISIONING | "provisioning" | -| DEPROVISIONING | "deprovisioning" | -| REINSTALLING | "reinstalling" | -| ACTIVE | "active" | -| INACTIVE | "inactive" | -| FAILED | "failed" | -| POWERING_ON | "powering_on" | -| POWERING_OFF | "powering_off" | -| DELETED | "deleted" | - - - diff --git a/equinix-openapi-metal/docs/MetadataNetwork.md b/equinix-openapi-metal/docs/MetadataNetwork.md deleted file mode 100644 index c3eb873da..000000000 --- a/equinix-openapi-metal/docs/MetadataNetwork.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# MetadataNetwork - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addresses** | **List<String>** | | [optional] | -|**interfaces** | **List<Object>** | | [optional] | -|**network** | [**MetadataNetworkNetwork**](MetadataNetworkNetwork.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MetadataNetworkNetwork.md b/equinix-openapi-metal/docs/MetadataNetworkNetwork.md deleted file mode 100644 index f92bc2096..000000000 --- a/equinix-openapi-metal/docs/MetadataNetworkNetwork.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MetadataNetworkNetwork - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bonding** | [**MetadataNetworkNetworkBonding**](MetadataNetworkNetworkBonding.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MetadataNetworkNetworkBonding.md b/equinix-openapi-metal/docs/MetadataNetworkNetworkBonding.md deleted file mode 100644 index 1f3056170..000000000 --- a/equinix-openapi-metal/docs/MetadataNetworkNetworkBonding.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# MetadataNetworkNetworkBonding - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**linkAggregation** | **String** | | [optional] | -|**mac** | **String** | | [optional] | -|**mode** | **Integer** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MetalGateway.md b/equinix-openapi-metal/docs/MetalGateway.md deleted file mode 100644 index c63018850..000000000 --- a/equinix-openapi-metal/docs/MetalGateway.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# MetalGateway - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**ipReservation** | [**IPReservationOrHref**](IPReservationOrHref.md) | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**virtualNetwork** | [**VirtualNetwork**](VirtualNetwork.md) | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| READY | "ready" | -| ACTIVE | "active" | -| DELETING | "deleting" | - - - diff --git a/equinix-openapi-metal/docs/MetalGatewayCreateInput.md b/equinix-openapi-metal/docs/MetalGatewayCreateInput.md deleted file mode 100644 index 18f5f24cd..000000000 --- a/equinix-openapi-metal/docs/MetalGatewayCreateInput.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# MetalGatewayCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ipReservationId** | **UUID** | The UUID of an IP reservation that belongs to the same project as where the metal gateway will be created in. This field is required unless the private IPv4 subnet size is specified. | [optional] | -|**privateIpv4SubnetSize** | **Integer** | The subnet size (8, 16, 32, 64, or 128) of the private IPv4 reservation that will be created for the metal gateway. This field is required unless a project IP reservation was specified. Please keep in mind that the number of private metal gateway ranges are limited per project. If you would like to increase the limit per project, please contact support for assistance. | [optional] | -|**virtualNetworkId** | **UUID** | The UUID of a metro virtual network that belongs to the same project as where the metal gateway will be created in. | | - - - diff --git a/equinix-openapi-metal/docs/MetalGatewayElasticIpCreateInput.md b/equinix-openapi-metal/docs/MetalGatewayElasticIpCreateInput.md deleted file mode 100644 index ff1e2e51c..000000000 --- a/equinix-openapi-metal/docs/MetalGatewayElasticIpCreateInput.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# MetalGatewayElasticIpCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | **String** | An IP address (or IP Address range) contained within one of the project's IP Reservations | | -|**nextHop** | **String** | An IP address contained within the Metal Gateways' IP Reservation range. | | -|**customdata** | **Map<String, Object>** | Optional User-defined JSON object value. | [optional] | -|**tags** | **List<String>** | Optional list of User-defined tags. Can be used by users to provide additional details or context regarding the purpose or usage of this resource. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MetalGatewayList.md b/equinix-openapi-metal/docs/MetalGatewayList.md deleted file mode 100644 index cc4b5e415..000000000 --- a/equinix-openapi-metal/docs/MetalGatewayList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# MetalGatewayList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**metalGateways** | [**List<MetalGatewayListMetalGatewaysInner>**](MetalGatewayListMetalGatewaysInner.md) | | [optional] | -|**meta** | [**Meta**](Meta.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MetalGatewayListMetalGatewaysInner.md b/equinix-openapi-metal/docs/MetalGatewayListMetalGatewaysInner.md deleted file mode 100644 index e63fe3a27..000000000 --- a/equinix-openapi-metal/docs/MetalGatewayListMetalGatewaysInner.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# MetalGatewayListMetalGatewaysInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**ipReservation** | [**IPReservationOrHref**](IPReservationOrHref.md) | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**virtualNetwork** | [**VirtualNetwork**](VirtualNetwork.md) | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| READY | "ready" | -| ACTIVE | "active" | -| DELETING | "deleting" | - - - diff --git a/equinix-openapi-metal/docs/MetalGatewayLite.md b/equinix-openapi-metal/docs/MetalGatewayLite.md deleted file mode 100644 index 2f80a24c8..000000000 --- a/equinix-openapi-metal/docs/MetalGatewayLite.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# MetalGatewayLite - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**gatewayAddress** | **String** | The gateway address with subnet CIDR value for this Metal Gateway. For example, a Metal Gateway using an IP reservation with block 10.1.2.0/27 would have a gateway address of 10.1.2.1/27. | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**vlan** | **Integer** | The VLAN id of the Virtual Network record associated to this Metal Gateway. | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| READY | "ready" | -| ACTIVE | "active" | -| DELETING | "deleting" | - - - diff --git a/equinix-openapi-metal/docs/MetalGatewaysApi.md b/equinix-openapi-metal/docs/MetalGatewaysApi.md deleted file mode 100644 index dfb607504..000000000 --- a/equinix-openapi-metal/docs/MetalGatewaysApi.md +++ /dev/null @@ -1,479 +0,0 @@ -# MetalGatewaysApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createMetalGateway**](MetalGatewaysApi.md#createMetalGateway) | **POST** /projects/{project_id}/metal-gateways | Create a metal gateway | -| [**createMetalGatewayElasticIp**](MetalGatewaysApi.md#createMetalGatewayElasticIp) | **POST** /metal-gateways/{id}/ips | Create a Metal Gateway Elastic IP | -| [**deleteMetalGateway**](MetalGatewaysApi.md#deleteMetalGateway) | **DELETE** /metal-gateways/{id} | Deletes the metal gateway | -| [**findMetalGatewayById**](MetalGatewaysApi.md#findMetalGatewayById) | **GET** /metal-gateways/{id} | Returns the metal gateway | -| [**findMetalGatewaysByProject**](MetalGatewaysApi.md#findMetalGatewaysByProject) | **GET** /projects/{project_id}/metal-gateways | Returns all metal gateways for a project | -| [**getMetalGatewayElasticIps**](MetalGatewaysApi.md#getMetalGatewayElasticIps) | **GET** /metal-gateways/{id}/ips | List Metal Gateway Elastic IPs | - - - -# **createMetalGateway** -> FindMetalGatewayById200Response createMetalGateway(projectId, createMetalGatewayRequest, include, exclude, page, perPage) - -Create a metal gateway - -Create a metal gateway in a project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MetalGatewaysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MetalGatewaysApi apiInstance = new MetalGatewaysApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - CreateMetalGatewayRequest createMetalGatewayRequest = new CreateMetalGatewayRequest(); // CreateMetalGatewayRequest | Metal Gateway to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - FindMetalGatewayById200Response result = apiInstance.createMetalGateway(projectId, createMetalGatewayRequest, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MetalGatewaysApi#createMetalGateway"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| Project UUID | | -| **createMetalGatewayRequest** | [**CreateMetalGatewayRequest**](CreateMetalGatewayRequest.md)| Metal Gateway to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**FindMetalGatewayById200Response**](FindMetalGatewayById200Response.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createMetalGatewayElasticIp** -> IPAssignment createMetalGatewayElasticIp(id, metalGatewayElasticIpCreateInput, include, exclude) - -Create a Metal Gateway Elastic IP - -Create a new Elastic IP on this Metal Gateway. Assign an IPv4 range as an elastic IP to the Metal Gateway, with a specified next-hop address contained within the Metal Gateway. Notice: Elastic IPs on Metal Gateways are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MetalGatewaysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MetalGatewaysApi apiInstance = new MetalGatewaysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Metal Gateway UUID - MetalGatewayElasticIpCreateInput metalGatewayElasticIpCreateInput = new MetalGatewayElasticIpCreateInput(); // MetalGatewayElasticIpCreateInput | - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - IPAssignment result = apiInstance.createMetalGatewayElasticIp(id, metalGatewayElasticIpCreateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MetalGatewaysApi#createMetalGatewayElasticIp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Metal Gateway UUID | | -| **metalGatewayElasticIpCreateInput** | [**MetalGatewayElasticIpCreateInput**](MetalGatewayElasticIpCreateInput.md)| | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**IPAssignment**](IPAssignment.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Created | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | -| **422** | Unprocessable entity | - | - - -# **deleteMetalGateway** -> FindMetalGatewayById200Response deleteMetalGateway(id, include, exclude) - -Deletes the metal gateway - -Deletes a metal gateway and any elastic IP assignments associated with this metal gateway. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MetalGatewaysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MetalGatewaysApi apiInstance = new MetalGatewaysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Metal Gateway UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - FindMetalGatewayById200Response result = apiInstance.deleteMetalGateway(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MetalGatewaysApi#deleteMetalGateway"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Metal Gateway UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**FindMetalGatewayById200Response**](FindMetalGatewayById200Response.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **202** | accepted | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findMetalGatewayById** -> FindMetalGatewayById200Response findMetalGatewayById(id, include, exclude) - -Returns the metal gateway - -Returns a specific metal gateway - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MetalGatewaysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MetalGatewaysApi apiInstance = new MetalGatewaysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Metal Gateway UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - FindMetalGatewayById200Response result = apiInstance.findMetalGatewayById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MetalGatewaysApi#findMetalGatewayById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Metal Gateway UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**FindMetalGatewayById200Response**](FindMetalGatewayById200Response.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findMetalGatewaysByProject** -> MetalGatewayList findMetalGatewaysByProject(projectId, include, exclude, page, perPage) - -Returns all metal gateways for a project - -Return all metal gateways for a project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MetalGatewaysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MetalGatewaysApi apiInstance = new MetalGatewaysApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - MetalGatewayList result = apiInstance.findMetalGatewaysByProject(projectId, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MetalGatewaysApi#findMetalGatewaysByProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**MetalGatewayList**](MetalGatewayList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **getMetalGatewayElasticIps** -> IPAssignmentList getMetalGatewayElasticIps(id, include, exclude) - -List Metal Gateway Elastic IPs - -Returns the list of Elastic IPs assigned to this Metal Gateway - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MetalGatewaysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MetalGatewaysApi apiInstance = new MetalGatewaysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Metal Gateway UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - IPAssignmentList result = apiInstance.getMetalGatewayElasticIps(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MetalGatewaysApi#getMetalGatewayElasticIps"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Metal Gateway UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**IPAssignmentList**](IPAssignmentList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **401** | Unauthorized | - | -| **404** | Not Found | - | - diff --git a/equinix-openapi-metal/docs/Metro.md b/equinix-openapi-metal/docs/Metro.md deleted file mode 100644 index 35d5ad689..000000000 --- a/equinix-openapi-metal/docs/Metro.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# Metro - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**country** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MetroInput.md b/equinix-openapi-metal/docs/MetroInput.md deleted file mode 100644 index 3080ec33a..000000000 --- a/equinix-openapi-metal/docs/MetroInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MetroInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**metro** | **String** | Metro code or ID of where the instance should be provisioned in. Either metro or facility must be provided. | | - - - diff --git a/equinix-openapi-metal/docs/MetroList.md b/equinix-openapi-metal/docs/MetroList.md deleted file mode 100644 index 8dda2c4d7..000000000 --- a/equinix-openapi-metal/docs/MetroList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MetroList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**metros** | [**List<Metro>**](Metro.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MetrosApi.md b/equinix-openapi-metal/docs/MetrosApi.md deleted file mode 100644 index b08957069..000000000 --- a/equinix-openapi-metal/docs/MetrosApi.md +++ /dev/null @@ -1,146 +0,0 @@ -# MetrosApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findMetros**](MetrosApi.md#findMetros) | **GET** /locations/metros | Retrieve all metros | -| [**getMetro**](MetrosApi.md#getMetro) | **GET** /locations/metros/{id} | Retrieve a specific Metro's details | - - - -# **findMetros** -> MetroList findMetros() - -Retrieve all metros - -Provides a listing of available metros - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MetrosApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MetrosApi apiInstance = new MetrosApi(defaultClient); - try { - MetroList result = apiInstance.findMetros(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MetrosApi#findMetros"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**MetroList**](MetroList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **getMetro** -> Metro getMetro(id) - -Retrieve a specific Metro's details - -Show the details for a metro, including name, code, and country. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.MetrosApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - MetrosApi apiInstance = new MetrosApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Metro UUID - try { - Metro result = apiInstance.getMetro(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MetrosApi#getMetro"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Metro UUID | | - -### Return type - -[**Metro**](Metro.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/Mount.md b/equinix-openapi-metal/docs/Mount.md deleted file mode 100644 index 2aee10e03..000000000 --- a/equinix-openapi-metal/docs/Mount.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# Mount - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**device** | **String** | | [optional] | -|**format** | **String** | | [optional] | -|**point** | **String** | | [optional] | -|**options** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/MoveHardwareReservationRequest.md b/equinix-openapi-metal/docs/MoveHardwareReservationRequest.md deleted file mode 100644 index ff77477de..000000000 --- a/equinix-openapi-metal/docs/MoveHardwareReservationRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MoveHardwareReservationRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**projectId** | **UUID** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/NewPassword.md b/equinix-openapi-metal/docs/NewPassword.md deleted file mode 100644 index e96b48291..000000000 --- a/equinix-openapi-metal/docs/NewPassword.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# NewPassword - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**newPassword** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/OperatingSystem.md b/equinix-openapi-metal/docs/OperatingSystem.md deleted file mode 100644 index c4c815402..000000000 --- a/equinix-openapi-metal/docs/OperatingSystem.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# OperatingSystem - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**distro** | **String** | | [optional] | -|**distroLabel** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**licensed** | **Boolean** | Licenced OS is priced according to pricing property | [optional] | -|**name** | **String** | | [optional] | -|**preinstallable** | **Boolean** | Servers can be already preinstalled with OS in order to shorten provision time. | [optional] | -|**pricing** | **Object** | This object contains price per time unit and optional multiplier value if licence price depends on hardware plan or components (e.g. number of cores) | [optional] | -|**provisionableOn** | **List<String>** | | [optional] | -|**slug** | **String** | | [optional] | -|**version** | **String** | | [optional] | -|**defaultOperatingSystem** | **Boolean** | Default operating system for the distro. | [optional] [readonly] | - - - diff --git a/equinix-openapi-metal/docs/OperatingSystemList.md b/equinix-openapi-metal/docs/OperatingSystemList.md deleted file mode 100644 index bf3160e14..000000000 --- a/equinix-openapi-metal/docs/OperatingSystemList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OperatingSystemList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**operatingSystems** | [**List<OperatingSystem>**](OperatingSystem.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/OperatingSystemsApi.md b/equinix-openapi-metal/docs/OperatingSystemsApi.md deleted file mode 100644 index 3d8dc4e41..000000000 --- a/equinix-openapi-metal/docs/OperatingSystemsApi.md +++ /dev/null @@ -1,142 +0,0 @@ -# OperatingSystemsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findOperatingSystemVersion**](OperatingSystemsApi.md#findOperatingSystemVersion) | **GET** /operating-system-versions | Retrieve all operating system versions | -| [**findOperatingSystems**](OperatingSystemsApi.md#findOperatingSystems) | **GET** /operating-systems | Retrieve all operating systems | - - - -# **findOperatingSystemVersion** -> OperatingSystemList findOperatingSystemVersion() - -Retrieve all operating system versions - -Provides a listing of available operating system versions. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OperatingSystemsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OperatingSystemsApi apiInstance = new OperatingSystemsApi(defaultClient); - try { - OperatingSystemList result = apiInstance.findOperatingSystemVersion(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OperatingSystemsApi#findOperatingSystemVersion"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**OperatingSystemList**](OperatingSystemList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findOperatingSystems** -> OperatingSystemList findOperatingSystems() - -Retrieve all operating systems - -Provides a listing of available operating systems to provision your new device with. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OperatingSystemsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OperatingSystemsApi apiInstance = new OperatingSystemsApi(defaultClient); - try { - OperatingSystemList result = apiInstance.findOperatingSystems(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OperatingSystemsApi#findOperatingSystems"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**OperatingSystemList**](OperatingSystemList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - diff --git a/equinix-openapi-metal/docs/Organization.md b/equinix-openapi-metal/docs/Organization.md deleted file mode 100644 index 14d5aaf5e..000000000 --- a/equinix-openapi-metal/docs/Organization.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# Organization - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | [**Address**](Address.md) | | [optional] | -|**billingAddress** | [**Address**](Address.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**creditAmount** | **Float** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**description** | **String** | | [optional] | -|**enforce2faAt** | **OffsetDateTime** | Force to all members to have enabled the two factor authentication after that date, unless the value is null | [optional] | -|**id** | **UUID** | | [optional] | -|**logo** | **String** | | [optional] | -|**members** | [**List<Href>**](Href.md) | | [optional] | -|**memberships** | [**List<Href>**](Href.md) | | [optional] | -|**name** | **String** | | [optional] | -|**projects** | [**List<Href>**](Href.md) | | [optional] | -|**terms** | **Integer** | | [optional] | -|**twitter** | **String** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**website** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/OrganizationInput.md b/equinix-openapi-metal/docs/OrganizationInput.md deleted file mode 100644 index e71f1c528..000000000 --- a/equinix-openapi-metal/docs/OrganizationInput.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# OrganizationInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**address** | [**Address**](Address.md) | | [optional] | -|**billingAddress** | [**Address**](Address.md) | | [optional] | -|**customdata** | **Object** | | [optional] | -|**description** | **String** | | [optional] | -|**enforce2faAt** | **OffsetDateTime** | Force to all members to have enabled the two factor authentication after that date, unless the value is null | [optional] | -|**logo** | **byte[]** | The logo for the organization; must be base64-encoded image data | [optional] | -|**name** | **String** | | [optional] | -|**twitter** | **String** | | [optional] | -|**website** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/OrganizationList.md b/equinix-openapi-metal/docs/OrganizationList.md deleted file mode 100644 index 6217326fb..000000000 --- a/equinix-openapi-metal/docs/OrganizationList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OrganizationList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**meta** | [**Meta**](Meta.md) | | [optional] | -|**organizations** | [**List<Organization>**](Organization.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/OrganizationsApi.md b/equinix-openapi-metal/docs/OrganizationsApi.md deleted file mode 100644 index ea6e36830..000000000 --- a/equinix-openapi-metal/docs/OrganizationsApi.md +++ /dev/null @@ -1,1163 +0,0 @@ -# OrganizationsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createOrganization**](OrganizationsApi.md#createOrganization) | **POST** /organizations | Create an organization | -| [**createOrganizationInvitation**](OrganizationsApi.md#createOrganizationInvitation) | **POST** /organizations/{id}/invitations | Create an invitation for an organization | -| [**createOrganizationProject**](OrganizationsApi.md#createOrganizationProject) | **POST** /organizations/{id}/projects | Create a project for the organization | -| [**createPaymentMethod**](OrganizationsApi.md#createPaymentMethod) | **POST** /organizations/{id}/payment-methods | Create a payment method for the given organization | -| [**deleteOrganization**](OrganizationsApi.md#deleteOrganization) | **DELETE** /organizations/{id} | Delete the organization | -| [**findOperatingSystemsByOrganization**](OrganizationsApi.md#findOperatingSystemsByOrganization) | **GET** /organizations/{id}/operating-systems | Retrieve all operating systems visible by the organization | -| [**findOrganizationById**](OrganizationsApi.md#findOrganizationById) | **GET** /organizations/{id} | Retrieve an organization's details | -| [**findOrganizationCustomdata**](OrganizationsApi.md#findOrganizationCustomdata) | **GET** /organizations/{id}/customdata | Retrieve the custom metadata of an organization | -| [**findOrganizationInvitations**](OrganizationsApi.md#findOrganizationInvitations) | **GET** /organizations/{id}/invitations | Retrieve organization invitations | -| [**findOrganizationPaymentMethods**](OrganizationsApi.md#findOrganizationPaymentMethods) | **GET** /organizations/{id}/payment-methods | Retrieve all payment methods of an organization | -| [**findOrganizationProjects**](OrganizationsApi.md#findOrganizationProjects) | **GET** /organizations/{id}/projects | Retrieve all projects of an organization | -| [**findOrganizationTransfers**](OrganizationsApi.md#findOrganizationTransfers) | **GET** /organizations/{id}/transfers | Retrieve all project transfer requests from or to an organization | -| [**findOrganizations**](OrganizationsApi.md#findOrganizations) | **GET** /organizations | Retrieve all organizations | -| [**findPlansByOrganization**](OrganizationsApi.md#findPlansByOrganization) | **GET** /organizations/{id}/plans | Retrieve all plans visible by the organization | -| [**updateOrganization**](OrganizationsApi.md#updateOrganization) | **PUT** /organizations/{id} | Update the organization | - - - -# **createOrganization** -> Organization createOrganization(organizationInput, include, exclude) - -Create an organization - -Creates an organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - OrganizationInput organizationInput = new OrganizationInput(); // OrganizationInput | Organization to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Organization result = apiInstance.createOrganization(organizationInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#createOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **organizationInput** | [**OrganizationInput**](OrganizationInput.md)| Organization to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Organization**](Organization.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createOrganizationInvitation** -> Invitation createOrganizationInvitation(id, invitationInput, include) - -Create an invitation for an organization - -In order to add a user to an organization, they must first be invited. To invite to several projects the parameter `projects_ids:[a,b,c]` can be used - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - InvitationInput invitationInput = new InvitationInput(); // InvitationInput | Invitation to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Invitation result = apiInstance.createOrganizationInvitation(id, invitationInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#createOrganizationInvitation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **invitationInput** | [**InvitationInput**](InvitationInput.md)| Invitation to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Invitation**](Invitation.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createOrganizationProject** -> Project createOrganizationProject(id, projectCreateInput, include, exclude) - -Create a project for the organization - -Creates a new project for the organization - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - ProjectCreateInput projectCreateInput = new ProjectCreateInput(); // ProjectCreateInput | Project to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Project result = apiInstance.createOrganizationProject(id, projectCreateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#createOrganizationProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **projectCreateInput** | [**ProjectCreateInput**](ProjectCreateInput.md)| Project to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Project**](Project.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **createPaymentMethod** -> PaymentMethod createPaymentMethod(id, paymentMethodCreateInput, include) - -Create a payment method for the given organization - -Creates a payment method. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - PaymentMethodCreateInput paymentMethodCreateInput = new PaymentMethodCreateInput(); // PaymentMethodCreateInput | Payment Method to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - PaymentMethod result = apiInstance.createPaymentMethod(id, paymentMethodCreateInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#createPaymentMethod"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **paymentMethodCreateInput** | [**PaymentMethodCreateInput**](PaymentMethodCreateInput.md)| Payment Method to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**PaymentMethod**](PaymentMethod.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteOrganization** -> deleteOrganization(id) - -Delete the organization - -Deletes the organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - try { - apiInstance.deleteOrganization(id); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#deleteOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findOperatingSystemsByOrganization** -> OperatingSystemList findOperatingSystemsByOrganization(id, include) - -Retrieve all operating systems visible by the organization - -Returns a listing of available operating systems for the given organization - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - OperatingSystemList result = apiInstance.findOperatingSystemsByOrganization(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findOperatingSystemsByOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**OperatingSystemList**](OperatingSystemList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findOrganizationById** -> Organization findOrganizationById(id, include, exclude) - -Retrieve an organization's details - -Returns a single organization's details, if the user is authorized to view it. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Organization result = apiInstance.findOrganizationById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findOrganizationById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Organization**](Organization.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findOrganizationCustomdata** -> findOrganizationCustomdata(id) - -Retrieve the custom metadata of an organization - -Provides the custom metadata stored for this organization in json format - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - try { - apiInstance.findOrganizationCustomdata(id); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findOrganizationCustomdata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findOrganizationInvitations** -> InvitationList findOrganizationInvitations(id, include, page, perPage) - -Retrieve organization invitations - -Returns all invitations in an organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - InvitationList result = apiInstance.findOrganizationInvitations(id, include, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findOrganizationInvitations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**InvitationList**](InvitationList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findOrganizationPaymentMethods** -> PaymentMethodList findOrganizationPaymentMethods(id, include, page, perPage) - -Retrieve all payment methods of an organization - -Returns all payment methods of an organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - PaymentMethodList result = apiInstance.findOrganizationPaymentMethods(id, include, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findOrganizationPaymentMethods"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**PaymentMethodList**](PaymentMethodList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findOrganizationProjects** -> ProjectList findOrganizationProjects(id, name, include, exclude, page, perPage) - -Retrieve all projects of an organization - -Returns a collection of projects that belong to the organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - String name = "name_example"; // String | Filter results by name. - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - ProjectList result = apiInstance.findOrganizationProjects(id, name, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findOrganizationProjects"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **name** | **String**| Filter results by name. | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**ProjectList**](ProjectList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findOrganizationTransfers** -> TransferRequestList findOrganizationTransfers(id, include) - -Retrieve all project transfer requests from or to an organization - -Provides a collection of project transfer requests from or to the organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - TransferRequestList result = apiInstance.findOrganizationTransfers(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findOrganizationTransfers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**TransferRequestList**](TransferRequestList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | - - -# **findOrganizations** -> OrganizationList findOrganizations(personal, withoutProjects, include, exclude, page, perPage) - -Retrieve all organizations - -Returns a list of organizations that are accessible to the current user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - String personal = "include"; // String | Include, exclude or show only personal organizations. - String withoutProjects = "include"; // String | Include, exclude or show only organizations that have no projects. - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - OrganizationList result = apiInstance.findOrganizations(personal, withoutProjects, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findOrganizations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **personal** | **String**| Include, exclude or show only personal organizations. | [optional] [enum: include, exclude, only] | -| **withoutProjects** | **String**| Include, exclude or show only organizations that have no projects. | [optional] [enum: include, exclude, only] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**OrganizationList**](OrganizationList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findPlansByOrganization** -> PlanList findPlansByOrganization(id, include, exclude) - -Retrieve all plans visible by the organization - -Returns a listing of available plans for the given organization - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - PlanList result = apiInstance.findPlansByOrganization(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#findPlansByOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**PlanList**](PlanList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **updateOrganization** -> Organization updateOrganization(id, organizationInput, include, exclude) - -Update the organization - -Updates the organization. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OrganizationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Organization UUID - OrganizationInput organizationInput = new OrganizationInput(); // OrganizationInput | Organization to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Organization result = apiInstance.updateOrganization(id, organizationInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationsApi#updateOrganization"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Organization UUID | | -| **organizationInput** | [**OrganizationInput**](OrganizationInput.md)| Organization to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Organization**](Organization.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/OtpsApi.md b/equinix-openapi-metal/docs/OtpsApi.md deleted file mode 100644 index 4c34d4fa0..000000000 --- a/equinix-openapi-metal/docs/OtpsApi.md +++ /dev/null @@ -1,286 +0,0 @@ -# OtpsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findEnsureOtp**](OtpsApi.md#findEnsureOtp) | **POST** /user/otp/verify/{otp} | Verify user by providing an OTP | -| [**findRecoveryCodes**](OtpsApi.md#findRecoveryCodes) | **GET** /user/otp/recovery-codes | Retrieve my recovery codes | -| [**receiveCodes**](OtpsApi.md#receiveCodes) | **POST** /user/otp/sms/receive | Receive an OTP per sms | -| [**regenerateCodes**](OtpsApi.md#regenerateCodes) | **POST** /user/otp/recovery-codes | Generate new recovery codes | - - - -# **findEnsureOtp** -> findEnsureOtp(otp) - -Verify user by providing an OTP - -It verifies the user once a valid OTP is provided. It gives back a session token, essentially logging in the user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OtpsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OtpsApi apiInstance = new OtpsApi(defaultClient); - String otp = "otp_example"; // String | OTP - try { - apiInstance.findEnsureOtp(otp); - } catch (ApiException e) { - System.err.println("Exception when calling OtpsApi#findEnsureOtp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **otp** | **String**| OTP | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **400** | bad request | - | -| **401** | unauthorized | - | - - -# **findRecoveryCodes** -> RecoveryCodeList findRecoveryCodes() - -Retrieve my recovery codes - -Returns my recovery codes. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OtpsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OtpsApi apiInstance = new OtpsApi(defaultClient); - try { - RecoveryCodeList result = apiInstance.findRecoveryCodes(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OtpsApi#findRecoveryCodes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**RecoveryCodeList**](RecoveryCodeList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **receiveCodes** -> receiveCodes() - -Receive an OTP per sms - -Sends an OTP to the user's mobile phone. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OtpsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OtpsApi apiInstance = new OtpsApi(defaultClient); - try { - apiInstance.receiveCodes(); - } catch (ApiException e) { - System.err.println("Exception when calling OtpsApi#receiveCodes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **400** | bad request | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | -| **500** | internal server error | - | - - -# **regenerateCodes** -> RecoveryCodeList regenerateCodes() - -Generate new recovery codes - -Generate a new set of recovery codes. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.OtpsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - OtpsApi apiInstance = new OtpsApi(defaultClient); - try { - RecoveryCodeList result = apiInstance.regenerateCodes(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OtpsApi#regenerateCodes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**RecoveryCodeList**](RecoveryCodeList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/ParentBlock.md b/equinix-openapi-metal/docs/ParentBlock.md deleted file mode 100644 index 69a2e091a..000000000 --- a/equinix-openapi-metal/docs/ParentBlock.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ParentBlock - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cidr** | **Integer** | | [optional] | -|**href** | **String** | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/Partition.md b/equinix-openapi-metal/docs/Partition.md deleted file mode 100644 index 0aea73e5d..000000000 --- a/equinix-openapi-metal/docs/Partition.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Partition - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**label** | **String** | | [optional] | -|**number** | **Integer** | | [optional] | -|**size** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PasswordResetTokensApi.md b/equinix-openapi-metal/docs/PasswordResetTokensApi.md deleted file mode 100644 index 083aec145..000000000 --- a/equinix-openapi-metal/docs/PasswordResetTokensApi.md +++ /dev/null @@ -1,147 +0,0 @@ -# PasswordResetTokensApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createPasswordResetToken**](PasswordResetTokensApi.md#createPasswordResetToken) | **POST** /reset-password | Create a password reset token | -| [**resetPassword**](PasswordResetTokensApi.md#resetPassword) | **DELETE** /reset-password | Reset current user password | - - - -# **createPasswordResetToken** -> createPasswordResetToken(email) - -Create a password reset token - -Creates a password reset token - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PasswordResetTokensApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PasswordResetTokensApi apiInstance = new PasswordResetTokensApi(defaultClient); - String email = "email_example"; // String | Email of user to create password reset token - try { - apiInstance.createPasswordResetToken(email); - } catch (ApiException e) { - System.err.println("Exception when calling PasswordResetTokensApi#createPasswordResetToken"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **email** | **String**| Email of user to create password reset token | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **resetPassword** -> NewPassword resetPassword() - -Reset current user password - -Resets current user password. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PasswordResetTokensApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PasswordResetTokensApi apiInstance = new PasswordResetTokensApi(defaultClient); - try { - NewPassword result = apiInstance.resetPassword(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PasswordResetTokensApi#resetPassword"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**NewPassword**](NewPassword.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | ok | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/PaymentMethod.md b/equinix-openapi-metal/docs/PaymentMethod.md deleted file mode 100644 index 748e5562d..000000000 --- a/equinix-openapi-metal/docs/PaymentMethod.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# PaymentMethod - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**billingAddress** | [**PaymentMethodBillingAddress**](PaymentMethodBillingAddress.md) | | [optional] | -|**cardType** | **String** | | [optional] | -|**cardholderName** | **String** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**createdByUser** | [**Href**](Href.md) | | [optional] | -|**_default** | **Boolean** | | [optional] | -|**email** | **String** | | [optional] | -|**expirationMonth** | **String** | | [optional] | -|**expirationYear** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | -|**organization** | [**Href**](Href.md) | | [optional] | -|**projects** | [**List<Href>**](Href.md) | | [optional] | -|**type** | **String** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PaymentMethodBillingAddress.md b/equinix-openapi-metal/docs/PaymentMethodBillingAddress.md deleted file mode 100644 index 28c7620b2..000000000 --- a/equinix-openapi-metal/docs/PaymentMethodBillingAddress.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PaymentMethodBillingAddress - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**countryCodeAlpha2** | **String** | | [optional] | -|**postalCode** | **String** | | [optional] | -|**streetAddress** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PaymentMethodCreateInput.md b/equinix-openapi-metal/docs/PaymentMethodCreateInput.md deleted file mode 100644 index eab4087d1..000000000 --- a/equinix-openapi-metal/docs/PaymentMethodCreateInput.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PaymentMethodCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_default** | **Boolean** | | [optional] | -|**name** | **String** | | | -|**nonce** | **String** | | | - - - diff --git a/equinix-openapi-metal/docs/PaymentMethodList.md b/equinix-openapi-metal/docs/PaymentMethodList.md deleted file mode 100644 index 9a84cab99..000000000 --- a/equinix-openapi-metal/docs/PaymentMethodList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PaymentMethodList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**paymentMethods** | [**List<PaymentMethod>**](PaymentMethod.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PaymentMethodUpdateInput.md b/equinix-openapi-metal/docs/PaymentMethodUpdateInput.md deleted file mode 100644 index e33a751fd..000000000 --- a/equinix-openapi-metal/docs/PaymentMethodUpdateInput.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# PaymentMethodUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**billingAddress** | **Object** | | [optional] | -|**cardholderName** | **String** | | [optional] | -|**_default** | **Boolean** | | [optional] | -|**expirationMonth** | **String** | | [optional] | -|**expirationYear** | **Integer** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PaymentMethodsApi.md b/equinix-openapi-metal/docs/PaymentMethodsApi.md deleted file mode 100644 index 09f20262b..000000000 --- a/equinix-openapi-metal/docs/PaymentMethodsApi.md +++ /dev/null @@ -1,230 +0,0 @@ -# PaymentMethodsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deletePaymentMethod**](PaymentMethodsApi.md#deletePaymentMethod) | **DELETE** /payment-methods/{id} | Delete the payment method | -| [**findPaymentMethodById**](PaymentMethodsApi.md#findPaymentMethodById) | **GET** /payment-methods/{id} | Retrieve a payment method | -| [**updatePaymentMethod**](PaymentMethodsApi.md#updatePaymentMethod) | **PUT** /payment-methods/{id} | Update the payment method | - - - -# **deletePaymentMethod** -> deletePaymentMethod(id) - -Delete the payment method - -Deletes the payment method. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PaymentMethodsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PaymentMethodsApi apiInstance = new PaymentMethodsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Payment Method UUID - try { - apiInstance.deletePaymentMethod(id); - } catch (ApiException e) { - System.err.println("Exception when calling PaymentMethodsApi#deletePaymentMethod"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Payment Method UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findPaymentMethodById** -> PaymentMethod findPaymentMethodById(id, include) - -Retrieve a payment method - -Returns a payment method - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PaymentMethodsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PaymentMethodsApi apiInstance = new PaymentMethodsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Payment Method UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - PaymentMethod result = apiInstance.findPaymentMethodById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PaymentMethodsApi#findPaymentMethodById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Payment Method UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**PaymentMethod**](PaymentMethod.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **updatePaymentMethod** -> PaymentMethod updatePaymentMethod(id, paymentMethodUpdateInput, include) - -Update the payment method - -Updates the payment method. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PaymentMethodsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PaymentMethodsApi apiInstance = new PaymentMethodsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Payment Method UUID - PaymentMethodUpdateInput paymentMethodUpdateInput = new PaymentMethodUpdateInput(); // PaymentMethodUpdateInput | Payment Method to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - PaymentMethod result = apiInstance.updatePaymentMethod(id, paymentMethodUpdateInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PaymentMethodsApi#updatePaymentMethod"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Payment Method UUID | | -| **paymentMethodUpdateInput** | [**PaymentMethodUpdateInput**](PaymentMethodUpdateInput.md)| Payment Method to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**PaymentMethod**](PaymentMethod.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Plan.md b/equinix-openapi-metal/docs/Plan.md deleted file mode 100644 index c6e0fd0bc..000000000 --- a/equinix-openapi-metal/docs/Plan.md +++ /dev/null @@ -1,45 +0,0 @@ - - -# Plan - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**availableIn** | [**List<PlanAvailableInInner>**](PlanAvailableInInner.md) | Shows which facilities the plan is available in, and the facility-based price if it is different from the default price. | [optional] | -|**availableInMetros** | [**List<PlanAvailableInMetrosInner>**](PlanAvailableInMetrosInner.md) | Shows which metros the plan is available in, and the metro-based price if it is different from the default price. | [optional] | -|**categories** | **List<String>** | Categories of the plan, like compute or storage. A Plan can belong to multiple categories. | [optional] | -|**propertyClass** | **String** | | [optional] | -|**description** | **String** | | [optional] | -|**deploymentTypes** | [**Set<DeploymentTypesEnum>**](#Set<DeploymentTypesEnum>) | | [optional] | -|**id** | **UUID** | | [optional] | -|**legacy** | **Boolean** | Deprecated. Always return false | [optional] | -|**line** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**pricing** | **Object** | | [optional] | -|**slug** | **String** | | [optional] | -|**specs** | [**PlanSpecs**](PlanSpecs.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | The plan type | [optional] | - - - -## Enum: Set<DeploymentTypesEnum> - -| Name | Value | -|---- | -----| -| ON_DEMAND | "on_demand" | -| SPOT_MARKET | "spot_market" | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| STANDARD | "standard" | -| WORKLOAD_OPTIMIZED | "workload_optimized" | -| CUSTOM | "custom" | - - - diff --git a/equinix-openapi-metal/docs/PlanAvailableInInner.md b/equinix-openapi-metal/docs/PlanAvailableInInner.md deleted file mode 100644 index 5683d921a..000000000 --- a/equinix-openapi-metal/docs/PlanAvailableInInner.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# PlanAvailableInInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **String** | href to the Facility | [optional] | -|**price** | [**PlanAvailableInInnerPrice**](PlanAvailableInInnerPrice.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PlanAvailableInInnerPrice.md b/equinix-openapi-metal/docs/PlanAvailableInInnerPrice.md deleted file mode 100644 index f11be48c7..000000000 --- a/equinix-openapi-metal/docs/PlanAvailableInInnerPrice.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PlanAvailableInInnerPrice - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**hour** | **Double** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PlanAvailableInMetrosInner.md b/equinix-openapi-metal/docs/PlanAvailableInMetrosInner.md deleted file mode 100644 index ed9e40414..000000000 --- a/equinix-openapi-metal/docs/PlanAvailableInMetrosInner.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# PlanAvailableInMetrosInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**href** | **String** | href to the Metro | [optional] | -|**price** | [**PlanAvailableInInnerPrice**](PlanAvailableInInnerPrice.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PlanList.md b/equinix-openapi-metal/docs/PlanList.md deleted file mode 100644 index 91ce550a7..000000000 --- a/equinix-openapi-metal/docs/PlanList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PlanList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**plans** | [**List<Plan>**](Plan.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PlanSpecs.md b/equinix-openapi-metal/docs/PlanSpecs.md deleted file mode 100644 index a38601f10..000000000 --- a/equinix-openapi-metal/docs/PlanSpecs.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# PlanSpecs - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cpus** | [**List<PlanSpecsCpusInner>**](PlanSpecsCpusInner.md) | | [optional] | -|**memory** | [**PlanSpecsMemory**](PlanSpecsMemory.md) | | [optional] | -|**drives** | [**List<PlanSpecsDrivesInner>**](PlanSpecsDrivesInner.md) | | [optional] | -|**nics** | [**List<PlanSpecsNicsInner>**](PlanSpecsNicsInner.md) | | [optional] | -|**features** | [**PlanSpecsFeatures**](PlanSpecsFeatures.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PlanSpecsCpusInner.md b/equinix-openapi-metal/docs/PlanSpecsCpusInner.md deleted file mode 100644 index b7da89820..000000000 --- a/equinix-openapi-metal/docs/PlanSpecsCpusInner.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# PlanSpecsCpusInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**count** | **Integer** | | [optional] | -|**type** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PlanSpecsDrivesInner.md b/equinix-openapi-metal/docs/PlanSpecsDrivesInner.md deleted file mode 100644 index a59126c91..000000000 --- a/equinix-openapi-metal/docs/PlanSpecsDrivesInner.md +++ /dev/null @@ -1,36 +0,0 @@ - - -# PlanSpecsDrivesInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**count** | **Integer** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**size** | **String** | | [optional] | -|**category** | [**CategoryEnum**](#CategoryEnum) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| HDD | "HDD" | -| SSD | "SSD" | -| NVME | "NVME" | - - - -## Enum: CategoryEnum - -| Name | Value | -|---- | -----| -| BOOT | "boot" | -| CACHE | "cache" | -| STORAGE | "storage" | - - - diff --git a/equinix-openapi-metal/docs/PlanSpecsFeatures.md b/equinix-openapi-metal/docs/PlanSpecsFeatures.md deleted file mode 100644 index 52fefbc54..000000000 --- a/equinix-openapi-metal/docs/PlanSpecsFeatures.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PlanSpecsFeatures - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**raid** | **Boolean** | | [optional] | -|**txt** | **Boolean** | | [optional] | -|**uefi** | **Boolean** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PlanSpecsMemory.md b/equinix-openapi-metal/docs/PlanSpecsMemory.md deleted file mode 100644 index 8fbc2c2ad..000000000 --- a/equinix-openapi-metal/docs/PlanSpecsMemory.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PlanSpecsMemory - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**total** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PlanSpecsNicsInner.md b/equinix-openapi-metal/docs/PlanSpecsNicsInner.md deleted file mode 100644 index 20178ddbe..000000000 --- a/equinix-openapi-metal/docs/PlanSpecsNicsInner.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# PlanSpecsNicsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**count** | **Integer** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| _1GBPS | "1Gbps" | -| _10GBPS | "10Gbps" | -| _25GBPS | "25Gbps" | - - - diff --git a/equinix-openapi-metal/docs/PlansApi.md b/equinix-openapi-metal/docs/PlansApi.md deleted file mode 100644 index 06eeea743..000000000 --- a/equinix-openapi-metal/docs/PlansApi.md +++ /dev/null @@ -1,164 +0,0 @@ -# PlansApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findPlans**](PlansApi.md#findPlans) | **GET** /plans | Retrieve all plans | -| [**findPlansByProject**](PlansApi.md#findPlansByProject) | **GET** /projects/{id}/plans | Retrieve all plans visible by the project | - - - -# **findPlans** -> PlanList findPlans(categories, type, slug, include, exclude) - -Retrieve all plans - -Provides a listing of available plans to provision your device on. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PlansApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PlansApi apiInstance = new PlansApi(defaultClient); - List categories = Arrays.asList(); // List | Filter plans by its category - String type = "standard"; // String | Filter plans by its plan type - String slug = "c3.small.x86"; // String | Filter plans by slug - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - PlanList result = apiInstance.findPlans(categories, type, slug, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PlansApi#findPlans"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **categories** | [**List<String>**](String.md)| Filter plans by its category | [optional] [enum: compute, storage, vmce] | -| **type** | **String**| Filter plans by its plan type | [optional] [enum: standard, workload_optimized, custom] | -| **slug** | **String**| Filter plans by slug | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**PlanList**](PlanList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findPlansByProject** -> PlanList findPlansByProject(id, include, exclude) - -Retrieve all plans visible by the project - -Returns a listing of available plans for the given project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PlansApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PlansApi apiInstance = new PlansApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - PlanList result = apiInstance.findPlansByProject(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PlansApi#findPlansByProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**PlanList**](PlanList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/Port.md b/equinix-openapi-metal/docs/Port.md deleted file mode 100644 index e90d4456b..000000000 --- a/equinix-openapi-metal/docs/Port.md +++ /dev/null @@ -1,44 +0,0 @@ - - -# Port - -Port is a hardware port associated with a reserved or instantiated hardware device. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bond** | [**BondPortData**](BondPortData.md) | | [optional] | -|**data** | [**PortData**](PortData.md) | | [optional] | -|**disbondOperationSupported** | **Boolean** | Indicates whether or not the bond can be broken on the port (when applicable). | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | Type is either \"NetworkBondPort\" for bond ports or \"NetworkPort\" for bondable ethernet ports | [optional] | -|**networkType** | [**NetworkTypeEnum**](#NetworkTypeEnum) | Composite network type of the bond | [optional] | -|**nativeVirtualNetwork** | [**VirtualNetwork**](VirtualNetwork.md) | | [optional] | -|**virtualNetworks** | [**List<Href>**](Href.md) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| NETWORKPORT | "NetworkPort" | -| NETWORKBONDPORT | "NetworkBondPort" | - - - -## Enum: NetworkTypeEnum - -| Name | Value | -|---- | -----| -| LAYER2_BONDED | "layer2-bonded" | -| LAYER2_INDIVIDUAL | "layer2-individual" | -| LAYER3 | "layer3" | -| HYBRID | "hybrid" | -| HYBRID_BONDED | "hybrid-bonded" | - - - diff --git a/equinix-openapi-metal/docs/PortAssignInput.md b/equinix-openapi-metal/docs/PortAssignInput.md deleted file mode 100644 index 15162d14f..000000000 --- a/equinix-openapi-metal/docs/PortAssignInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PortAssignInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**vnid** | **String** | Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PortConvertLayer3Input.md b/equinix-openapi-metal/docs/PortConvertLayer3Input.md deleted file mode 100644 index ad6dd95c3..000000000 --- a/equinix-openapi-metal/docs/PortConvertLayer3Input.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PortConvertLayer3Input - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**requestIps** | [**List<PortConvertLayer3InputRequestIpsInner>**](PortConvertLayer3InputRequestIpsInner.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PortConvertLayer3InputRequestIpsInner.md b/equinix-openapi-metal/docs/PortConvertLayer3InputRequestIpsInner.md deleted file mode 100644 index 32779336f..000000000 --- a/equinix-openapi-metal/docs/PortConvertLayer3InputRequestIpsInner.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# PortConvertLayer3InputRequestIpsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addressFamily** | **Integer** | | [optional] | -|**_public** | **Boolean** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PortData.md b/equinix-openapi-metal/docs/PortData.md deleted file mode 100644 index 6b822d97b..000000000 --- a/equinix-openapi-metal/docs/PortData.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# PortData - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**mac** | **String** | MAC address is set for NetworkPort ports | [optional] | -|**bonded** | **Boolean** | Bonded is true for NetworkPort ports in a bond and NetworkBondPort ports that are active | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PortVlanAssignment.md b/equinix-openapi-metal/docs/PortVlanAssignment.md deleted file mode 100644 index 38ec0a643..000000000 --- a/equinix-openapi-metal/docs/PortVlanAssignment.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# PortVlanAssignment - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**id** | **UUID** | | [optional] | -|**_native** | **Boolean** | | [optional] | -|**port** | [**Href**](Href.md) | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**virtualNetwork** | [**Href**](Href.md) | | [optional] | -|**vlan** | **Integer** | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| ASSIGNED | "assigned" | -| UNASSIGNING | "unassigning" | - - - diff --git a/equinix-openapi-metal/docs/PortVlanAssignmentBatch.md b/equinix-openapi-metal/docs/PortVlanAssignmentBatch.md deleted file mode 100644 index d51ddde50..000000000 --- a/equinix-openapi-metal/docs/PortVlanAssignmentBatch.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# PortVlanAssignmentBatch - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**errorMessages** | **List<String>** | | [optional] | -|**id** | **UUID** | | [optional] | -|**port** | [**Port**](Port.md) | | [optional] | -|**quantity** | **Integer** | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**vlanAssignments** | [**List<PortVlanAssignmentBatchVlanAssignmentsInner>**](PortVlanAssignmentBatchVlanAssignmentsInner.md) | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| QUEUED | "queued" | -| IN_PROGRESS | "in_progress" | -| COMPLETED | "completed" | -| FAILED | "failed" | - - - diff --git a/equinix-openapi-metal/docs/PortVlanAssignmentBatchCreateInput.md b/equinix-openapi-metal/docs/PortVlanAssignmentBatchCreateInput.md deleted file mode 100644 index 28b68e447..000000000 --- a/equinix-openapi-metal/docs/PortVlanAssignmentBatchCreateInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PortVlanAssignmentBatchCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**vlanAssignments** | [**List<PortVlanAssignmentBatchCreateInputVlanAssignmentsInner>**](PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.md b/equinix-openapi-metal/docs/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.md deleted file mode 100644 index d885064fd..000000000 --- a/equinix-openapi-metal/docs/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# PortVlanAssignmentBatchCreateInputVlanAssignmentsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_native** | **Boolean** | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | | [optional] | -|**vlan** | **String** | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| ASSIGNED | "assigned" | -| UNASSIGNED | "unassigned" | - - - diff --git a/equinix-openapi-metal/docs/PortVlanAssignmentBatchList.md b/equinix-openapi-metal/docs/PortVlanAssignmentBatchList.md deleted file mode 100644 index 36d7a4dc7..000000000 --- a/equinix-openapi-metal/docs/PortVlanAssignmentBatchList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PortVlanAssignmentBatchList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**batches** | [**List<PortVlanAssignmentBatch>**](PortVlanAssignmentBatch.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PortVlanAssignmentBatchVlanAssignmentsInner.md b/equinix-openapi-metal/docs/PortVlanAssignmentBatchVlanAssignmentsInner.md deleted file mode 100644 index d240bbd0d..000000000 --- a/equinix-openapi-metal/docs/PortVlanAssignmentBatchVlanAssignmentsInner.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# PortVlanAssignmentBatchVlanAssignmentsInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **UUID** | | [optional] | -|**_native** | **Boolean** | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | | [optional] | -|**vlan** | **Integer** | | [optional] | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| ASSIGNED | "assigned" | -| UNASSIGNED | "unassigned" | - - - diff --git a/equinix-openapi-metal/docs/PortVlanAssignmentList.md b/equinix-openapi-metal/docs/PortVlanAssignmentList.md deleted file mode 100644 index 38234e12e..000000000 --- a/equinix-openapi-metal/docs/PortVlanAssignmentList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# PortVlanAssignmentList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**vlanAssignments** | [**List<PortVlanAssignment>**](PortVlanAssignment.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/PortsApi.md b/equinix-openapi-metal/docs/PortsApi.md deleted file mode 100644 index b9aefe7bb..000000000 --- a/equinix-openapi-metal/docs/PortsApi.md +++ /dev/null @@ -1,1082 +0,0 @@ -# PortsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**assignNativeVlan**](PortsApi.md#assignNativeVlan) | **POST** /ports/{id}/native-vlan | Assign a native VLAN | -| [**assignPort**](PortsApi.md#assignPort) | **POST** /ports/{id}/assign | Assign a port to virtual network | -| [**bondPort**](PortsApi.md#bondPort) | **POST** /ports/{id}/bond | Enabling bonding | -| [**convertLayer2**](PortsApi.md#convertLayer2) | **POST** /ports/{id}/convert/layer-2 | Convert to Layer 2 | -| [**convertLayer3**](PortsApi.md#convertLayer3) | **POST** /ports/{id}/convert/layer-3 | Convert to Layer 3 | -| [**createPortVlanAssignmentBatch**](PortsApi.md#createPortVlanAssignmentBatch) | **POST** /ports/{id}/vlan-assignments/batches | Create a new Port-VLAN Assignment management batch | -| [**deleteNativeVlan**](PortsApi.md#deleteNativeVlan) | **DELETE** /ports/{id}/native-vlan | Remove native VLAN | -| [**disbondPort**](PortsApi.md#disbondPort) | **POST** /ports/{id}/disbond | Disabling bonding | -| [**findPortById**](PortsApi.md#findPortById) | **GET** /ports/{id} | Retrieve a port | -| [**findPortVlanAssignmentBatchByPortIdAndBatchId**](PortsApi.md#findPortVlanAssignmentBatchByPortIdAndBatchId) | **GET** /ports/{id}/vlan-assignments/batches/{batch_id} | Retrieve a VLAN Assignment Batch's details | -| [**findPortVlanAssignmentBatches**](PortsApi.md#findPortVlanAssignmentBatches) | **GET** /ports/{id}/vlan-assignments/batches | List the VLAN Assignment Batches for a port | -| [**findPortVlanAssignmentByPortIdAndAssignmentId**](PortsApi.md#findPortVlanAssignmentByPortIdAndAssignmentId) | **GET** /ports/{id}/vlan-assignments/{assignment_id} | Show a particular Port VLAN assignment's details | -| [**findPortVlanAssignments**](PortsApi.md#findPortVlanAssignments) | **GET** /ports/{id}/vlan-assignments | List Current VLAN assignments for a port | -| [**unassignPort**](PortsApi.md#unassignPort) | **POST** /ports/{id}/unassign | Unassign a port | - - - -# **assignNativeVlan** -> Port assignNativeVlan(id, vnid, include) - -Assign a native VLAN - -Sets a virtual network on this port as a \"native VLAN\". The VLAN must have already been assigned using the using the \"Assign a port to a virtual network\" operation. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - String vnid = "vnid_example"; // String | Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Port result = apiInstance.assignNativeVlan(id, vnid, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#assignNativeVlan"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **vnid** | **String**| Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **assignPort** -> Port assignPort(id, portAssignInput, include) - -Assign a port to virtual network - -Assign a hardware port to a virtual network. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - PortAssignInput portAssignInput = new PortAssignInput(); // PortAssignInput | Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Port result = apiInstance.assignPort(id, portAssignInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#assignPort"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **portAssignInput** | [**PortAssignInput**](PortAssignInput.md)| Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **bondPort** -> Port bondPort(id, bulkEnable, include) - -Enabling bonding - -Enabling bonding for one or all ports - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - Boolean bulkEnable = true; // Boolean | enable both ports - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Port result = apiInstance.bondPort(id, bulkEnable, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#bondPort"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **bulkEnable** | **Boolean**| enable both ports | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **convertLayer2** -> Port convertLayer2(id, portAssignInput, include) - -Convert to Layer 2 - -Converts a bond port to Layer 2. IP assignments of the port will be removed. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - PortAssignInput portAssignInput = new PortAssignInput(); // PortAssignInput | Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Port result = apiInstance.convertLayer2(id, portAssignInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#convertLayer2"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **portAssignInput** | [**PortAssignInput**](PortAssignInput.md)| Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **convertLayer3** -> Port convertLayer3(id, include, portConvertLayer3Input) - -Convert to Layer 3 - -Converts a bond port to Layer 3. VLANs must first be unassigned. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - PortConvertLayer3Input portConvertLayer3Input = new PortConvertLayer3Input(); // PortConvertLayer3Input | IPs to request - try { - Port result = apiInstance.convertLayer3(id, include, portConvertLayer3Input); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#convertLayer3"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **portConvertLayer3Input** | [**PortConvertLayer3Input**](PortConvertLayer3Input.md)| IPs to request | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createPortVlanAssignmentBatch** -> PortVlanAssignmentBatch createPortVlanAssignmentBatch(id, portVlanAssignmentBatchCreateInput, include) - -Create a new Port-VLAN Assignment management batch - -Create a new asynchronous batch request which handles adding and/or removing the VLANs to which the port is assigned. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput = new PortVlanAssignmentBatchCreateInput(); // PortVlanAssignmentBatchCreateInput | VLAN Assignment batch details - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - PortVlanAssignmentBatch result = apiInstance.createPortVlanAssignmentBatch(id, portVlanAssignmentBatchCreateInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#createPortVlanAssignmentBatch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **portVlanAssignmentBatchCreateInput** | [**PortVlanAssignmentBatchCreateInput**](PortVlanAssignmentBatchCreateInput.md)| VLAN Assignment batch details | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**PortVlanAssignmentBatch**](PortVlanAssignmentBatch.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteNativeVlan** -> Port deleteNativeVlan(id, include) - -Remove native VLAN - -Removes the native VLAN from this port - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Port result = apiInstance.deleteNativeVlan(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#deleteNativeVlan"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **disbondPort** -> Port disbondPort(id, bulkDisable, include) - -Disabling bonding - -Disabling bonding for one or all ports - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - Boolean bulkDisable = true; // Boolean | disable both ports - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Port result = apiInstance.disbondPort(id, bulkDisable, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#disbondPort"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **bulkDisable** | **Boolean**| disable both ports | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **findPortById** -> Port findPortById(id, include) - -Retrieve a port - -Returns a port - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Port result = apiInstance.findPortById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#findPortById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findPortVlanAssignmentBatchByPortIdAndBatchId** -> PortVlanAssignmentBatch findPortVlanAssignmentBatchByPortIdAndBatchId(id, batchId, include) - -Retrieve a VLAN Assignment Batch's details - -Returns the details of an existing Port-VLAN Assignment batch, including the list of VLANs to assign or unassign, and the current state of the batch. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - UUID batchId = UUID.randomUUID(); // UUID | Batch ID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - PortVlanAssignmentBatch result = apiInstance.findPortVlanAssignmentBatchByPortIdAndBatchId(id, batchId, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#findPortVlanAssignmentBatchByPortIdAndBatchId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **batchId** | **UUID**| Batch ID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**PortVlanAssignmentBatch**](PortVlanAssignmentBatch.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findPortVlanAssignmentBatches** -> PortVlanAssignmentBatchList findPortVlanAssignmentBatches(id) - -List the VLAN Assignment Batches for a port - -Show all the VLAN assignment batches that have been created for managing this port's VLAN assignments - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - try { - PortVlanAssignmentBatchList result = apiInstance.findPortVlanAssignmentBatches(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#findPortVlanAssignmentBatches"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | - -### Return type - -[**PortVlanAssignmentBatchList**](PortVlanAssignmentBatchList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findPortVlanAssignmentByPortIdAndAssignmentId** -> PortVlanAssignment findPortVlanAssignmentByPortIdAndAssignmentId(id, assignmentId, include) - -Show a particular Port VLAN assignment's details - -Show the details of a specific Port-VLAN assignment, including the current state and if the VLAN is set as native. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - UUID assignmentId = UUID.randomUUID(); // UUID | Assignment ID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - PortVlanAssignment result = apiInstance.findPortVlanAssignmentByPortIdAndAssignmentId(id, assignmentId, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#findPortVlanAssignmentByPortIdAndAssignmentId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **assignmentId** | **UUID**| Assignment ID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**PortVlanAssignment**](PortVlanAssignment.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findPortVlanAssignments** -> PortVlanAssignmentList findPortVlanAssignments(id, include) - -List Current VLAN assignments for a port - -Show the port's current VLAN assignments, including if this VLAN is set as native, and the current state of the assignment (ex. 'assigned' or 'unassigning') - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - PortVlanAssignmentList result = apiInstance.findPortVlanAssignments(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#findPortVlanAssignments"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**PortVlanAssignmentList**](PortVlanAssignmentList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **unassignPort** -> Port unassignPort(id, portAssignInput, include) - -Unassign a port - -Unassign a port for a hardware. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.PortsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - PortsApi apiInstance = new PortsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Port UUID - PortAssignInput portAssignInput = new PortAssignInput(); // PortAssignInput | Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Port result = apiInstance.unassignPort(id, portAssignInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortsApi#unassignPort"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Port UUID | | -| **portAssignInput** | [**PortAssignInput**](PortAssignInput.md)| Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Port**](Port.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Project.md b/equinix-openapi-metal/docs/Project.md deleted file mode 100644 index aa0bcf57f..000000000 --- a/equinix-openapi-metal/docs/Project.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# Project - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpConfig** | [**Href**](Href.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**devices** | [**List<Href>**](Href.md) | | [optional] | -|**id** | **UUID** | | [optional] | -|**invitations** | [**List<Href>**](Href.md) | | [optional] | -|**maxDevices** | **Object** | | [optional] | -|**members** | [**List<Href>**](Href.md) | | [optional] | -|**memberships** | [**List<Href>**](Href.md) | | [optional] | -|**name** | **String** | The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. | [optional] | -|**networkStatus** | **Object** | | [optional] | -|**organization** | [**Organization**](Organization.md) | | [optional] | -|**paymentMethod** | [**Href**](Href.md) | | [optional] | -|**sshKeys** | [**List<Href>**](Href.md) | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**volumes** | [**List<Href>**](Href.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. | [optional] | -|**tags** | **List<String>** | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| DEFAULT | "default" | -| VMCE | "vmce" | - - - diff --git a/equinix-openapi-metal/docs/ProjectCreateFromRootInput.md b/equinix-openapi-metal/docs/ProjectCreateFromRootInput.md deleted file mode 100644 index 7fcac1f89..000000000 --- a/equinix-openapi-metal/docs/ProjectCreateFromRootInput.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# ProjectCreateFromRootInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customdata** | **Object** | | [optional] | -|**name** | **String** | The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. | | -|**organizationId** | **UUID** | | [optional] | -|**paymentMethodId** | **UUID** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | The type of the project. If no type is specified the project type will automatically be `default` Projects of type 'vmce' are part of an in development feature and not available to all customers. | [optional] | -|**tags** | **List<String>** | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| DEFAULT | "default" | -| VMCE | "vmce" | - - - diff --git a/equinix-openapi-metal/docs/ProjectCreateInput.md b/equinix-openapi-metal/docs/ProjectCreateInput.md deleted file mode 100644 index 374eefcaa..000000000 --- a/equinix-openapi-metal/docs/ProjectCreateInput.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# ProjectCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customdata** | **Object** | | [optional] | -|**name** | **String** | The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. | | -|**paymentMethodId** | **UUID** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | The type of the project. If no type is specified the project type will automatically be `default` Projects of type 'vmce' are part of an in development feature and not available to all customers. | [optional] | -|**tags** | **List<String>** | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| DEFAULT | "default" | -| VMCE | "vmce" | - - - diff --git a/equinix-openapi-metal/docs/ProjectIdName.md b/equinix-openapi-metal/docs/ProjectIdName.md deleted file mode 100644 index 9f96e076c..000000000 --- a/equinix-openapi-metal/docs/ProjectIdName.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ProjectIdName - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/ProjectList.md b/equinix-openapi-metal/docs/ProjectList.md deleted file mode 100644 index 20ae69634..000000000 --- a/equinix-openapi-metal/docs/ProjectList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ProjectList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**meta** | [**Meta**](Meta.md) | | [optional] | -|**projects** | [**List<Project>**](Project.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/ProjectUpdateInput.md b/equinix-openapi-metal/docs/ProjectUpdateInput.md deleted file mode 100644 index 26c1b1254..000000000 --- a/equinix-openapi-metal/docs/ProjectUpdateInput.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# ProjectUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**backendTransferEnabled** | **Boolean** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**name** | **String** | The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. | [optional] | -|**paymentMethodId** | **UUID** | | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/ProjectUsage.md b/equinix-openapi-metal/docs/ProjectUsage.md deleted file mode 100644 index 334f3e3b7..000000000 --- a/equinix-openapi-metal/docs/ProjectUsage.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# ProjectUsage - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**facility** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**plan** | **String** | | [optional] | -|**planVersion** | **String** | | [optional] | -|**price** | **String** | | [optional] | -|**quantity** | **String** | | [optional] | -|**total** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**unit** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/ProjectUsageList.md b/equinix-openapi-metal/docs/ProjectUsageList.md deleted file mode 100644 index 8c4ae159e..000000000 --- a/equinix-openapi-metal/docs/ProjectUsageList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ProjectUsageList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**usages** | [**List<ProjectUsage>**](ProjectUsage.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/ProjectsApi.md b/equinix-openapi-metal/docs/ProjectsApi.md deleted file mode 100644 index 90676bd17..000000000 --- a/equinix-openapi-metal/docs/ProjectsApi.md +++ /dev/null @@ -1,854 +0,0 @@ -# ProjectsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createProject**](ProjectsApi.md#createProject) | **POST** /projects | Create a project | -| [**createProjectInvitation**](ProjectsApi.md#createProjectInvitation) | **POST** /projects/{project_id}/invitations | Create an invitation for a project | -| [**createTransferRequest**](ProjectsApi.md#createTransferRequest) | **POST** /projects/{id}/transfers | Create a transfer request | -| [**deleteProject**](ProjectsApi.md#deleteProject) | **DELETE** /projects/{id} | Delete the project | -| [**findIPReservationCustomdata**](ProjectsApi.md#findIPReservationCustomdata) | **GET** /projects/{project_id}/ips/{id}/customdata | Retrieve the custom metadata of an IP Reservation | -| [**findProjectById**](ProjectsApi.md#findProjectById) | **GET** /projects/{id} | Retrieve a project | -| [**findProjectCustomdata**](ProjectsApi.md#findProjectCustomdata) | **GET** /projects/{id}/customdata | Retrieve the custom metadata of a project | -| [**findProjectInvitations**](ProjectsApi.md#findProjectInvitations) | **GET** /projects/{project_id}/invitations | Retrieve project invitations | -| [**findProjectMemberships**](ProjectsApi.md#findProjectMemberships) | **GET** /projects/{project_id}/memberships | Retrieve project memberships | -| [**findProjects**](ProjectsApi.md#findProjects) | **GET** /projects | Retrieve all projects | -| [**updateProject**](ProjectsApi.md#updateProject) | **PUT** /projects/{id} | Update the project | - - - -# **createProject** -> Project createProject(projectCreateFromRootInput, include, exclude) - -Create a project - -Creates a new project for the user default organization. If the user don't have an organization, a new one will be created. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - ProjectCreateFromRootInput projectCreateFromRootInput = new ProjectCreateFromRootInput(); // ProjectCreateFromRootInput | Project to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Project result = apiInstance.createProject(projectCreateFromRootInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#createProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectCreateFromRootInput** | [**ProjectCreateFromRootInput**](ProjectCreateFromRootInput.md)| Project to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Project**](Project.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **createProjectInvitation** -> Invitation createProjectInvitation(projectId, invitationInput, include) - -Create an invitation for a project - -In order to add a user to a project, they must first be invited. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - InvitationInput invitationInput = new InvitationInput(); // InvitationInput | Invitation to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - Invitation result = apiInstance.createProjectInvitation(projectId, invitationInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#createProjectInvitation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| Project UUID | | -| **invitationInput** | [**InvitationInput**](InvitationInput.md)| Invitation to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**Invitation**](Invitation.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createTransferRequest** -> TransferRequest createTransferRequest(id, transferRequestInput, include) - -Create a transfer request - -Organization owners can transfer their projects to other organizations. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | UUID of the project to be transferred - TransferRequestInput transferRequestInput = new TransferRequestInput(); // TransferRequestInput | Transfer Request to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - TransferRequest result = apiInstance.createTransferRequest(id, transferRequestInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#createTransferRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| UUID of the project to be transferred | | -| **transferRequestInput** | [**TransferRequestInput**](TransferRequestInput.md)| Transfer Request to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**TransferRequest**](TransferRequest.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteProject** -> deleteProject(id) - -Delete the project - -Deletes the project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - try { - apiInstance.deleteProject(id); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#deleteProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findIPReservationCustomdata** -> findIPReservationCustomdata(projectId, id) - -Retrieve the custom metadata of an IP Reservation - -Provides the custom metadata stored for this IP Reservation in json format - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - UUID id = UUID.randomUUID(); // UUID | Ip Reservation UUID - try { - apiInstance.findIPReservationCustomdata(projectId, id); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#findIPReservationCustomdata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| Project UUID | | -| **id** | **UUID**| Ip Reservation UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectById** -> Project findProjectById(id, include, exclude) - -Retrieve a project - -Returns a single project if the user has access - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Project result = apiInstance.findProjectById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#findProjectById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Project**](Project.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectCustomdata** -> findProjectCustomdata(id) - -Retrieve the custom metadata of a project - -Provides the custom metadata stored for this project in json format - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - try { - apiInstance.findProjectCustomdata(id); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#findProjectCustomdata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectInvitations** -> InvitationList findProjectInvitations(projectId, include, page, perPage) - -Retrieve project invitations - -Returns all invitations in a project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - InvitationList result = apiInstance.findProjectInvitations(projectId, include, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#findProjectInvitations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**InvitationList**](InvitationList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjectMemberships** -> MembershipList findProjectMemberships(projectId, search, include, page, perPage) - -Retrieve project memberships - -Returns all memberships in a project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - String search = "search_example"; // String | Search by member full name, id and email. - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - MembershipList result = apiInstance.findProjectMemberships(projectId, search, include, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#findProjectMemberships"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| Project UUID | | -| **search** | **String**| Search by member full name, id and email. | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**MembershipList**](MembershipList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findProjects** -> ProjectList findProjects(name, include, exclude, page, perPage) - -Retrieve all projects - -Returns a collection of projects that the current user is a member of. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - String name = "name_example"; // String | Filter results by name. - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - ProjectList result = apiInstance.findProjects(name, include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#findProjects"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **name** | **String**| Filter results by name. | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**ProjectList**](ProjectList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **updateProject** -> Project updateProject(id, projectUpdateInput, include, exclude) - -Update the project - -Updates the project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - ProjectUpdateInput projectUpdateInput = new ProjectUpdateInput(); // ProjectUpdateInput | Project to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Project result = apiInstance.updateProject(id, projectUpdateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#updateProject"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **projectUpdateInput** | [**ProjectUpdateInput**](ProjectUpdateInput.md)| Project to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Project**](Project.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Raid.md b/equinix-openapi-metal/docs/Raid.md deleted file mode 100644 index 986d453c8..000000000 --- a/equinix-openapi-metal/docs/Raid.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Raid - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**devices** | **List<String>** | | [optional] | -|**level** | **String** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/RecoveryCodeList.md b/equinix-openapi-metal/docs/RecoveryCodeList.md deleted file mode 100644 index 6020778da..000000000 --- a/equinix-openapi-metal/docs/RecoveryCodeList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# RecoveryCodeList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**recoveryCodes** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/RequestIPReservation201Response.md b/equinix-openapi-metal/docs/RequestIPReservation201Response.md deleted file mode 100644 index 96c421c22..000000000 --- a/equinix-openapi-metal/docs/RequestIPReservation201Response.md +++ /dev/null @@ -1,55 +0,0 @@ - - -# RequestIPReservation201Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addon** | **Boolean** | | [optional] | -|**address** | **String** | | [optional] | -|**addressFamily** | **Integer** | | [optional] | -|**assignments** | [**List<IPAssignment>**](IPAssignment.md) | | [optional] | -|**available** | **String** | | [optional] | -|**bill** | **Boolean** | | [optional] | -|**cidr** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**enabled** | **Boolean** | | [optional] | -|**details** | **String** | | [optional] | -|**facility** | [**IPReservationFacility**](IPReservationFacility.md) | | [optional] | -|**gateway** | **String** | | [optional] | -|**globalIp** | **Boolean** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**manageable** | **Boolean** | | [optional] | -|**management** | **Boolean** | | [optional] | -|**metalGateway** | [**MetalGatewayLite**](MetalGatewayLite.md) | | [optional] | -|**metro** | [**Metro**](Metro.md) | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**projectLite** | [**Project**](Project.md) | | [optional] | -|**requestedBy** | [**Href**](Href.md) | | [optional] | -|**_public** | **Boolean** | | [optional] | -|**state** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| GLOBAL_IPV4 | "global_ipv4" | -| PUBLIC_IPV4 | "public_ipv4" | -| PRIVATE_IPV4 | "private_ipv4" | -| PUBLIC_IPV6 | "public_ipv6" | -| VRF | "vrf" | - - - diff --git a/equinix-openapi-metal/docs/RequestIPReservationRequest.md b/equinix-openapi-metal/docs/RequestIPReservationRequest.md deleted file mode 100644 index d0e0bab97..000000000 --- a/equinix-openapi-metal/docs/RequestIPReservationRequest.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# RequestIPReservationRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**comments** | **String** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**details** | **String** | | [optional] | -|**facility** | **String** | | [optional] | -|**failOnApprovalRequired** | **Boolean** | | [optional] | -|**metro** | **String** | The code of the metro you are requesting the IP reservation in. | [optional] | -|**quantity** | **Integer** | | | -|**tags** | **List<String>** | | [optional] | -|**type** | **String** | Must be set to 'vrf' | | -|**cidr** | **Integer** | The size of the VRF IP Reservation's subnet | | -|**network** | **String** | The starting address for this VRF IP Reservation's subnet | | -|**vrfId** | **UUID** | The ID of the VRF in which this VRF IP Reservation is created. The VRF must have an existing IP Range that contains the requested subnet. This field may be aliased as just 'vrf'. | | - - - diff --git a/equinix-openapi-metal/docs/SSHKey.md b/equinix-openapi-metal/docs/SSHKey.md deleted file mode 100644 index 6a2bace33..000000000 --- a/equinix-openapi-metal/docs/SSHKey.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# SSHKey - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**entity** | [**Href**](Href.md) | | [optional] | -|**fingerprint** | **String** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**key** | **String** | | [optional] | -|**label** | **String** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SSHKeyCreateInput.md b/equinix-openapi-metal/docs/SSHKeyCreateInput.md deleted file mode 100644 index f79c5375c..000000000 --- a/equinix-openapi-metal/docs/SSHKeyCreateInput.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SSHKeyCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**instancesIds** | **List<UUID>** | List of instance UUIDs to associate SSH key with, when empty array is sent all instances belonging to entity will be included | [optional] | -|**key** | **String** | | [optional] | -|**label** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SSHKeyInput.md b/equinix-openapi-metal/docs/SSHKeyInput.md deleted file mode 100644 index 65fe1664d..000000000 --- a/equinix-openapi-metal/docs/SSHKeyInput.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SSHKeyInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | | [optional] | -|**label** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SSHKeyList.md b/equinix-openapi-metal/docs/SSHKeyList.md deleted file mode 100644 index e833a9f31..000000000 --- a/equinix-openapi-metal/docs/SSHKeyList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SSHKeyList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sshKeys** | [**List<SSHKey>**](SSHKey.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SelfServiceReservationItemRequest.md b/equinix-openapi-metal/docs/SelfServiceReservationItemRequest.md deleted file mode 100644 index 1bcf10afa..000000000 --- a/equinix-openapi-metal/docs/SelfServiceReservationItemRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# SelfServiceReservationItemRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Float** | | [optional] | -|**metroId** | **UUID** | | [optional] | -|**planId** | **UUID** | | [optional] | -|**quantity** | **Integer** | | [optional] | -|**term** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SelfServiceReservationItemResponse.md b/equinix-openapi-metal/docs/SelfServiceReservationItemResponse.md deleted file mode 100644 index 6b3e3a471..000000000 --- a/equinix-openapi-metal/docs/SelfServiceReservationItemResponse.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# SelfServiceReservationItemResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**amount** | **Float** | | [optional] | -|**id** | **String** | | [optional] | -|**metroCode** | **String** | | [optional] | -|**metroId** | **UUID** | | [optional] | -|**metroName** | **String** | | [optional] | -|**planId** | **UUID** | | [optional] | -|**planName** | **String** | | [optional] | -|**planSlug** | **String** | | [optional] | -|**planCategories** | **List<String>** | | [optional] | -|**quantity** | **Integer** | | [optional] | -|**term** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SelfServiceReservationList.md b/equinix-openapi-metal/docs/SelfServiceReservationList.md deleted file mode 100644 index f7b2d447e..000000000 --- a/equinix-openapi-metal/docs/SelfServiceReservationList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SelfServiceReservationList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**reservations** | [**List<SelfServiceReservationResponse>**](SelfServiceReservationResponse.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SelfServiceReservationResponse.md b/equinix-openapi-metal/docs/SelfServiceReservationResponse.md deleted file mode 100644 index 8dd8d5271..000000000 --- a/equinix-openapi-metal/docs/SelfServiceReservationResponse.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# SelfServiceReservationResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**item** | [**List<SelfServiceReservationItemResponse>**](SelfServiceReservationItemResponse.md) | | [optional] | -|**notes** | **String** | | [optional] | -|**organization** | **String** | | [optional] | -|**organizationId** | **UUID** | | [optional] | -|**period** | [**CreateSelfServiceReservationRequestPeriod**](CreateSelfServiceReservationRequestPeriod.md) | | [optional] | -|**project** | **String** | | [optional] | -|**projectId** | **UUID** | | [optional] | -|**startDate** | **OffsetDateTime** | | [optional] | -|**status** | **String** | | [optional] | -|**totalCost** | **Integer** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SelfServiceReservationsApi.md b/equinix-openapi-metal/docs/SelfServiceReservationsApi.md deleted file mode 100644 index ff57759df..000000000 --- a/equinix-openapi-metal/docs/SelfServiceReservationsApi.md +++ /dev/null @@ -1,233 +0,0 @@ -# SelfServiceReservationsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createSelfServiceReservation**](SelfServiceReservationsApi.md#createSelfServiceReservation) | **POST** /projects/{project_id}/self-service/reservations | Create a reservation | -| [**findSelfServiceReservation**](SelfServiceReservationsApi.md#findSelfServiceReservation) | **GET** /projects/{project_id}/self-service/reservations/{id} | Retrieve a reservation | -| [**findSelfServiceReservations**](SelfServiceReservationsApi.md#findSelfServiceReservations) | **GET** /projects/{project_id}/self-service/reservations | Retrieve all reservations | - - - -# **createSelfServiceReservation** -> SelfServiceReservationResponse createSelfServiceReservation(projectId, createSelfServiceReservationRequest) - -Create a reservation - -Creates a reservation. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SelfServiceReservationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SelfServiceReservationsApi apiInstance = new SelfServiceReservationsApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - CreateSelfServiceReservationRequest createSelfServiceReservationRequest = new CreateSelfServiceReservationRequest(); // CreateSelfServiceReservationRequest | reservation to create - try { - SelfServiceReservationResponse result = apiInstance.createSelfServiceReservation(projectId, createSelfServiceReservationRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SelfServiceReservationsApi#createSelfServiceReservation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| Project UUID | | -| **createSelfServiceReservationRequest** | [**CreateSelfServiceReservationRequest**](CreateSelfServiceReservationRequest.md)| reservation to create | | - -### Return type - -[**SelfServiceReservationResponse**](SelfServiceReservationResponse.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **findSelfServiceReservation** -> SelfServiceReservationResponse findSelfServiceReservation(id, projectId) - -Retrieve a reservation - -Returns a reservation - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SelfServiceReservationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SelfServiceReservationsApi apiInstance = new SelfServiceReservationsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Reservation short_id - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - try { - SelfServiceReservationResponse result = apiInstance.findSelfServiceReservation(id, projectId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SelfServiceReservationsApi#findSelfServiceReservation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Reservation short_id | | -| **projectId** | **UUID**| Project UUID | | - -### Return type - -[**SelfServiceReservationResponse**](SelfServiceReservationResponse.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findSelfServiceReservations** -> SelfServiceReservationList findSelfServiceReservations(projectId, page, perPage, categories) - -Retrieve all reservations - -Returns all reservations. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SelfServiceReservationsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SelfServiceReservationsApi apiInstance = new SelfServiceReservationsApi(defaultClient); - UUID projectId = UUID.randomUUID(); // UUID | Project UUID - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - List categories = Arrays.asList(); // List | Filter reservations by items category - try { - SelfServiceReservationList result = apiInstance.findSelfServiceReservations(projectId, page, perPage, categories); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SelfServiceReservationsApi#findSelfServiceReservations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **projectId** | **UUID**| Project UUID | | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | -| **categories** | [**List<String>**](String.md)| Filter reservations by items category | [optional] [enum: compute, storage, vmce] | - -### Return type - -[**SelfServiceReservationList**](SelfServiceReservationList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - diff --git a/equinix-openapi-metal/docs/ServerInfo.md b/equinix-openapi-metal/docs/ServerInfo.md deleted file mode 100644 index f4feb6e3c..000000000 --- a/equinix-openapi-metal/docs/ServerInfo.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ServerInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**facility** | **String** | | [optional] | -|**metro** | **String** | The metro ID or code to check the capacity in. | [optional] | -|**plan** | **String** | The plan ID or slug to check the capacity of. | [optional] | -|**quantity** | **String** | The number of servers to check the capacity of. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotMarketApi.md b/equinix-openapi-metal/docs/SpotMarketApi.md deleted file mode 100644 index 23d356993..000000000 --- a/equinix-openapi-metal/docs/SpotMarketApi.md +++ /dev/null @@ -1,532 +0,0 @@ -# SpotMarketApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createSpotMarketRequest**](SpotMarketApi.md#createSpotMarketRequest) | **POST** /projects/{id}/spot-market-requests | Create a spot market request | -| [**deleteSpotMarketRequest**](SpotMarketApi.md#deleteSpotMarketRequest) | **DELETE** /spot-market-requests/{id} | Delete the spot market request | -| [**findMetroSpotMarketPrices**](SpotMarketApi.md#findMetroSpotMarketPrices) | **GET** /market/spot/prices/metros | Get current spot market prices for metros | -| [**findSpotMarketPrices**](SpotMarketApi.md#findSpotMarketPrices) | **GET** /market/spot/prices | Get current spot market prices | -| [**findSpotMarketPricesHistory**](SpotMarketApi.md#findSpotMarketPricesHistory) | **GET** /market/spot/prices/history | Get spot market prices for a given period of time | -| [**findSpotMarketRequestById**](SpotMarketApi.md#findSpotMarketRequestById) | **GET** /spot-market-requests/{id} | Retrieve a spot market request | -| [**listSpotMarketRequests**](SpotMarketApi.md#listSpotMarketRequests) | **GET** /projects/{id}/spot-market-requests | List spot market requests | - - - -# **createSpotMarketRequest** -> SpotMarketRequest createSpotMarketRequest(id, spotMarketRequestCreateInput) - -Create a spot market request - -Creates a new spot market request. Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan. The features attribute allows you to optionally specify what features your server should have. For example, if you require a server with a TPM chip, you may specify `{ \"features\": { \"tpm\": \"required\" } }` (or `{ \"features\": [\"tpm\"] }` in shorthand). The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below). The request will not fail if we have no servers with that feature in our inventory. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SpotMarketApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SpotMarketApi apiInstance = new SpotMarketApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - SpotMarketRequestCreateInput spotMarketRequestCreateInput = new SpotMarketRequestCreateInput(); // SpotMarketRequestCreateInput | Spot Market Request to create - try { - SpotMarketRequest result = apiInstance.createSpotMarketRequest(id, spotMarketRequestCreateInput); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SpotMarketApi#createSpotMarketRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **spotMarketRequestCreateInput** | [**SpotMarketRequestCreateInput**](SpotMarketRequestCreateInput.md)| Spot Market Request to create | | - -### Return type - -[**SpotMarketRequest**](SpotMarketRequest.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteSpotMarketRequest** -> deleteSpotMarketRequest(id, forceTermination) - -Delete the spot market request - -Deletes the spot market request. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SpotMarketApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SpotMarketApi apiInstance = new SpotMarketApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | SpotMarketRequest UUID - Boolean forceTermination = true; // Boolean | Terminate associated spot instances - try { - apiInstance.deleteSpotMarketRequest(id, forceTermination); - } catch (ApiException e) { - System.err.println("Exception when calling SpotMarketApi#deleteSpotMarketRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| SpotMarketRequest UUID | | -| **forceTermination** | **Boolean**| Terminate associated spot instances | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findMetroSpotMarketPrices** -> SpotMarketPricesPerMetroList findMetroSpotMarketPrices(metro, plan) - -Get current spot market prices for metros - -Get Equinix Metal current spot market prices for all metros. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SpotMarketApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SpotMarketApi apiInstance = new SpotMarketApi(defaultClient); - String metro = "metro_example"; // String | Metro to filter spot market prices - String plan = "plan_example"; // String | Plan to filter spot market prices - try { - SpotMarketPricesPerMetroList result = apiInstance.findMetroSpotMarketPrices(metro, plan); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SpotMarketApi#findMetroSpotMarketPrices"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **metro** | **String**| Metro to filter spot market prices | [optional] | -| **plan** | **String**| Plan to filter spot market prices | [optional] | - -### Return type - -[**SpotMarketPricesPerMetroList**](SpotMarketPricesPerMetroList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **findSpotMarketPrices** -> SpotMarketPricesList findSpotMarketPrices(facility, plan) - -Get current spot market prices - -Get Equinix Metal current spot market prices. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SpotMarketApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SpotMarketApi apiInstance = new SpotMarketApi(defaultClient); - String facility = "facility_example"; // String | Facility to check spot market prices - String plan = "plan_example"; // String | Plan to check spot market prices - try { - SpotMarketPricesList result = apiInstance.findSpotMarketPrices(facility, plan); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SpotMarketApi#findSpotMarketPrices"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **facility** | **String**| Facility to check spot market prices | [optional] | -| **plan** | **String**| Plan to check spot market prices | [optional] | - -### Return type - -[**SpotMarketPricesList**](SpotMarketPricesList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **findSpotMarketPricesHistory** -> SpotPricesHistoryReport findSpotMarketPricesHistory(facility, plan, from, until, metro) - -Get spot market prices for a given period of time - -Get spot market prices for a given plan and facility in a fixed period of time *Note: In the `200` response, the property `datapoints` contains arrays of `[float, integer]`.* - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SpotMarketApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SpotMarketApi apiInstance = new SpotMarketApi(defaultClient); - String facility = "facility_example"; // String | Facility to check spot market prices - String plan = "plan_example"; // String | Plan to check spot market prices - String from = "from_example"; // String | Timestamp from range - String until = "until_example"; // String | Timestamp to range - String metro = "metro_example"; // String | Metro to check spot market price history - try { - SpotPricesHistoryReport result = apiInstance.findSpotMarketPricesHistory(facility, plan, from, until, metro); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SpotMarketApi#findSpotMarketPricesHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **facility** | **String**| Facility to check spot market prices | | -| **plan** | **String**| Plan to check spot market prices | | -| **from** | **String**| Timestamp from range | | -| **until** | **String**| Timestamp to range | | -| **metro** | **String**| Metro to check spot market price history | [optional] | - -### Return type - -[**SpotPricesHistoryReport**](SpotPricesHistoryReport.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **findSpotMarketRequestById** -> SpotMarketRequest findSpotMarketRequestById(id, include) - -Retrieve a spot market request - -Returns a single spot market request - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SpotMarketApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SpotMarketApi apiInstance = new SpotMarketApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | SpotMarketRequest UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - SpotMarketRequest result = apiInstance.findSpotMarketRequestById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SpotMarketApi#findSpotMarketRequestById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| SpotMarketRequest UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**SpotMarketRequest**](SpotMarketRequest.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **listSpotMarketRequests** -> SpotMarketRequestList listSpotMarketRequests(id) - -List spot market requests - -View all spot market requests for a given project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SpotMarketApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SpotMarketApi apiInstance = new SpotMarketApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - try { - SpotMarketRequestList result = apiInstance.listSpotMarketRequests(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SpotMarketApi#listSpotMarketRequests"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | - -### Return type - -[**SpotMarketRequestList**](SpotMarketRequestList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/SpotMarketPricesList.md b/equinix-openapi-metal/docs/SpotMarketPricesList.md deleted file mode 100644 index 7162de160..000000000 --- a/equinix-openapi-metal/docs/SpotMarketPricesList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SpotMarketPricesList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**spotMarketPrices** | [**SpotPricesReport**](SpotPricesReport.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotMarketPricesPerMetroList.md b/equinix-openapi-metal/docs/SpotMarketPricesPerMetroList.md deleted file mode 100644 index 2f5cb3f3f..000000000 --- a/equinix-openapi-metal/docs/SpotMarketPricesPerMetroList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SpotMarketPricesPerMetroList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**spotMarketPrices** | [**SpotMarketPricesPerMetroReport**](SpotMarketPricesPerMetroReport.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotMarketPricesPerMetroReport.md b/equinix-openapi-metal/docs/SpotMarketPricesPerMetroReport.md deleted file mode 100644 index 75d49cf43..000000000 --- a/equinix-openapi-metal/docs/SpotMarketPricesPerMetroReport.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# SpotMarketPricesPerMetroReport - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**am** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**ch** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**da** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**la** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**ny** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**sg** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**sv** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotMarketRequest.md b/equinix-openapi-metal/docs/SpotMarketRequest.md deleted file mode 100644 index f0f5e96b7..000000000 --- a/equinix-openapi-metal/docs/SpotMarketRequest.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# SpotMarketRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**devicesMax** | **Integer** | | [optional] | -|**devicesMin** | **Integer** | | [optional] | -|**endAt** | **OffsetDateTime** | | [optional] | -|**facilities** | [**Href**](Href.md) | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**instances** | [**Href**](Href.md) | | [optional] | -|**maxBidPrice** | **Float** | | [optional] | -|**metro** | [**SpotMarketRequestMetro**](SpotMarketRequestMetro.md) | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotMarketRequestCreateInput.md b/equinix-openapi-metal/docs/SpotMarketRequestCreateInput.md deleted file mode 100644 index b9b5956c4..000000000 --- a/equinix-openapi-metal/docs/SpotMarketRequestCreateInput.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# SpotMarketRequestCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**devicesMax** | **Integer** | | [optional] | -|**devicesMin** | **Integer** | | [optional] | -|**endAt** | **OffsetDateTime** | | [optional] | -|**facilities** | **List<UUID>** | | [optional] | -|**instanceParameters** | [**SpotMarketRequestCreateInputInstanceParameters**](SpotMarketRequestCreateInputInstanceParameters.md) | | [optional] | -|**maxBidPrice** | **Float** | | [optional] | -|**metro** | **String** | The metro ID or code the spot market request will be created in. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotMarketRequestCreateInputInstanceParameters.md b/equinix-openapi-metal/docs/SpotMarketRequestCreateInputInstanceParameters.md deleted file mode 100644 index ce7b3d4d6..000000000 --- a/equinix-openapi-metal/docs/SpotMarketRequestCreateInputInstanceParameters.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# SpotMarketRequestCreateInputInstanceParameters - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**alwaysPxe** | **Boolean** | | [optional] | -|**billingCycle** | **String** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**description** | **String** | | [optional] | -|**features** | **List<String>** | | [optional] | -|**hostname** | **String** | | [optional] | -|**hostnames** | **List<String>** | | [optional] | -|**locked** | **Boolean** | Whether the device should be locked, preventing accidental deletion. | [optional] | -|**noSshKeys** | **Boolean** | | [optional] | -|**operatingSystem** | **String** | | [optional] | -|**plan** | **String** | | [optional] | -|**privateIpv4SubnetSize** | **Integer** | | [optional] | -|**projectSshKeys** | **List<UUID>** | | [optional] | -|**publicIpv4SubnetSize** | **Integer** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**terminationTime** | **OffsetDateTime** | | [optional] | -|**userSshKeys** | **List<UUID>** | The UUIDs of users whose SSH keys should be included on the provisioned device. | [optional] | -|**userdata** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotMarketRequestList.md b/equinix-openapi-metal/docs/SpotMarketRequestList.md deleted file mode 100644 index 0eb31574c..000000000 --- a/equinix-openapi-metal/docs/SpotMarketRequestList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SpotMarketRequestList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**spotMarketRequests** | [**List<SpotMarketRequest>**](SpotMarketRequest.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotMarketRequestMetro.md b/equinix-openapi-metal/docs/SpotMarketRequestMetro.md deleted file mode 100644 index 5e1a613e8..000000000 --- a/equinix-openapi-metal/docs/SpotMarketRequestMetro.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SpotMarketRequestMetro - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | | [optional] | -|**country** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotPricesDatapoints.md b/equinix-openapi-metal/docs/SpotPricesDatapoints.md deleted file mode 100644 index cdc6de3be..000000000 --- a/equinix-openapi-metal/docs/SpotPricesDatapoints.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SpotPricesDatapoints - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**datapoints** | **List<List<BigDecimal>>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotPricesHistoryReport.md b/equinix-openapi-metal/docs/SpotPricesHistoryReport.md deleted file mode 100644 index 3322486e0..000000000 --- a/equinix-openapi-metal/docs/SpotPricesHistoryReport.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SpotPricesHistoryReport - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**pricesHistory** | [**SpotPricesDatapoints**](SpotPricesDatapoints.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotPricesPerBaremetal.md b/equinix-openapi-metal/docs/SpotPricesPerBaremetal.md deleted file mode 100644 index 6e15d18e2..000000000 --- a/equinix-openapi-metal/docs/SpotPricesPerBaremetal.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SpotPricesPerBaremetal - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**price** | **Float** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotPricesPerFacility.md b/equinix-openapi-metal/docs/SpotPricesPerFacility.md deleted file mode 100644 index 02e9249bb..000000000 --- a/equinix-openapi-metal/docs/SpotPricesPerFacility.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# SpotPricesPerFacility - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**baremetal0** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | -|**baremetal1** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | -|**baremetal2** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | -|**baremetal2a** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | -|**baremetal2a2** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | -|**baremetal3** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | -|**baremetalS** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | -|**c2MediumX86** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | -|**m2XlargeX86** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotPricesPerNewFacility.md b/equinix-openapi-metal/docs/SpotPricesPerNewFacility.md deleted file mode 100644 index 5444bedc4..000000000 --- a/equinix-openapi-metal/docs/SpotPricesPerNewFacility.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SpotPricesPerNewFacility - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**baremetal1e** | [**SpotPricesPerBaremetal**](SpotPricesPerBaremetal.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SpotPricesReport.md b/equinix-openapi-metal/docs/SpotPricesReport.md deleted file mode 100644 index 2a2760164..000000000 --- a/equinix-openapi-metal/docs/SpotPricesReport.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# SpotPricesReport - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ams1** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**atl1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**dfw1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**ewr1** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**fra1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**iad1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**lax1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**nrt1** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**ord1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**sea1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**sin1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**sjc1** | [**SpotPricesPerFacility**](SpotPricesPerFacility.md) | | [optional] | -|**syd1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | -|**yyz1** | [**SpotPricesPerNewFacility**](SpotPricesPerNewFacility.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SshKeysApi.md b/equinix-openapi-metal/docs/SshKeysApi.md deleted file mode 100644 index 2783c56f6..000000000 --- a/equinix-openapi-metal/docs/SshKeysApi.md +++ /dev/null @@ -1,606 +0,0 @@ -# SshKeysApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createProjectSSHKey**](SshKeysApi.md#createProjectSSHKey) | **POST** /projects/{id}/ssh-keys | Create a ssh key for the given project | -| [**createSSHKey**](SshKeysApi.md#createSSHKey) | **POST** /ssh-keys | Create a ssh key for the current user | -| [**deleteSSHKey**](SshKeysApi.md#deleteSSHKey) | **DELETE** /ssh-keys/{id} | Delete the ssh key | -| [**findDeviceSSHKeys**](SshKeysApi.md#findDeviceSSHKeys) | **GET** /devices/{id}/ssh-keys | Retrieve a device's ssh keys | -| [**findProjectSSHKeys**](SshKeysApi.md#findProjectSSHKeys) | **GET** /projects/{id}/ssh-keys | Retrieve a project's ssh keys | -| [**findSSHKeyById**](SshKeysApi.md#findSSHKeyById) | **GET** /ssh-keys/{id} | Retrieve a ssh key | -| [**findSSHKeys**](SshKeysApi.md#findSSHKeys) | **GET** /ssh-keys | Retrieve all ssh keys | -| [**updateSSHKey**](SshKeysApi.md#updateSSHKey) | **PUT** /ssh-keys/{id} | Update the ssh key | - - - -# **createProjectSSHKey** -> SSHKey createProjectSSHKey(id, ssHKeyCreateInput, include) - -Create a ssh key for the given project - -Creates a ssh key. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SshKeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SshKeysApi apiInstance = new SshKeysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - SSHKeyCreateInput ssHKeyCreateInput = new SSHKeyCreateInput(); // SSHKeyCreateInput | ssh key to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - SSHKey result = apiInstance.createProjectSSHKey(id, ssHKeyCreateInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SshKeysApi#createProjectSSHKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **ssHKeyCreateInput** | [**SSHKeyCreateInput**](SSHKeyCreateInput.md)| ssh key to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**SSHKey**](SSHKey.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **createSSHKey** -> SSHKey createSSHKey(ssHKeyCreateInput, include) - -Create a ssh key for the current user - -Creates a ssh key. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SshKeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SshKeysApi apiInstance = new SshKeysApi(defaultClient); - SSHKeyCreateInput ssHKeyCreateInput = new SSHKeyCreateInput(); // SSHKeyCreateInput | ssh key to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - SSHKey result = apiInstance.createSSHKey(ssHKeyCreateInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SshKeysApi#createSSHKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **ssHKeyCreateInput** | [**SSHKeyCreateInput**](SSHKeyCreateInput.md)| ssh key to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**SSHKey**](SSHKey.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **deleteSSHKey** -> deleteSSHKey(id) - -Delete the ssh key - -Deletes the ssh key. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SshKeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SshKeysApi apiInstance = new SshKeysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | ssh key UUID - try { - apiInstance.deleteSSHKey(id); - } catch (ApiException e) { - System.err.println("Exception when calling SshKeysApi#deleteSSHKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| ssh key UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findDeviceSSHKeys** -> SSHKeyList findDeviceSSHKeys(id, searchString, include) - -Retrieve a device's ssh keys - -Returns a collection of the device's ssh keys. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SshKeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SshKeysApi apiInstance = new SshKeysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - String searchString = "searchString_example"; // String | Search by key, label, or fingerprint - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - SSHKeyList result = apiInstance.findDeviceSSHKeys(id, searchString, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SshKeysApi#findDeviceSSHKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **searchString** | **String**| Search by key, label, or fingerprint | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**SSHKeyList**](SSHKeyList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findProjectSSHKeys** -> SSHKeyList findProjectSSHKeys(id, query, include) - -Retrieve a project's ssh keys - -Returns a collection of the project's ssh keys. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SshKeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SshKeysApi apiInstance = new SshKeysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - String query = "query_example"; // String | Search by key, label, or fingerprint - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - SSHKeyList result = apiInstance.findProjectSSHKeys(id, query, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SshKeysApi#findProjectSSHKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **query** | **String**| Search by key, label, or fingerprint | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**SSHKeyList**](SSHKeyList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findSSHKeyById** -> SSHKey findSSHKeyById(id, include) - -Retrieve a ssh key - -Returns a single ssh key if the user has access - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SshKeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SshKeysApi apiInstance = new SshKeysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | SSH Key UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - SSHKey result = apiInstance.findSSHKeyById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SshKeysApi#findSSHKeyById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| SSH Key UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**SSHKey**](SSHKey.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findSSHKeys** -> SSHKeyList findSSHKeys(search, include) - -Retrieve all ssh keys - -Returns a collection of the user’s ssh keys. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SshKeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SshKeysApi apiInstance = new SshKeysApi(defaultClient); - String search = "search_example"; // String | Search by key, label, or fingerprint - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - SSHKeyList result = apiInstance.findSSHKeys(search, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SshKeysApi#findSSHKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **search** | **String**| Search by key, label, or fingerprint | [optional] | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**SSHKeyList**](SSHKeyList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **updateSSHKey** -> SSHKey updateSSHKey(id, ssHKeyInput, include) - -Update the ssh key - -Updates the ssh key. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SshKeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SshKeysApi apiInstance = new SshKeysApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | SSH Key UUID - SSHKeyInput ssHKeyInput = new SSHKeyInput(); // SSHKeyInput | ssh key to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - SSHKey result = apiInstance.updateSSHKey(id, ssHKeyInput, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling SshKeysApi#updateSSHKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| SSH Key UUID | | -| **ssHKeyInput** | [**SSHKeyInput**](SSHKeyInput.md)| ssh key to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**SSHKey**](SSHKey.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Storage.md b/equinix-openapi-metal/docs/Storage.md deleted file mode 100644 index 10235a0e1..000000000 --- a/equinix-openapi-metal/docs/Storage.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Storage - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**disks** | [**List<Disk>**](Disk.md) | | [optional] | -|**raid** | [**List<Raid>**](Raid.md) | | [optional] | -|**filesystems** | [**List<Filesystem>**](Filesystem.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/SupportRequestApi.md b/equinix-openapi-metal/docs/SupportRequestApi.md deleted file mode 100644 index 542912a1b..000000000 --- a/equinix-openapi-metal/docs/SupportRequestApi.md +++ /dev/null @@ -1,81 +0,0 @@ -# SupportRequestApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**requestSuppert**](SupportRequestApi.md#requestSuppert) | **POST** /support-requests | Create a support ticket | - - - -# **requestSuppert** -> requestSuppert(supportRequestInput) - -Create a support ticket - -Support Ticket. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.SupportRequestApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - SupportRequestApi apiInstance = new SupportRequestApi(defaultClient); - SupportRequestInput supportRequestInput = new SupportRequestInput(); // SupportRequestInput | Support Request to create - try { - apiInstance.requestSuppert(supportRequestInput); - } catch (ApiException e) { - System.err.println("Exception when calling SupportRequestApi#requestSuppert"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **supportRequestInput** | [**SupportRequestInput**](SupportRequestInput.md)| Support Request to create | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/SupportRequestInput.md b/equinix-openapi-metal/docs/SupportRequestInput.md deleted file mode 100644 index 30ab0b705..000000000 --- a/equinix-openapi-metal/docs/SupportRequestInput.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# SupportRequestInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deviceId** | **String** | | [optional] | -|**message** | **String** | | | -|**priority** | [**PriorityEnum**](#PriorityEnum) | | [optional] | -|**projectId** | **String** | | [optional] | -|**subject** | **String** | | | - - - -## Enum: PriorityEnum - -| Name | Value | -|---- | -----| -| URGENT | "urgent" | -| HIGH | "high" | -| MEDIUM | "medium" | -| LOW | "low" | - - - diff --git a/equinix-openapi-metal/docs/TransferRequest.md b/equinix-openapi-metal/docs/TransferRequest.md deleted file mode 100644 index 4a36605f8..000000000 --- a/equinix-openapi-metal/docs/TransferRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# TransferRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**targetOrganization** | [**Href**](Href.md) | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/TransferRequestInput.md b/equinix-openapi-metal/docs/TransferRequestInput.md deleted file mode 100644 index 178c5991b..000000000 --- a/equinix-openapi-metal/docs/TransferRequestInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# TransferRequestInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**targetOrganizationId** | **UUID** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/TransferRequestList.md b/equinix-openapi-metal/docs/TransferRequestList.md deleted file mode 100644 index c8a5c57b1..000000000 --- a/equinix-openapi-metal/docs/TransferRequestList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# TransferRequestList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**transfers** | [**List<TransferRequest>**](TransferRequest.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/TransferRequestsApi.md b/equinix-openapi-metal/docs/TransferRequestsApi.md deleted file mode 100644 index 6562f66cf..000000000 --- a/equinix-openapi-metal/docs/TransferRequestsApi.md +++ /dev/null @@ -1,227 +0,0 @@ -# TransferRequestsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**acceptTransferRequest**](TransferRequestsApi.md#acceptTransferRequest) | **PUT** /transfers/{id} | Accept a transfer request | -| [**declineTransferRequest**](TransferRequestsApi.md#declineTransferRequest) | **DELETE** /transfers/{id} | Decline a transfer request | -| [**findTransferRequestById**](TransferRequestsApi.md#findTransferRequestById) | **GET** /transfers/{id} | View a transfer request | - - - -# **acceptTransferRequest** -> acceptTransferRequest(id) - -Accept a transfer request - -Accept a transfer request. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.TransferRequestsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - TransferRequestsApi apiInstance = new TransferRequestsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Transfer request UUID - try { - apiInstance.acceptTransferRequest(id); - } catch (ApiException e) { - System.err.println("Exception when calling TransferRequestsApi#acceptTransferRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Transfer request UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **declineTransferRequest** -> declineTransferRequest(id) - -Decline a transfer request - -Decline a transfer request. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.TransferRequestsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - TransferRequestsApi apiInstance = new TransferRequestsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Transfer request UUID - try { - apiInstance.declineTransferRequest(id); - } catch (ApiException e) { - System.err.println("Exception when calling TransferRequestsApi#declineTransferRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Transfer request UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findTransferRequestById** -> TransferRequest findTransferRequestById(id, include) - -View a transfer request - -Returns a single transfer request. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.TransferRequestsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - TransferRequestsApi apiInstance = new TransferRequestsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Transfer request UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - TransferRequest result = apiInstance.findTransferRequestById(id, include); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TransferRequestsApi#findTransferRequestById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Transfer request UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -[**TransferRequest**](TransferRequest.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/TwoFactorAuthApi.md b/equinix-openapi-metal/docs/TwoFactorAuthApi.md deleted file mode 100644 index df43e535a..000000000 --- a/equinix-openapi-metal/docs/TwoFactorAuthApi.md +++ /dev/null @@ -1,274 +0,0 @@ -# TwoFactorAuthApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**disableTfaApp**](TwoFactorAuthApi.md#disableTfaApp) | **DELETE** /user/otp/app | Disable two factor authentication | -| [**disableTfaSms**](TwoFactorAuthApi.md#disableTfaSms) | **DELETE** /user/otp/sms | Disable two factor authentication | -| [**enableTfaApp**](TwoFactorAuthApi.md#enableTfaApp) | **POST** /user/otp/app | Enable two factor auth using app | -| [**enableTfaSms**](TwoFactorAuthApi.md#enableTfaSms) | **POST** /user/otp/sms | Enable two factor auth using sms | - - - -# **disableTfaApp** -> disableTfaApp() - -Disable two factor authentication - -Disables two factor authentication. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.TwoFactorAuthApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - TwoFactorAuthApi apiInstance = new TwoFactorAuthApi(defaultClient); - try { - apiInstance.disableTfaApp(); - } catch (ApiException e) { - System.err.println("Exception when calling TwoFactorAuthApi#disableTfaApp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **disableTfaSms** -> disableTfaSms() - -Disable two factor authentication - -Disables two factor authentication. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.TwoFactorAuthApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - TwoFactorAuthApi apiInstance = new TwoFactorAuthApi(defaultClient); - try { - apiInstance.disableTfaSms(); - } catch (ApiException e) { - System.err.println("Exception when calling TwoFactorAuthApi#disableTfaSms"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **enableTfaApp** -> enableTfaApp() - -Enable two factor auth using app - -Enables two factor authentication using authenticator app. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.TwoFactorAuthApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - TwoFactorAuthApi apiInstance = new TwoFactorAuthApi(defaultClient); - try { - apiInstance.enableTfaApp(); - } catch (ApiException e) { - System.err.println("Exception when calling TwoFactorAuthApi#enableTfaApp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **enableTfaSms** -> enableTfaSms() - -Enable two factor auth using sms - -Enables two factor authentication with sms. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.TwoFactorAuthApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - TwoFactorAuthApi apiInstance = new TwoFactorAuthApi(defaultClient); - try { - apiInstance.enableTfaSms(); - } catch (ApiException e) { - System.err.println("Exception when calling TwoFactorAuthApi#enableTfaSms"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - diff --git a/equinix-openapi-metal/docs/UpdateEmailInput.md b/equinix-openapi-metal/docs/UpdateEmailInput.md deleted file mode 100644 index 7a30f5161..000000000 --- a/equinix-openapi-metal/docs/UpdateEmailInput.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# UpdateEmailInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_default** | **Boolean** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/UsagesApi.md b/equinix-openapi-metal/docs/UsagesApi.md deleted file mode 100644 index 49b83ad9c..000000000 --- a/equinix-openapi-metal/docs/UsagesApi.md +++ /dev/null @@ -1,160 +0,0 @@ -# UsagesApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**findDeviceUsages**](UsagesApi.md#findDeviceUsages) | **GET** /devices/{id}/usages | Retrieve all usages for device | -| [**findProjectUsage**](UsagesApi.md#findProjectUsage) | **GET** /projects/{id}/usages | Retrieve all usages for project | - - - -# **findDeviceUsages** -> DeviceUsageList findDeviceUsages(id, createdAfter, createdBefore) - -Retrieve all usages for device - -Returns all usages for a device. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsagesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsagesApi apiInstance = new UsagesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Device UUID - String createdAfter = "createdAfter_example"; // String | Filter usages created after this date - String createdBefore = "createdBefore_example"; // String | Filter usages created before this date - try { - DeviceUsageList result = apiInstance.findDeviceUsages(id, createdAfter, createdBefore); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsagesApi#findDeviceUsages"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Device UUID | | -| **createdAfter** | **String**| Filter usages created after this date | [optional] | -| **createdBefore** | **String**| Filter usages created before this date | [optional] | - -### Return type - -[**DeviceUsageList**](DeviceUsageList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - - -# **findProjectUsage** -> ProjectUsageList findProjectUsage(id, createdAfter, createdBefore) - -Retrieve all usages for project - -Returns all usages for a project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsagesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsagesApi apiInstance = new UsagesApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - String createdAfter = "createdAfter_example"; // String | Filter usages created after this date - String createdBefore = "createdBefore_example"; // String | Filter usages created before this date - try { - ProjectUsageList result = apiInstance.findProjectUsage(id, createdAfter, createdBefore); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsagesApi#findProjectUsage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **createdAfter** | **String**| Filter usages created after this date | [optional] | -| **createdBefore** | **String**| Filter usages created before this date | [optional] | - -### Return type - -[**ProjectUsageList**](ProjectUsageList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **404** | not found | - | - diff --git a/equinix-openapi-metal/docs/User.md b/equinix-openapi-metal/docs/User.md deleted file mode 100644 index 4299ad94e..000000000 --- a/equinix-openapi-metal/docs/User.md +++ /dev/null @@ -1,34 +0,0 @@ - - -# User - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**avatarThumbUrl** | **String** | | [optional] | -|**avatarUrl** | **String** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**defaultOrganizationId** | **UUID** | | [optional] | -|**defaultProjectId** | **UUID** | | [optional] | -|**email** | **String** | | [optional] | -|**emails** | [**List<Href>**](Href.md) | | [optional] | -|**firstName** | **String** | | [optional] | -|**fraudScore** | **String** | | [optional] | -|**fullName** | **String** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**lastLoginAt** | **OffsetDateTime** | | [optional] | -|**lastName** | **String** | | [optional] | -|**maxOrganizations** | **Integer** | | [optional] | -|**maxProjects** | **Integer** | | [optional] | -|**phoneNumber** | **String** | | [optional] | -|**shortId** | **String** | | [optional] | -|**timezone** | **String** | | [optional] | -|**twoFactorAuth** | **String** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/UserCreateInput.md b/equinix-openapi-metal/docs/UserCreateInput.md deleted file mode 100644 index b9d87868e..000000000 --- a/equinix-openapi-metal/docs/UserCreateInput.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# UserCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**avatar** | **File** | | [optional] | -|**companyName** | **String** | | [optional] | -|**companyUrl** | **String** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**emails** | [**List<EmailInput>**](EmailInput.md) | | | -|**firstName** | **String** | | | -|**lastName** | **String** | | | -|**level** | **String** | | [optional] | -|**password** | **String** | | [optional] | -|**phoneNumber** | **String** | | [optional] | -|**socialAccounts** | **Object** | | [optional] | -|**timezone** | **String** | | [optional] | -|**title** | **String** | | [optional] | -|**twoFactorAuth** | **String** | | [optional] | -|**verifiedAt** | **OffsetDateTime** | | [optional] | -|**invitationId** | **UUID** | | [optional] | -|**nonce** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/UserLimited.md b/equinix-openapi-metal/docs/UserLimited.md deleted file mode 100644 index 8ebda60ca..000000000 --- a/equinix-openapi-metal/docs/UserLimited.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# UserLimited - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**avatarThumbUrl** | **String** | Avatar thumbnail URL of the User | [optional] | -|**avatarUrl** | **String** | Avatar URL of the User | [optional] | -|**fullName** | **String** | Full name of the User | [optional] | -|**href** | **String** | API URL uniquely representing the User | [optional] | -|**id** | **UUID** | ID of the User | | - - - diff --git a/equinix-openapi-metal/docs/UserList.md b/equinix-openapi-metal/docs/UserList.md deleted file mode 100644 index 3e8638a50..000000000 --- a/equinix-openapi-metal/docs/UserList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# UserList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**meta** | [**Meta**](Meta.md) | | [optional] | -|**users** | [**List<User>**](User.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/UserLite.md b/equinix-openapi-metal/docs/UserLite.md deleted file mode 100644 index 12b73cc6e..000000000 --- a/equinix-openapi-metal/docs/UserLite.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# UserLite - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**avatarThumbUrl** | **String** | Avatar thumbnail URL of the User | [optional] | -|**createdAt** | **OffsetDateTime** | When the user was created | [optional] | -|**email** | **String** | Primary email address of the User | [optional] | -|**firstName** | **String** | First name of the User | [optional] | -|**fullName** | **String** | Full name of the User | [optional] | -|**href** | **String** | API URL uniquely representing the User | [optional] | -|**id** | **UUID** | ID of the User | | -|**lastName** | **String** | Last name of the User | [optional] | -|**shortId** | **String** | Short ID of the User | | -|**updatedAt** | **OffsetDateTime** | When the user details were last updated | [optional] | - - - diff --git a/equinix-openapi-metal/docs/UserUpdateInput.md b/equinix-openapi-metal/docs/UserUpdateInput.md deleted file mode 100644 index 44123cff8..000000000 --- a/equinix-openapi-metal/docs/UserUpdateInput.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# UserUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customdata** | **Object** | | [optional] | -|**firstName** | **String** | | [optional] | -|**lastName** | **String** | | [optional] | -|**password** | **String** | | [optional] | -|**phoneNumber** | **String** | | [optional] | -|**timezone** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/UserVerificationTokensApi.md b/equinix-openapi-metal/docs/UserVerificationTokensApi.md deleted file mode 100644 index 319cdd9f0..000000000 --- a/equinix-openapi-metal/docs/UserVerificationTokensApi.md +++ /dev/null @@ -1,154 +0,0 @@ -# UserVerificationTokensApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**consumeVerificationRequest**](UserVerificationTokensApi.md#consumeVerificationRequest) | **PUT** /verify-email | Verify a user using an email verification token | -| [**createValidationRequest**](UserVerificationTokensApi.md#createValidationRequest) | **POST** /verify-email | Create an email verification request | - - - -# **consumeVerificationRequest** -> consumeVerificationRequest(verifyEmail, include) - -Verify a user using an email verification token - -Consumes an email verification token and verifies the user associated with it. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UserVerificationTokensApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UserVerificationTokensApi apiInstance = new UserVerificationTokensApi(defaultClient); - VerifyEmail verifyEmail = new VerifyEmail(); // VerifyEmail | Email to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - apiInstance.consumeVerificationRequest(verifyEmail, include); - } catch (ApiException e) { - System.err.println("Exception when calling UserVerificationTokensApi#consumeVerificationRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **verifyEmail** | [**VerifyEmail**](VerifyEmail.md)| Email to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **createValidationRequest** -> createValidationRequest(login, include) - -Create an email verification request - -Creates an email verification request - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UserVerificationTokensApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UserVerificationTokensApi apiInstance = new UserVerificationTokensApi(defaultClient); - String login = "login_example"; // String | Email for verification request - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - try { - apiInstance.createValidationRequest(login, include); - } catch (ApiException e) { - System.err.println("Exception when calling UserVerificationTokensApi#createValidationRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **login** | **String**| Email for verification request | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Userdata.md b/equinix-openapi-metal/docs/Userdata.md deleted file mode 100644 index 46aa8e745..000000000 --- a/equinix-openapi-metal/docs/Userdata.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Userdata - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**userdata** | **String** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/UserdataApi.md b/equinix-openapi-metal/docs/UserdataApi.md deleted file mode 100644 index bba8c5566..000000000 --- a/equinix-openapi-metal/docs/UserdataApi.md +++ /dev/null @@ -1,79 +0,0 @@ -# UserdataApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**validateUserdata**](UserdataApi.md#validateUserdata) | **POST** /userdata/validate | Validate user data | - - - -# **validateUserdata** -> validateUserdata(userdata) - -Validate user data - -Validates user data (Userdata) - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UserdataApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UserdataApi apiInstance = new UserdataApi(defaultClient); - String userdata = "userdata_example"; // String | Userdata to validate - try { - apiInstance.validateUserdata(userdata); - } catch (ApiException e) { - System.err.println("Exception when calling UserdataApi#validateUserdata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userdata** | **String**| Userdata to validate | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/UsersApi.md b/equinix-openapi-metal/docs/UsersApi.md deleted file mode 100644 index 994342c9f..000000000 --- a/equinix-openapi-metal/docs/UsersApi.md +++ /dev/null @@ -1,536 +0,0 @@ -# UsersApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createUser**](UsersApi.md#createUser) | **POST** /users | Create a user | -| [**findCurrentUser**](UsersApi.md#findCurrentUser) | **GET** /user | Retrieve the current user | -| [**findInvitations**](UsersApi.md#findInvitations) | **GET** /invitations | Retrieve current user invitations | -| [**findUserById**](UsersApi.md#findUserById) | **GET** /users/{id} | Retrieve a user | -| [**findUserCustomdata**](UsersApi.md#findUserCustomdata) | **GET** /users/{id}/customdata | Retrieve the custom metadata of a user | -| [**findUsers**](UsersApi.md#findUsers) | **GET** /users | Retrieve all users | -| [**updateCurrentUser**](UsersApi.md#updateCurrentUser) | **PUT** /user | Update the current user | - - - -# **createUser** -> User createUser(userCreateInput, include, exclude) - -Create a user - -Creates a user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsersApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsersApi apiInstance = new UsersApi(defaultClient); - UserCreateInput userCreateInput = new UserCreateInput(); // UserCreateInput | User to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - User result = apiInstance.createUser(userCreateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#createUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userCreateInput** | [**UserCreateInput**](UserCreateInput.md)| User to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**User**](User.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - - -# **findCurrentUser** -> User findCurrentUser(include, exclude) - -Retrieve the current user - -Returns the user object for the currently logged-in user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsersApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsersApi apiInstance = new UsersApi(defaultClient); - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - User result = apiInstance.findCurrentUser(include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#findCurrentUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**User**](User.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **findInvitations** -> InvitationList findInvitations(include, page, perPage) - -Retrieve current user invitations - -Returns all invitations in current user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsersApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsersApi apiInstance = new UsersApi(defaultClient); - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - InvitationList result = apiInstance.findInvitations(include, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#findInvitations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**InvitationList**](InvitationList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findUserById** -> User findUserById(id, include, exclude) - -Retrieve a user - -Returns a single user if the user has access - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsersApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsersApi apiInstance = new UsersApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | User UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - User result = apiInstance.findUserById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#findUserById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| User UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**User**](User.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findUserCustomdata** -> findUserCustomdata(id) - -Retrieve the custom metadata of a user - -Provides the custom metadata stored for this user in json format - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsersApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsersApi apiInstance = new UsersApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | User UUID - try { - apiInstance.findUserCustomdata(id); - } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#findUserCustomdata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| User UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findUsers** -> UserList findUsers(include, exclude, page, perPage) - -Retrieve all users - -Returns a list of users that the are accessible to the current user (all users in the current user’s projects, essentially). - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsersApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsersApi apiInstance = new UsersApi(defaultClient); - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - Integer page = 1; // Integer | Page to return - Integer perPage = 10; // Integer | Items returned per page - try { - UserList result = apiInstance.findUsers(include, exclude, page, perPage); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#findUsers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **page** | **Integer**| Page to return | [optional] [default to 1] | -| **perPage** | **Integer**| Items returned per page | [optional] [default to 10] | - -### Return type - -[**UserList**](UserList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | - - -# **updateCurrentUser** -> User updateCurrentUser(userUpdateInput, include, exclude) - -Update the current user - -Updates the currently logged-in user. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.UsersApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - UsersApi apiInstance = new UsersApi(defaultClient); - UserUpdateInput userUpdateInput = new UserUpdateInput(); // UserUpdateInput | User to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - User result = apiInstance.updateCurrentUser(userUpdateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#updateCurrentUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **userUpdateInput** | [**UserUpdateInput**](UserUpdateInput.md)| User to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**User**](User.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/VerifyEmail.md b/equinix-openapi-metal/docs/VerifyEmail.md deleted file mode 100644 index 93342a23d..000000000 --- a/equinix-openapi-metal/docs/VerifyEmail.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# VerifyEmail - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**userToken** | **String** | User verification token | | - - - diff --git a/equinix-openapi-metal/docs/VirtualCircuit.md b/equinix-openapi-metal/docs/VirtualCircuit.md deleted file mode 100644 index e040ef32c..000000000 --- a/equinix-openapi-metal/docs/VirtualCircuit.md +++ /dev/null @@ -1,52 +0,0 @@ - - -# VirtualCircuit - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bill** | **Boolean** | True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. | [optional] | -|**description** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | -|**nniVlan** | **Integer** | | [optional] | -|**port** | [**Href**](Href.md) | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**speed** | **Integer** | integer representing bps speed | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The status changes of a VRF virtual circuit are generally the same as Virtual Circuits that aren't in a VRF. However, for VRF Virtual Circuits on Fabric VCs, the status will change to 'waiting_on_peering_details' once the Fabric service token associated with the virtual circuit has been redeemed on Fabric, and Metal has found the associated Fabric connection. At this point, users can update the subnet, MD5 password, customer IP and/or metal IP accordingly. For VRF Virtual Circuits on Dedicated Ports, we require all peering details to be set on creation of a VRF Virtual Circuit. The status will change to `changing_peering_details` whenever an active VRF Virtual Circuit has any of its peering details updated. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | **VrfVirtualCircuitType** | | [optional] | -|**virtualNetwork** | [**Href**](Href.md) | | [optional] | -|**vnid** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**customerIp** | **String** | An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. | [optional] | -|**md5** | **String** | The MD5 password for the BGP peering in plaintext (not a checksum). | [optional] | -|**metalIp** | **String** | An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. | [optional] | -|**peerAsn** | **Integer** | The peer ASN that will be used with the VRF on the Virtual Circuit. | [optional] | -|**subnet** | **String** | The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| PENDING | "pending" | -| WAITING_ON_PEERING_DETAILS | "waiting_on_peering_details" | -| ACTIVATING | "activating" | -| CHANGING_PEERING_DETAILS | "changing_peering_details" | -| DEACTIVATING | "deactivating" | -| DELETING | "deleting" | -| ACTIVE | "active" | -| EXPIRED | "expired" | -| ACTIVATION_FAILED | "activation_failed" | -| CHANGING_PEERING_DETAILS_FAILED | "changing_peering_details_failed" | -| DEACTIVATION_FAILED | "deactivation_failed" | -| DELETE_FAILED | "delete_failed" | - - - diff --git a/equinix-openapi-metal/docs/VirtualCircuitCreateInput.md b/equinix-openapi-metal/docs/VirtualCircuitCreateInput.md deleted file mode 100644 index e32b1681b..000000000 --- a/equinix-openapi-metal/docs/VirtualCircuitCreateInput.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# VirtualCircuitCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**nniVlan** | **Integer** | | | -|**projectId** | **UUID** | | | -|**speed** | **Integer** | speed can be passed as integer number representing bps speed or string (e.g. '52m' or '100g' or '4 gbps') | [optional] | -|**tags** | **List<String>** | | [optional] | -|**vnid** | **UUID** | A Virtual Network record UUID or the VNID of a Metro Virtual Network in your project (sent as integer). | [optional] | -|**customerIp** | **String** | An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. | [optional] | -|**md5** | **String** | The plaintext BGP peering password shared by neighbors as an MD5 checksum: * must be 10-20 characters long * may not include punctuation * must be a combination of numbers and letters * must contain at least one lowercase, uppercase, and digit character | [optional] | -|**metalIp** | **String** | An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. | [optional] | -|**peerAsn** | **Integer** | The peer ASN that will be used with the VRF on the Virtual Circuit. | | -|**subnet** | **String** | The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. The subnet specified must be contained within an already-defined IP Range for the VRF. | | -|**vrf** | **UUID** | The UUID of the VRF that will be associated with the Virtual Circuit. | | - - - diff --git a/equinix-openapi-metal/docs/VirtualCircuitList.md b/equinix-openapi-metal/docs/VirtualCircuitList.md deleted file mode 100644 index bc2ddd570..000000000 --- a/equinix-openapi-metal/docs/VirtualCircuitList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# VirtualCircuitList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**virtualCircuits** | [**List<VirtualCircuit>**](VirtualCircuit.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VirtualCircuitUpdateInput.md b/equinix-openapi-metal/docs/VirtualCircuitUpdateInput.md deleted file mode 100644 index 77bfc3405..000000000 --- a/equinix-openapi-metal/docs/VirtualCircuitUpdateInput.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# VirtualCircuitUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**speed** | **String** | Speed can be changed only if it is an interconnection on a Dedicated Port | [optional] | -|**tags** | **List<String>** | | [optional] | -|**vnid** | **String** | A Virtual Network record UUID or the VNID of a Metro Virtual Network in your project. | [optional] | -|**customerIp** | **String** | An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. | [optional] | -|**md5** | **String** | The plaintext BGP peering password shared by neighbors as an MD5 checksum: * must be 10-20 characters long * may not include punctuation * must be a combination of numbers and letters * must contain at least one lowercase, uppercase, and digit character | [optional] | -|**metalIp** | **String** | An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. | [optional] | -|**peerAsn** | **Integer** | The peer ASN that will be used with the VRF on the Virtual Circuit. | [optional] | -|**subnet** | **String** | The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VirtualNetwork.md b/equinix-openapi-metal/docs/VirtualNetwork.md deleted file mode 100644 index 7750e3893..000000000 --- a/equinix-openapi-metal/docs/VirtualNetwork.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# VirtualNetwork - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**assignedTo** | [**Href**](Href.md) | | [optional] | -|**assignedToVirtualCircuit** | **Boolean** | True if the virtual network is attached to a virtual circuit. False if not. | [optional] | -|**description** | **String** | | [optional] | -|**facility** | [**Href**](Href.md) | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**instances** | [**List<Href>**](Href.md) | A list of instances with ports currently associated to this Virtual Network. | [optional] | -|**metalGateways** | [**List<MetalGatewayLite>**](MetalGatewayLite.md) | A list of metal gateways currently associated to this Virtual Network. | [optional] | -|**metro** | [**Href**](Href.md) | | [optional] | -|**metroCode** | **String** | The Metro code of the metro in which this Virtual Network is defined. | [optional] | -|**vxlan** | **Integer** | | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VirtualNetworkCreateInput.md b/equinix-openapi-metal/docs/VirtualNetworkCreateInput.md deleted file mode 100644 index b66d83a1e..000000000 --- a/equinix-openapi-metal/docs/VirtualNetworkCreateInput.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# VirtualNetworkCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**facility** | **String** | The UUID (or facility code) for the Facility in which to create this Virtual network. | [optional] | -|**metro** | **String** | The UUID (or metro code) for the Metro in which to create this Virtual Network. | [optional] | -|**vxlan** | **Integer** | VLAN ID between 2-3999. Must be unique for the project within the Metro in which this Virtual Network is being created. If no value is specified, the next-available VLAN ID in the range 1000-1999 will be automatically selected. | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VirtualNetworkList.md b/equinix-openapi-metal/docs/VirtualNetworkList.md deleted file mode 100644 index 29e66b8cc..000000000 --- a/equinix-openapi-metal/docs/VirtualNetworkList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# VirtualNetworkList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**virtualNetworks** | [**List<VirtualNetwork>**](VirtualNetwork.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VlanFabricVcCreateInput.md b/equinix-openapi-metal/docs/VlanFabricVcCreateInput.md deleted file mode 100644 index 616396d6c..000000000 --- a/equinix-openapi-metal/docs/VlanFabricVcCreateInput.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# VlanFabricVcCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**contactEmail** | **String** | The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. | [optional] | -|**description** | **String** | | [optional] | -|**metro** | **String** | A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. | | -|**name** | **String** | | | -|**project** | **String** | | [optional] | -|**redundancy** | **String** | Either 'primary' or 'redundant'. | | -|**serviceTokenType** | [**ServiceTokenTypeEnum**](#ServiceTokenTypeEnum) | Either 'a_side' or 'z_side'. Setting this field to 'a_side' will create an interconnection with Fabric VCs (Metal Billed). Setting this field to 'z_side' will create an interconnection with Fabric VCs (Fabric Billed). This is required when the 'type' is 'shared', but this is not applicable when the 'type' is 'dedicated'. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. | | -|**speed** | **Integer** | A interconnection speed, in bps, mbps, or gbps. For Fabric VCs, this represents the maximum speed of the interconnection. For Fabric VCs (Metal Billed), this can only be one of the following: ''50mbps'', ''200mbps'', ''500mbps'', ''1gbps'', ''2gbps'', ''5gbps'' or ''10gbps'', and is required for creation. For Fabric VCs (Fabric Billed), this field will always default to ''10gbps'' even if it is not provided. For example, ''500000000'', ''50m'', or' ''500mbps'' will all work as valid inputs. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | When requesting for a Fabric VC, the value of this field should be 'shared'. | | -|**vlans** | **List<Integer>** | A list of one or two metro-based VLANs that will be set on the virtual circuits of primary and/or secondary (if redundant) interconnections respectively when creating Fabric VCs. VLANs can also be set after the interconnection is created, but are required to fully activate the virtual circuits. | [optional] | - - - -## Enum: ServiceTokenTypeEnum - -| Name | Value | -|---- | -----| -| A_SIDE | "a_side" | -| Z_SIDE | "z_side" | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| SHARED | "shared" | - - - diff --git a/equinix-openapi-metal/docs/VlanVirtualCircuit.md b/equinix-openapi-metal/docs/VlanVirtualCircuit.md deleted file mode 100644 index 743271d06..000000000 --- a/equinix-openapi-metal/docs/VlanVirtualCircuit.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# VlanVirtualCircuit - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bill** | **Boolean** | True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. | [optional] | -|**description** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | -|**nniVlan** | **Integer** | | [optional] | -|**port** | [**Href**](Href.md) | | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**speed** | **Integer** | For Virtual Circuits on shared and dedicated connections, this speed should match the one set on their Interconnection Ports. For Virtual Circuits on Fabric VCs (both Metal and Fabric Billed) that have found their corresponding Fabric connection, this is the actual speed of the interconnection that was configured when setting up the interconnection on the Fabric Portal. Details on Fabric VCs are included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The status of a Virtual Circuit is always 'pending' on creation. The status can turn to 'Waiting on Customer VLAN' if a Metro VLAN was not set yet on the Virtual Circuit and is the last step needed for full activation. For Dedicated interconnections, as long as the Dedicated Port has been associated to the Virtual Circuit and a NNI VNID has been set, it will turn to 'waiting_on_customer_vlan'. For Fabric VCs, it will only change to 'waiting_on_customer_vlan' once the corresponding Fabric connection has been found on the Fabric side. If the Fabric service token associated with the Virtual Circuit hasn't been redeemed on Fabric within the expiry time, it will change to an `expired` status. Once a Metro VLAN is set on the Virtual Circuit (which for Fabric VCs, can be set on creation of a Fabric VC) and the necessary set up is done, it will turn into 'Activating' status as it tries to activate the Virtual Circuit. Once the Virtual Circuit fully activates and is configured on the switch, it will turn to staus 'active'. For Fabric VCs (Metal Billed), we will start billing the moment the status of the Virtual Circuit turns to 'active'. If there are any changes to the VLAN after the Virtual Circuit is in an 'active' status, the status will show 'changing_vlan' if a new VLAN has been provided, or 'deactivating' if we are removing the VLAN. When a deletion request is issued for the Virtual Circuit, it will move to a 'deleting' status, and we will immediately unconfigure the switch for the Virtual Circuit and issue a deletion on any associated Fabric connections. Any associated Metro VLANs on the virtual circuit will also be unassociated after the switch has been successfully unconfigured. If there are any associated Fabric connections, we will only fully delete the Virtual Circuit once we have checked that the Fabric connection was fully deprovisioned on Fabric. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | **VlanVirtualCircuitType** | | [optional] | -|**virtualNetwork** | [**Href**](Href.md) | | [optional] | -|**vnid** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| PENDING | "pending" | -| WAITING_ON_CUSTOMER_VLAN | "waiting_on_customer_vlan" | -| ACTIVATING | "activating" | -| CHANGING_VLAN | "changing_vlan" | -| DEACTIVATING | "deactivating" | -| DELETING | "deleting" | -| ACTIVE | "active" | -| EXPIRED | "expired" | -| ACTIVATION_FAILED | "activation_failed" | -| CHANGING_VLAN_FAILED | "changing_vlan_failed" | -| DEACTIVATION_FAILED | "deactivation_failed" | -| DELETE_FAILED | "delete_failed" | - - - diff --git a/equinix-openapi-metal/docs/VlanVirtualCircuitCreateInput.md b/equinix-openapi-metal/docs/VlanVirtualCircuitCreateInput.md deleted file mode 100644 index ef7f74e83..000000000 --- a/equinix-openapi-metal/docs/VlanVirtualCircuitCreateInput.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VlanVirtualCircuitCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**nniVlan** | **Integer** | | [optional] | -|**projectId** | **UUID** | | | -|**speed** | **Integer** | speed can be passed as integer number representing bps speed or string (e.g. '52m' or '100g' or '4 gbps') | [optional] | -|**tags** | **List<String>** | | [optional] | -|**vnid** | **UUID** | A Virtual Network record UUID or the VNID of a Metro Virtual Network in your project (sent as integer). | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VlanVirtualCircuitType.md b/equinix-openapi-metal/docs/VlanVirtualCircuitType.md deleted file mode 100644 index e0c88d27c..000000000 --- a/equinix-openapi-metal/docs/VlanVirtualCircuitType.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# VlanVirtualCircuitType - -## Enum - - -* `VLAN` (value: `"vlan"`) - - - diff --git a/equinix-openapi-metal/docs/VlanVirtualCircuitUpdateInput.md b/equinix-openapi-metal/docs/VlanVirtualCircuitUpdateInput.md deleted file mode 100644 index 580e95a46..000000000 --- a/equinix-openapi-metal/docs/VlanVirtualCircuitUpdateInput.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# VlanVirtualCircuitUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**description** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**speed** | **String** | Speed can be changed only if it is an interconnection on a Dedicated Port | [optional] | -|**tags** | **List<String>** | | [optional] | -|**vnid** | **String** | A Virtual Network record UUID or the VNID of a Metro Virtual Network in your project. | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VlansApi.md b/equinix-openapi-metal/docs/VlansApi.md deleted file mode 100644 index 23b63856d..000000000 --- a/equinix-openapi-metal/docs/VlansApi.md +++ /dev/null @@ -1,325 +0,0 @@ -# VlansApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createVirtualNetwork**](VlansApi.md#createVirtualNetwork) | **POST** /projects/{id}/virtual-networks | Create a virtual network | -| [**deleteVirtualNetwork**](VlansApi.md#deleteVirtualNetwork) | **DELETE** /virtual-networks/{id} | Delete a virtual network | -| [**findVirtualNetworks**](VlansApi.md#findVirtualNetworks) | **GET** /projects/{id}/virtual-networks | Retrieve all virtual networks | -| [**getVirtualNetwork**](VlansApi.md#getVirtualNetwork) | **GET** /virtual-networks/{id} | Get a virtual network | - - - -# **createVirtualNetwork** -> VirtualNetwork createVirtualNetwork(id, virtualNetworkCreateInput, include, exclude) - -Create a virtual network - -Creates an virtual network. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VlansApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VlansApi apiInstance = new VlansApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - VirtualNetworkCreateInput virtualNetworkCreateInput = new VirtualNetworkCreateInput(); // VirtualNetworkCreateInput | Virtual Network to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VirtualNetwork result = apiInstance.createVirtualNetwork(id, virtualNetworkCreateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VlansApi#createVirtualNetwork"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **virtualNetworkCreateInput** | [**VirtualNetworkCreateInput**](VirtualNetworkCreateInput.md)| Virtual Network to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VirtualNetwork**](VirtualNetwork.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **deleteVirtualNetwork** -> VirtualNetwork deleteVirtualNetwork(id, include, exclude) - -Delete a virtual network - -Deletes a virtual network. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VlansApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VlansApi apiInstance = new VlansApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Virtual Network UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VirtualNetwork result = apiInstance.deleteVirtualNetwork(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VlansApi#deleteVirtualNetwork"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Virtual Network UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VirtualNetwork**](VirtualNetwork.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **findVirtualNetworks** -> VirtualNetworkList findVirtualNetworks(id, include, exclude, facility, metro) - -Retrieve all virtual networks - -Provides a list of virtual networks for a single project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VlansApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VlansApi apiInstance = new VlansApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - String facility = "facility_example"; // String | Filter by Facility ID (uuid) or Facility Code - String metro = "metro_example"; // String | Filter by Metro ID (uuid) or Metro Code - try { - VirtualNetworkList result = apiInstance.findVirtualNetworks(id, include, exclude, facility, metro); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VlansApi#findVirtualNetworks"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **facility** | **String**| Filter by Facility ID (uuid) or Facility Code | [optional] | -| **metro** | **String**| Filter by Metro ID (uuid) or Metro Code | [optional] | - -### Return type - -[**VirtualNetworkList**](VirtualNetworkList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **getVirtualNetwork** -> VirtualNetwork getVirtualNetwork(id, include, exclude) - -Get a virtual network - -Get a virtual network. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VlansApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VlansApi apiInstance = new VlansApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Virtual Network UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VirtualNetwork result = apiInstance.getVirtualNetwork(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VlansApi#getVirtualNetwork"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Virtual Network UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VirtualNetwork**](VirtualNetwork.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - diff --git a/equinix-openapi-metal/docs/Vrf.md b/equinix-openapi-metal/docs/Vrf.md deleted file mode 100644 index c99b71734..000000000 --- a/equinix-openapi-metal/docs/Vrf.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# Vrf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **UUID** | | [optional] | -|**name** | **String** | | [optional] | -|**description** | **String** | Optional field that can be set to describe the VRF | [optional] | -|**bill** | **Boolean** | True if the VRF is being billed. Usage will start when the first VRF Virtual Circuit is active, and will only stop when the VRF has been deleted. | [optional] | -|**bgpDynamicNeighborsEnabled** | **Boolean** | Toggle to enable the dynamic bgp neighbors feature on the VRF | [optional] | -|**bgpDynamicNeighborsExportRouteMap** | **Boolean** | Toggle to export the VRF route-map to the dynamic bgp neighbors | [optional] | -|**bgpDynamicNeighborsBfdEnabled** | **Boolean** | Toggle BFD on dynamic bgp neighbors sessions | [optional] | -|**localAsn** | **Integer** | A 4-byte ASN associated with the VRF. | [optional] | -|**virtualCircuits** | [**List<VrfVirtualCircuit>**](VrfVirtualCircuit.md) | Virtual circuits that are in the VRF | [optional] | -|**ipRanges** | **List<String>** | A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"]. | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**metro** | [**Metro**](Metro.md) | | [optional] | -|**createdBy** | [**User**](User.md) | | [optional] | -|**href** | **String** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfCreateInput.md b/equinix-openapi-metal/docs/VrfCreateInput.md deleted file mode 100644 index c125609c1..000000000 --- a/equinix-openapi-metal/docs/VrfCreateInput.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# VrfCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpDynamicNeighborsEnabled** | **Boolean** | Toggle to enable the dynamic bgp neighbors feature on the VRF | [optional] | -|**bgpDynamicNeighborsExportRouteMap** | **Boolean** | Toggle to export the VRF route-map to the dynamic bgp neighbors | [optional] | -|**bgpDynamicNeighborsBfdEnabled** | **Boolean** | Toggle BFD on dynamic bgp neighbors sessions | [optional] | -|**description** | **String** | | [optional] | -|**ipRanges** | **List<String>** | A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64. A VRF\\'s IP ranges must be defined in order to create VRF IP Reservations, which can then be used for Metal Gateways or Virtual Circuits. | [optional] | -|**localAsn** | **Integer** | | [optional] | -|**metro** | **String** | The UUID (or metro code) for the Metro in which to create this VRF. | | -|**name** | **String** | | | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfFabricVcCreateInput.md b/equinix-openapi-metal/docs/VrfFabricVcCreateInput.md deleted file mode 100644 index 1633a38c9..000000000 --- a/equinix-openapi-metal/docs/VrfFabricVcCreateInput.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# VrfFabricVcCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**contactEmail** | **String** | The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. | [optional] | -|**description** | **String** | | [optional] | -|**metro** | **String** | A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. | | -|**name** | **String** | | | -|**project** | **String** | | [optional] | -|**redundancy** | **String** | Either 'primary' or 'redundant'. | | -|**serviceTokenType** | [**ServiceTokenTypeEnum**](#ServiceTokenTypeEnum) | Either 'a_side' or 'z_side'. Setting this field to 'a_side' will create an interconnection with Fabric VCs (Metal Billed). Setting this field to 'z_side' will create an interconnection with Fabric VCs (Fabric Billed). This is required when the 'type' is 'shared', but this is not applicable when the 'type' is 'dedicated'. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. | | -|**speed** | **Integer** | A interconnection speed, in bps, mbps, or gbps. For Fabric VCs, this represents the maximum speed of the interconnection. For Fabric VCs (Metal Billed), this can only be one of the following: ''50mbps'', ''200mbps'', ''500mbps'', ''1gbps'', ''2gbps'', ''5gbps'' or ''10gbps'', and is required for creation. For Fabric VCs (Fabric Billed), this field will always default to ''10gbps'' even if it is not provided. For example, ''500000000'', ''50m'', or' ''500mbps'' will all work as valid inputs. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | When requesting for a Fabric VC, the value of this field should be 'shared'. | | -|**vrfs** | **List<UUID>** | This field holds a list of VRF UUIDs that will be set automatically on the virtual circuits of Fabric VCs on creation, and can hold up to two UUIDs. Two UUIDs are required when requesting redundant Fabric VCs. The first UUID will be set on the primary virtual circuit, while the second UUID will be set on the secondary. The two UUIDs can be the same if both the primary and secondary virtual circuits will be in the same VRF. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. | | - - - -## Enum: ServiceTokenTypeEnum - -| Name | Value | -|---- | -----| -| A_SIDE | "a_side" | -| Z_SIDE | "z_side" | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| SHARED | "shared" | - - - diff --git a/equinix-openapi-metal/docs/VrfIpReservation.md b/equinix-openapi-metal/docs/VrfIpReservation.md deleted file mode 100644 index bbe7876c7..000000000 --- a/equinix-openapi-metal/docs/VrfIpReservation.md +++ /dev/null @@ -1,44 +0,0 @@ - - -# VrfIpReservation - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addressFamily** | **Integer** | | [optional] | -|**cidr** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**details** | **String** | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**metalGateway** | [**MetalGatewayLite**](MetalGatewayLite.md) | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**state** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**vrf** | [**Vrf**](Vrf.md) | | | -|**_public** | **Boolean** | | [optional] | -|**management** | **Boolean** | | [optional] | -|**manageable** | **Boolean** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**bill** | **Boolean** | | [optional] | -|**projectLite** | [**Project**](Project.md) | | [optional] | -|**address** | **String** | | [optional] | -|**gateway** | **String** | | [optional] | -|**metro** | [**Metro**](Metro.md) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| VRF | "vrf" | - - - diff --git a/equinix-openapi-metal/docs/VrfIpReservationCreateInput.md b/equinix-openapi-metal/docs/VrfIpReservationCreateInput.md deleted file mode 100644 index 1b224621f..000000000 --- a/equinix-openapi-metal/docs/VrfIpReservationCreateInput.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# VrfIpReservationCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**cidr** | **Integer** | The size of the VRF IP Reservation's subnet | | -|**customdata** | **Object** | | [optional] | -|**details** | **String** | | [optional] | -|**network** | **String** | The starting address for this VRF IP Reservation's subnet | | -|**tags** | **List<String>** | | [optional] | -|**type** | **String** | Must be set to 'vrf' | | -|**vrfId** | **UUID** | The ID of the VRF in which this VRF IP Reservation is created. The VRF must have an existing IP Range that contains the requested subnet. This field may be aliased as just 'vrf'. | | - - - diff --git a/equinix-openapi-metal/docs/VrfIpReservationList.md b/equinix-openapi-metal/docs/VrfIpReservationList.md deleted file mode 100644 index b800f0487..000000000 --- a/equinix-openapi-metal/docs/VrfIpReservationList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# VrfIpReservationList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ipAddresses** | [**List<VrfIpReservation>**](VrfIpReservation.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfIpReservationOrHref.md b/equinix-openapi-metal/docs/VrfIpReservationOrHref.md deleted file mode 100644 index efdf69827..000000000 --- a/equinix-openapi-metal/docs/VrfIpReservationOrHref.md +++ /dev/null @@ -1,44 +0,0 @@ - - -# VrfIpReservationOrHref - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**addressFamily** | **Integer** | | [optional] | -|**cidr** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**details** | **String** | | [optional] | -|**href** | **String** | | | -|**id** | **UUID** | | [optional] | -|**metalGateway** | [**MetalGatewayLite**](MetalGatewayLite.md) | | [optional] | -|**netmask** | **String** | | [optional] | -|**network** | **String** | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**state** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | | -|**vrf** | [**Vrf**](Vrf.md) | | | -|**_public** | **Boolean** | | [optional] | -|**management** | **Boolean** | | [optional] | -|**manageable** | **Boolean** | | [optional] | -|**customdata** | **Object** | | [optional] | -|**bill** | **Boolean** | | [optional] | -|**projectLite** | [**Project**](Project.md) | | [optional] | -|**address** | **String** | | [optional] | -|**gateway** | **String** | | [optional] | -|**metro** | [**Metro**](Metro.md) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| VRF | "vrf" | - - - diff --git a/equinix-openapi-metal/docs/VrfList.md b/equinix-openapi-metal/docs/VrfList.md deleted file mode 100644 index 63c53b883..000000000 --- a/equinix-openapi-metal/docs/VrfList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# VrfList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**vrfs** | [**List<Vrf>**](Vrf.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfMetalGateway.md b/equinix-openapi-metal/docs/VrfMetalGateway.md deleted file mode 100644 index 8d660e8fa..000000000 --- a/equinix-openapi-metal/docs/VrfMetalGateway.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# VrfMetalGateway - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**createdAt** | **OffsetDateTime** | | [optional] | -|**createdBy** | [**Href**](Href.md) | | [optional] | -|**href** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**ipReservation** | [**VrfIpReservationOrHref**](VrfIpReservationOrHref.md) | | [optional] | -|**project** | [**Project**](Project.md) | | [optional] | -|**state** | [**StateEnum**](#StateEnum) | The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**virtualNetwork** | [**VirtualNetwork**](VirtualNetwork.md) | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | | - - - -## Enum: StateEnum - -| Name | Value | -|---- | -----| -| READY | "ready" | -| ACTIVE | "active" | -| DELETING | "deleting" | - - - diff --git a/equinix-openapi-metal/docs/VrfMetalGatewayCreateInput.md b/equinix-openapi-metal/docs/VrfMetalGatewayCreateInput.md deleted file mode 100644 index 7a4294956..000000000 --- a/equinix-openapi-metal/docs/VrfMetalGatewayCreateInput.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# VrfMetalGatewayCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**ipReservationId** | **UUID** | The UUID an a VRF IP Reservation that belongs to the same project as the one in which the Metal Gateway is to be created. Additionally, the VRF IP Reservation and the Virtual Network must reside in the same Metro. | | -|**virtualNetworkId** | **UUID** | THe UUID of a Metro Virtual Network that belongs to the same project as the one in which the Metal Gateway is to be created. Additionally, the Virtual Network and the VRF IP Reservation must reside in the same metro. | | - - - diff --git a/equinix-openapi-metal/docs/VrfRoute.md b/equinix-openapi-metal/docs/VrfRoute.md deleted file mode 100644 index 74ad5d7b8..000000000 --- a/equinix-openapi-metal/docs/VrfRoute.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# VrfRoute - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **UUID** | The unique identifier for the newly-created resource | [optional] [readonly] | -|**status** | [**StatusEnum**](#StatusEnum) | The status of the route. Potential values are \"pending\", \"active\", \"deleting\", and \"error\", representing various lifecycle states of the route and whether or not it has been successfully configured on the network | [optional] [readonly] | -|**prefix** | **String** | The IPv4 prefix for the route, in CIDR-style notation | [optional] | -|**nextHop** | **String** | The next-hop IPv4 address for the route | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | VRF route type, like 'bgp', 'connected', and 'static'. Currently, only static routes are supported | [optional] [readonly] | -|**createdAt** | **OffsetDateTime** | | [optional] [readonly] | -|**updatedAt** | **OffsetDateTime** | | [optional] [readonly] | -|**metalGateway** | [**VrfMetalGateway**](VrfMetalGateway.md) | | [optional] | -|**virtualNetwork** | [**VirtualNetwork**](VirtualNetwork.md) | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | [optional] | -|**href** | **String** | | [optional] [readonly] | -|**tags** | **List<String>** | | [optional] | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| PENDING | "pending" | -| ACTIVE | "active" | -| DELETING | "deleting" | -| ERROR | "error" | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| STATIC | "static" | - - - diff --git a/equinix-openapi-metal/docs/VrfRouteCreateInput.md b/equinix-openapi-metal/docs/VrfRouteCreateInput.md deleted file mode 100644 index 529b13d2e..000000000 --- a/equinix-openapi-metal/docs/VrfRouteCreateInput.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# VrfRouteCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**prefix** | **String** | The IPv4 prefix for the route, in CIDR-style notation. For a static default route, this will always be \"0.0.0.0/0\" | | -|**nextHop** | **String** | The IPv4 address within the VRF of the host that will handle this route | | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfRouteList.md b/equinix-openapi-metal/docs/VrfRouteList.md deleted file mode 100644 index 57e0a3cd2..000000000 --- a/equinix-openapi-metal/docs/VrfRouteList.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# VrfRouteList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**routes** | [**List<VrfRoute>**](VrfRoute.md) | | [optional] | -|**meta** | [**Meta**](Meta.md) | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfRouteUpdateInput.md b/equinix-openapi-metal/docs/VrfRouteUpdateInput.md deleted file mode 100644 index d122f87ef..000000000 --- a/equinix-openapi-metal/docs/VrfRouteUpdateInput.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# VrfRouteUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**prefix** | **String** | The IPv4 prefix for the route, in CIDR-style notation. For a static default route, this will always be \"0.0.0.0/0\" | [optional] | -|**nextHop** | **String** | The IPv4 address within the VRF of the host that will handle this route | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfUpdateInput.md b/equinix-openapi-metal/docs/VrfUpdateInput.md deleted file mode 100644 index 9136fc426..000000000 --- a/equinix-openapi-metal/docs/VrfUpdateInput.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# VrfUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bgpDynamicNeighborsEnabled** | **Boolean** | Toggle to enable the dynamic bgp neighbors feature on the VRF | [optional] | -|**bgpDynamicNeighborsExportRouteMap** | **Boolean** | Toggle to export the VRF route-map to the dynamic bgp neighbors | [optional] | -|**bgpDynamicNeighborsBfdEnabled** | **Boolean** | Toggle BFD on dynamic bgp neighbors sessions | [optional] | -|**description** | **String** | | [optional] | -|**ipRanges** | **List<String>** | A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64. A VRF\\'s IP ranges must be defined in order to create VRF IP Reservations, which can then be used for Metal Gateways or Virtual Circuits. Adding a new CIDR address to the list will result in the creation of a new IP Range for this VRF. Removal of an existing CIDR address from the list will result in the deletion of an existing IP Range for this VRF. Deleting an IP Range will result in the deletion of any VRF IP Reservations contained within the IP Range, as well as the VRF IP Reservation\\'s associated Metal Gateways or Virtual Circuits. If you do not wish to add or remove IP Ranges, either include the full existing list of IP Ranges in the update request, or do not specify the `ip_ranges` field in the update request. Specifying a value of `[]` will remove all existing IP Ranges from the VRF. | [optional] | -|**localAsn** | **Integer** | The new `local_asn` value for the VRF. This field cannot be updated when there are active Interconnection Virtual Circuits associated to the VRF, or if any of the VLANs of the VRF's metal gateway has been assigned on an instance. | [optional] | -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfVirtualCircuit.md b/equinix-openapi-metal/docs/VrfVirtualCircuit.md deleted file mode 100644 index 82f9eb600..000000000 --- a/equinix-openapi-metal/docs/VrfVirtualCircuit.md +++ /dev/null @@ -1,49 +0,0 @@ - - -# VrfVirtualCircuit - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customerIp** | **String** | An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. | [optional] | -|**description** | **String** | | [optional] | -|**id** | **UUID** | | [optional] | -|**md5** | **String** | The MD5 password for the BGP peering in plaintext (not a checksum). | [optional] | -|**metalIp** | **String** | An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. | [optional] | -|**name** | **String** | | [optional] | -|**port** | [**Href**](Href.md) | | [optional] | -|**nniVlan** | **Integer** | | [optional] | -|**peerAsn** | **Integer** | The peer ASN that will be used with the VRF on the Virtual Circuit. | [optional] | -|**project** | [**Href**](Href.md) | | [optional] | -|**speed** | **Integer** | integer representing bps speed | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The status changes of a VRF virtual circuit are generally the same as Virtual Circuits that aren't in a VRF. However, for VRF Virtual Circuits on Fabric VCs, the status will change to 'waiting_on_peering_details' once the Fabric service token associated with the virtual circuit has been redeemed on Fabric, and Metal has found the associated Fabric connection. At this point, users can update the subnet, MD5 password, customer IP and/or metal IP accordingly. For VRF Virtual Circuits on Dedicated Ports, we require all peering details to be set on creation of a VRF Virtual Circuit. The status will change to `changing_peering_details` whenever an active VRF Virtual Circuit has any of its peering details updated. | [optional] | -|**subnet** | **String** | The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. | [optional] | -|**tags** | **List<String>** | | [optional] | -|**type** | **VrfVirtualCircuitType** | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| PENDING | "pending" | -| WAITING_ON_PEERING_DETAILS | "waiting_on_peering_details" | -| ACTIVATING | "activating" | -| CHANGING_PEERING_DETAILS | "changing_peering_details" | -| DEACTIVATING | "deactivating" | -| DELETING | "deleting" | -| ACTIVE | "active" | -| EXPIRED | "expired" | -| ACTIVATION_FAILED | "activation_failed" | -| CHANGING_PEERING_DETAILS_FAILED | "changing_peering_details_failed" | -| DEACTIVATION_FAILED | "deactivation_failed" | -| DELETE_FAILED | "delete_failed" | - - - diff --git a/equinix-openapi-metal/docs/VrfVirtualCircuitCreateInput.md b/equinix-openapi-metal/docs/VrfVirtualCircuitCreateInput.md deleted file mode 100644 index ec94525ed..000000000 --- a/equinix-openapi-metal/docs/VrfVirtualCircuitCreateInput.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# VrfVirtualCircuitCreateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customerIp** | **String** | An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. | [optional] | -|**description** | **String** | | [optional] | -|**md5** | **String** | The plaintext BGP peering password shared by neighbors as an MD5 checksum: * must be 10-20 characters long * may not include punctuation * must be a combination of numbers and letters * must contain at least one lowercase, uppercase, and digit character | [optional] | -|**metalIp** | **String** | An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. | [optional] | -|**name** | **String** | | [optional] | -|**nniVlan** | **Integer** | | | -|**peerAsn** | **Integer** | The peer ASN that will be used with the VRF on the Virtual Circuit. | | -|**projectId** | **UUID** | | | -|**speed** | **Integer** | speed can be passed as integer number representing bps speed or string (e.g. '52m' or '100g' or '4 gbps') | [optional] | -|**subnet** | **String** | The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. The subnet specified must be contained within an already-defined IP Range for the VRF. | | -|**tags** | **List<String>** | | [optional] | -|**vrf** | **UUID** | The UUID of the VRF that will be associated with the Virtual Circuit. | | - - - diff --git a/equinix-openapi-metal/docs/VrfVirtualCircuitType.md b/equinix-openapi-metal/docs/VrfVirtualCircuitType.md deleted file mode 100644 index 0abe66437..000000000 --- a/equinix-openapi-metal/docs/VrfVirtualCircuitType.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# VrfVirtualCircuitType - -## Enum - - -* `VRF` (value: `"vrf"`) - - - diff --git a/equinix-openapi-metal/docs/VrfVirtualCircuitUpdateInput.md b/equinix-openapi-metal/docs/VrfVirtualCircuitUpdateInput.md deleted file mode 100644 index 07fdac923..000000000 --- a/equinix-openapi-metal/docs/VrfVirtualCircuitUpdateInput.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# VrfVirtualCircuitUpdateInput - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**customerIp** | **String** | An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. | [optional] | -|**description** | **String** | | [optional] | -|**md5** | **String** | The plaintext BGP peering password shared by neighbors as an MD5 checksum: * must be 10-20 characters long * may not include punctuation * must be a combination of numbers and letters * must contain at least one lowercase, uppercase, and digit character | [optional] | -|**metalIp** | **String** | An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. | [optional] | -|**name** | **String** | | [optional] | -|**peerAsn** | **Integer** | The peer ASN that will be used with the VRF on the Virtual Circuit. | [optional] | -|**speed** | **String** | Speed can be changed only if it is an interconnection on a Dedicated Port | [optional] | -|**subnet** | **String** | The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. | [optional] | -|**tags** | **List<String>** | | [optional] | - - - diff --git a/equinix-openapi-metal/docs/VrfsApi.md b/equinix-openapi-metal/docs/VrfsApi.md deleted file mode 100644 index 0751a27c6..000000000 --- a/equinix-openapi-metal/docs/VrfsApi.md +++ /dev/null @@ -1,1247 +0,0 @@ -# VrfsApi - -All URIs are relative to *https://api.equinix.com/metal/v1* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**bgpDynamicNeighborsIdGet**](VrfsApi.md#bgpDynamicNeighborsIdGet) | **GET** /bgp-dynamic-neighbors/{id} | Retrieve a BGP Dynamic Neighbor | -| [**createBgpDynamicNeighbor**](VrfsApi.md#createBgpDynamicNeighbor) | **POST** /metal-gateways/{id}/bgp-dynamic-neighbors | Create a VRF BGP Dynamic Neighbor range | -| [**createVrf**](VrfsApi.md#createVrf) | **POST** /projects/{id}/vrfs | Create a new VRF in the specified project | -| [**createVrfRoute**](VrfsApi.md#createVrfRoute) | **POST** /vrfs/{id}/routes | Create a VRF route | -| [**deleteBgpDynamicNeighborById**](VrfsApi.md#deleteBgpDynamicNeighborById) | **DELETE** /bgp-dynamic-neighbors/{id} | Delete a VRF BGP Dynamic Neighbor | -| [**deleteVrf**](VrfsApi.md#deleteVrf) | **DELETE** /vrfs/{id} | Delete the VRF | -| [**deleteVrfRouteById**](VrfsApi.md#deleteVrfRouteById) | **DELETE** /routes/{id} | Delete a VRF Route | -| [**findVrfById**](VrfsApi.md#findVrfById) | **GET** /vrfs/{id} | Retrieve a VRF | -| [**findVrfIpReservation**](VrfsApi.md#findVrfIpReservation) | **GET** /vrfs/{vrf_id}/ips/{id} | Retrieve all VRF IP Reservations in the VRF | -| [**findVrfIpReservations**](VrfsApi.md#findVrfIpReservations) | **GET** /vrfs/{id}/ips | Retrieve all VRF IP Reservations in the VRF | -| [**findVrfRouteById**](VrfsApi.md#findVrfRouteById) | **GET** /routes/{id} | Retrieve a VRF Route | -| [**findVrfs**](VrfsApi.md#findVrfs) | **GET** /projects/{id}/vrfs | Retrieve all VRFs in the project | -| [**getBgpDynamicNeighbors**](VrfsApi.md#getBgpDynamicNeighbors) | **GET** /metal-gateways/{id}/bgp-dynamic-neighbors | List BGP Dynamic Neighbors | -| [**getVrfRoutes**](VrfsApi.md#getVrfRoutes) | **GET** /vrfs/{id}/routes | Retrieve all routes in the VRF | -| [**updateVrf**](VrfsApi.md#updateVrf) | **PUT** /vrfs/{id} | Update the VRF | -| [**updateVrfRouteById**](VrfsApi.md#updateVrfRouteById) | **PUT** /routes/{id} | Update a VRF Route | - - - -# **bgpDynamicNeighborsIdGet** -> BgpDynamicNeighbor bgpDynamicNeighborsIdGet(id, include, exclude) - -Retrieve a BGP Dynamic Neighbor - -Return a single BGP Dynamic Neighbor resource - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | BGP Dynamic Neighbor UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - BgpDynamicNeighbor result = apiInstance.bgpDynamicNeighborsIdGet(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#bgpDynamicNeighborsIdGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| BGP Dynamic Neighbor UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**BgpDynamicNeighbor**](BgpDynamicNeighbor.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **401** | Unauthorized | - | -| **404** | Not Found | - | - - -# **createBgpDynamicNeighbor** -> BgpDynamicNeighbor createBgpDynamicNeighbor(id, bgpDynamicNeighborCreateInput, include, exclude) - -Create a VRF BGP Dynamic Neighbor range - -Create a VRF BGP Dynamic Neighbor range. BGP Dynamic Neighbor records are limited to 2 per Virtual Network. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Metal Gateway UUID - BgpDynamicNeighborCreateInput bgpDynamicNeighborCreateInput = new BgpDynamicNeighborCreateInput(); // BgpDynamicNeighborCreateInput | - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - BgpDynamicNeighbor result = apiInstance.createBgpDynamicNeighbor(id, bgpDynamicNeighborCreateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#createBgpDynamicNeighbor"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Metal Gateway UUID | | -| **bgpDynamicNeighborCreateInput** | [**BgpDynamicNeighborCreateInput**](BgpDynamicNeighborCreateInput.md)| | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**BgpDynamicNeighbor**](BgpDynamicNeighbor.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Created | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | -| **422** | Unprocessable entity | - | - - -# **createVrf** -> Vrf createVrf(id, vrfCreateInput, include, exclude) - -Create a new VRF in the specified project - -Creates a new VRF in the specified project - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - VrfCreateInput vrfCreateInput = new VrfCreateInput(); // VrfCreateInput | VRF to create - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Vrf result = apiInstance.createVrf(id, vrfCreateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#createVrf"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **vrfCreateInput** | [**VrfCreateInput**](VrfCreateInput.md)| VRF to create | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Vrf**](Vrf.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | created | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **createVrfRoute** -> VrfRoute createVrfRoute(id, vrfRouteCreateInput, include, exclude) - -Create a VRF route - -Create a route in a VRF. Currently only static default routes are supported. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF UUID - VrfRouteCreateInput vrfRouteCreateInput = new VrfRouteCreateInput(); // VrfRouteCreateInput | - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VrfRoute result = apiInstance.createVrfRoute(id, vrfRouteCreateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#createVrfRoute"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF UUID | | -| **vrfRouteCreateInput** | [**VrfRouteCreateInput**](VrfRouteCreateInput.md)| | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VrfRoute**](VrfRoute.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | -| **422** | Unprocessable entity | - | - - -# **deleteBgpDynamicNeighborById** -> BgpDynamicNeighbor deleteBgpDynamicNeighborById(id, include, exclude) - -Delete a VRF BGP Dynamic Neighbor - -Trigger the removal of a BGP Neighbor range from a VRF - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | BGP Dynamic Neighbor UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - BgpDynamicNeighbor result = apiInstance.deleteBgpDynamicNeighborById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#deleteBgpDynamicNeighborById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| BGP Dynamic Neighbor UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**BgpDynamicNeighbor**](BgpDynamicNeighbor.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | - - -# **deleteVrf** -> deleteVrf(id) - -Delete the VRF - -Deletes the VRF - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF UUID - try { - apiInstance.deleteVrf(id); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#deleteVrf"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF UUID | | - -### Return type - -null (empty response body) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | no content | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **deleteVrfRouteById** -> VrfRoute deleteVrfRouteById(id, include, exclude) - -Delete a VRF Route - -Trigger the deletion of a VRF Route resource. The status of the route will update to 'deleting', and the route resource will remain accessible while background operations remove the route from the network. Once the route has been removed from the network, the resource will be fully deleted. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF Route UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VrfRoute result = apiInstance.deleteVrfRouteById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#deleteVrfRouteById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF Route UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VrfRoute**](VrfRoute.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | - - -# **findVrfById** -> Vrf findVrfById(id, include, exclude) - -Retrieve a VRF - -Returns a single VRF resource - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Vrf result = apiInstance.findVrfById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#findVrfById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Vrf**](Vrf.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findVrfIpReservation** -> VrfIpReservation findVrfIpReservation(vrfId, id, include, exclude) - -Retrieve all VRF IP Reservations in the VRF - -Returns the IP Reservation for the VRF. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID vrfId = UUID.randomUUID(); // UUID | VRF UUID - UUID id = UUID.randomUUID(); // UUID | IP UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VrfIpReservation result = apiInstance.findVrfIpReservation(vrfId, id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#findVrfIpReservation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **vrfId** | **UUID**| VRF UUID | | -| **id** | **UUID**| IP UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VrfIpReservation**](VrfIpReservation.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findVrfIpReservations** -> VrfIpReservationList findVrfIpReservations(id, include, exclude) - -Retrieve all VRF IP Reservations in the VRF - -Returns the list of VRF IP Reservations for the VRF. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VrfIpReservationList result = apiInstance.findVrfIpReservations(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#findVrfIpReservations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VrfIpReservationList**](VrfIpReservationList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **findVrfRouteById** -> VrfRoute findVrfRouteById(id, include, exclude) - -Retrieve a VRF Route - -Returns a single VRF Route resource - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF Route UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VrfRoute result = apiInstance.findVrfRouteById(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#findVrfRouteById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF Route UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VrfRoute**](VrfRoute.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **401** | Unauthorized | - | -| **404** | Not Found | - | - - -# **findVrfs** -> VrfList findVrfs(id, include, exclude, metro) - -Retrieve all VRFs in the project - -Returns the list of VRFs for a single project. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Project UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - String metro = "metro_example"; // String | Filter by Metro ID (uuid) or Metro Code - try { - VrfList result = apiInstance.findVrfs(id, include, exclude, metro); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#findVrfs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Project UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | -| **metro** | **String**| Filter by Metro ID (uuid) or Metro Code | [optional] | - -### Return type - -[**VrfList**](VrfList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **403** | forbidden | - | -| **404** | not found | - | - - -# **getBgpDynamicNeighbors** -> BgpDynamicNeighborList getBgpDynamicNeighbors(id, include, exclude) - -List BGP Dynamic Neighbors - -Returns the list of VRF BGP Dynamic Neighbors for this Metal Gateway - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | Metal Gateway UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - BgpDynamicNeighborList result = apiInstance.getBgpDynamicNeighbors(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#getBgpDynamicNeighbors"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| Metal Gateway UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**BgpDynamicNeighborList**](BgpDynamicNeighborList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **401** | Unauthorized | - | -| **404** | Not Found | - | - - -# **getVrfRoutes** -> VrfRouteList getVrfRoutes(id, include, exclude) - -Retrieve all routes in the VRF - -Returns the list of routes for the VRF - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF UUID - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VrfRouteList result = apiInstance.getVrfRoutes(id, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#getVrfRoutes"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF UUID | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VrfRouteList**](VrfRouteList.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **401** | Unauthorized | - | -| **404** | Not Found | - | - - -# **updateVrf** -> Vrf updateVrf(id, vrfUpdateInput, include, exclude) - -Update the VRF - -Updates the VRF. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF UUID - VrfUpdateInput vrfUpdateInput = new VrfUpdateInput(); // VrfUpdateInput | VRF to update - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - Vrf result = apiInstance.updateVrf(id, vrfUpdateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#updateVrf"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF UUID | | -| **vrfUpdateInput** | [**VrfUpdateInput**](VrfUpdateInput.md)| VRF to update | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**Vrf**](Vrf.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | ok | - | -| **401** | unauthorized | - | -| **403** | forbidden | - | -| **404** | not found | - | -| **422** | unprocessable entity | - | - - -# **updateVrfRouteById** -> VrfRoute updateVrfRouteById(id, vrfRouteUpdateInput, include, exclude) - -Update a VRF Route - -Requests a VRF Route be redeployed across the network. Updating the prefix or next-hop address on a route is not currently supported. - -### Example -```java -// Import classes: -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.auth.*; -import com.equinix.openapi.models.*; -import com.equinix.openapi.metal.v1.api.VrfsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.equinix.com/metal/v1"); - - // Configure API key authorization: x_auth_token - ApiKeyAuth x_auth_token = (ApiKeyAuth) defaultClient.getAuthentication("x_auth_token"); - x_auth_token.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //x_auth_token.setApiKeyPrefix("Token"); - - VrfsApi apiInstance = new VrfsApi(defaultClient); - UUID id = UUID.randomUUID(); // UUID | VRF Route UUID - VrfRouteUpdateInput vrfRouteUpdateInput = new VrfRouteUpdateInput(); // VrfRouteUpdateInput | - List include = Arrays.asList(); // List | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. - List exclude = Arrays.asList(); // List | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. - try { - VrfRoute result = apiInstance.updateVrfRouteById(id, vrfRouteUpdateInput, include, exclude); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling VrfsApi#updateVrfRouteById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **UUID**| VRF Route UUID | | -| **vrfRouteUpdateInput** | [**VrfRouteUpdateInput**](VrfRouteUpdateInput.md)| | | -| **include** | [**List<String>**](String.md)| Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] | -| **exclude** | [**List<String>**](String.md)| Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] | - -### Return type - -[**VrfRoute**](VrfRoute.md) - -### Authorization - -[x_auth_token](../README.md#x_auth_token) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **202** | Accepted | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | -| **422** | Unprocessable Entity | - | -| **429** | Too Many Requests | - | - diff --git a/equinix-openapi-metal/git_push.sh b/equinix-openapi-metal/git_push.sh deleted file mode 100644 index cd9d902b1..000000000 --- a/equinix-openapi-metal/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="equinix-labs" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="metal-java" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/equinix-openapi-metal/gradle.properties b/equinix-openapi-metal/gradle.properties deleted file mode 100644 index a34085782..000000000 --- a/equinix-openapi-metal/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). -# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. -# -# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties -# For example, uncomment below to build for Android -#target = android diff --git a/equinix-openapi-metal/gradle/wrapper/gradle-wrapper.jar b/equinix-openapi-metal/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7454180f2..000000000 Binary files a/equinix-openapi-metal/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/equinix-openapi-metal/gradle/wrapper/gradle-wrapper.properties b/equinix-openapi-metal/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index ffed3a254..000000000 --- a/equinix-openapi-metal/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/equinix-openapi-metal/gradlew b/equinix-openapi-metal/gradlew deleted file mode 100644 index 005bcde04..000000000 --- a/equinix-openapi-metal/gradlew +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/equinix-openapi-metal/gradlew.bat b/equinix-openapi-metal/gradlew.bat deleted file mode 100644 index 6a68175eb..000000000 --- a/equinix-openapi-metal/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/equinix-openapi-metal/pom.xml b/equinix-openapi-metal/pom.xml deleted file mode 100644 index cfa019e44..000000000 --- a/equinix-openapi-metal/pom.xml +++ /dev/null @@ -1,352 +0,0 @@ - - 4.0.0 - com.equinix - equinix-openapi-metal - jar - equinix-openapi-metal - 0.10.1 - https://github.com/openapitools/openapi-generator - OpenAPI Java - - scm:git:git@github.com:openapitools/openapi-generator.git - scm:git:git@github.com:openapitools/openapi-generator.git - https://github.com/openapitools/openapi-generator - - - - - Unlicense - https://metal.equinix.com/legal/ - repo - - - - - - OpenAPI-Generator Contributors - team@openapitools.org - OpenAPITools.org - http://openapitools.org - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.1.0 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - - - - - maven-dependency-plugin - 3.3.0 - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.3.0 - - - - test-jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.4.1 - - - attach-javadocs - - jar - - - - - none - - - http.response.details - a - Http Response Details: - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar-no-fork - - - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless.version} - - - - - - - .gitignore - - - - - - true - 4 - - - - - - - - - - 1.8 - - true - - - - - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.squareup.okhttp3 - okhttp - ${okhttp-version} - - - com.squareup.okhttp3 - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - jakarta.annotation - jakarta.annotation-api - ${jakarta-annotation-version} - provided - - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - - javax.ws.rs - jsr311-api - ${jsr311-api-version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs-api-version} - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - test - - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - - - org.mockito - mockito-core - ${mockito-core-version} - test - - - - 1.8 - ${java.version} - ${java.version} - 1.8.5 - 4.10.0 - 2.9.1 - 3.12.0 - 0.2.6 - 1.3.5 - 5.9.1 - 1.9.1 - 3.12.4 - 2.1.1 - 1.1.1 - UTF-8 - 2.27.2 - - diff --git a/equinix-openapi-metal/settings.gradle b/equinix-openapi-metal/settings.gradle deleted file mode 100644 index ef545c115..000000000 --- a/equinix-openapi-metal/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "equinix-openapi-metal" \ No newline at end of file diff --git a/equinix-openapi-metal/src/main/AndroidManifest.xml b/equinix-openapi-metal/src/main/AndroidManifest.xml deleted file mode 100644 index a88e8ad5d..000000000 --- a/equinix-openapi-metal/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiCallback.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiCallback.java deleted file mode 100644 index 48e952932..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiCallback.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import java.io.IOException; - -import java.util.Map; -import java.util.List; - -/** - * Callback for asynchronous API call. - * - * @param The return type - */ -public interface ApiCallback { - /** - * This is called when the API call fails. - * - * @param e The exception causing the failure - * @param statusCode Status code of the response if available, otherwise it would be 0 - * @param responseHeaders Headers of the response if available, otherwise it would be null - */ - void onFailure(ApiException e, int statusCode, Map> responseHeaders); - - /** - * This is called when the API call succeeded. - * - * @param result The result deserialized from response - * @param statusCode Status code of the response - * @param responseHeaders Headers of the response - */ - void onSuccess(T result, int statusCode, Map> responseHeaders); - - /** - * This is called when the API upload processing. - * - * @param bytesWritten bytes Written - * @param contentLength content length of request body - * @param done write end - */ - void onUploadProgress(long bytesWritten, long contentLength, boolean done); - - /** - * This is called when the API download processing. - * - * @param bytesRead bytes Read - * @param contentLength content length of the response - * @param done Read end - */ - void onDownloadProgress(long bytesRead, long contentLength, boolean done); -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiClient.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiClient.java deleted file mode 100644 index 2789484ad..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiClient.java +++ /dev/null @@ -1,1552 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import okhttp3.*; -import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; -import okhttp3.logging.HttpLoggingInterceptor; -import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.Buffer; -import okio.BufferedSink; -import okio.Okio; - -import javax.net.ssl.*; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Type; -import java.net.URI; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.text.DateFormat; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; -import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import com.equinix.openapi.auth.Authentication; -import com.equinix.openapi.auth.HttpBasicAuth; -import com.equinix.openapi.auth.HttpBearerAuth; -import com.equinix.openapi.auth.ApiKeyAuth; - -/** - *

ApiClient class.

- */ -public class ApiClient { - - private String basePath = "https://api.equinix.com/metal/v1"; - protected List servers = new ArrayList(Arrays.asList( - new ServerConfiguration( - "https://api.equinix.com/metal/v1", - "No description provided", - new HashMap() - ) - )); - protected Integer serverIndex = 0; - protected Map serverVariables = null; - private boolean debugging = false; - private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); - private String tempFolderPath = null; - - private Map authentications; - - private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; - - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; - - private OkHttpClient httpClient; - private JSON json; - - private HttpLoggingInterceptor loggingInterceptor; - - /** - * Basic constructor for ApiClient - */ - public ApiClient() { - init(); - initHttpClient(); - - // Setup authentications (key: authentication name, value: authentication). - authentications.put("x_auth_token", new ApiKeyAuth("header", "X-Auth-Token")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - /** - * Basic constructor with custom OkHttpClient - * - * @param client a {@link okhttp3.OkHttpClient} object - */ - public ApiClient(OkHttpClient client) { - init(); - - httpClient = client; - - // Setup authentications (key: authentication name, value: authentication). - authentications.put("x_auth_token", new ApiKeyAuth("header", "X-Auth-Token")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - private void initHttpClient() { - initHttpClient(Collections.emptyList()); - } - - private void initHttpClient(List interceptors) { - OkHttpClient.Builder builder = new OkHttpClient.Builder(); - builder.addNetworkInterceptor(getProgressInterceptor()); - for (Interceptor interceptor: interceptors) { - builder.addInterceptor(interceptor); - } - - httpClient = builder.build(); - } - - private void init() { - verifyingSsl = true; - - json = new JSON(); - - // Set default User-Agent. - setUserAgent("metal-java/0.10.1"); - - authentications = new HashMap(); - } - - /** - * Get base path - * - * @return Base path - */ - public String getBasePath() { - return basePath; - } - - /** - * Set base path - * - * @param basePath Base path of the URL (e.g https://api.equinix.com/metal/v1 - * @return An instance of OkHttpClient - */ - public ApiClient setBasePath(String basePath) { - this.basePath = basePath; - this.serverIndex = null; - return this; - } - - public List getServers() { - return servers; - } - - public ApiClient setServers(List servers) { - this.servers = servers; - return this; - } - - public Integer getServerIndex() { - return serverIndex; - } - - public ApiClient setServerIndex(Integer serverIndex) { - this.serverIndex = serverIndex; - return this; - } - - public Map getServerVariables() { - return serverVariables; - } - - public ApiClient setServerVariables(Map serverVariables) { - this.serverVariables = serverVariables; - return this; - } - - /** - * Get HTTP client - * - * @return An instance of OkHttpClient - */ - public OkHttpClient getHttpClient() { - return httpClient; - } - - /** - * Set HTTP client, which must never be null. - * - * @param newHttpClient An instance of OkHttpClient - * @return Api Client - * @throws java.lang.NullPointerException when newHttpClient is null - */ - public ApiClient setHttpClient(OkHttpClient newHttpClient) { - this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); - return this; - } - - /** - * Get JSON - * - * @return JSON object - */ - public JSON getJSON() { - return json; - } - - /** - * Set JSON - * - * @param json JSON object - * @return Api client - */ - public ApiClient setJSON(JSON json) { - this.json = json; - return this; - } - - /** - * True if isVerifyingSsl flag is on - * - * @return True if isVerifySsl flag is on - */ - public boolean isVerifyingSsl() { - return verifyingSsl; - } - - /** - * Configure whether to verify certificate and hostname when making https requests. - * Default to true. - * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. - * - * @param verifyingSsl True to verify TLS/SSL connection - * @return ApiClient - */ - public ApiClient setVerifyingSsl(boolean verifyingSsl) { - this.verifyingSsl = verifyingSsl; - applySslSettings(); - return this; - } - - /** - * Get SSL CA cert. - * - * @return Input stream to the SSL CA cert - */ - public InputStream getSslCaCert() { - return sslCaCert; - } - - /** - * Configure the CA certificate to be trusted when making https requests. - * Use null to reset to default. - * - * @param sslCaCert input stream for SSL CA cert - * @return ApiClient - */ - public ApiClient setSslCaCert(InputStream sslCaCert) { - this.sslCaCert = sslCaCert; - applySslSettings(); - return this; - } - - /** - *

Getter for the field keyManagers.

- * - * @return an array of {@link javax.net.ssl.KeyManager} objects - */ - public KeyManager[] getKeyManagers() { - return keyManagers; - } - - /** - * Configure client keys to use for authorization in an SSL session. - * Use null to reset to default. - * - * @param managers The KeyManagers to use - * @return ApiClient - */ - public ApiClient setKeyManagers(KeyManager[] managers) { - this.keyManagers = managers; - applySslSettings(); - return this; - } - - /** - *

Getter for the field dateFormat.

- * - * @return a {@link java.text.DateFormat} object - */ - public DateFormat getDateFormat() { - return dateFormat; - } - - /** - *

Setter for the field dateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link com.equinix.openapi.ApiClient} object - */ - public ApiClient setDateFormat(DateFormat dateFormat) { - JSON.setDateFormat(dateFormat); - return this; - } - - /** - *

Set SqlDateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link com.equinix.openapi.ApiClient} object - */ - public ApiClient setSqlDateFormat(DateFormat dateFormat) { - JSON.setSqlDateFormat(dateFormat); - return this; - } - - /** - *

Set OffsetDateTimeFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link com.equinix.openapi.ApiClient} object - */ - public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - JSON.setOffsetDateTimeFormat(dateFormat); - return this; - } - - /** - *

Set LocalDateFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link com.equinix.openapi.ApiClient} object - */ - public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - JSON.setLocalDateFormat(dateFormat); - return this; - } - - /** - *

Set LenientOnJson.

- * - * @param lenientOnJson a boolean - * @return a {@link com.equinix.openapi.ApiClient} object - */ - public ApiClient setLenientOnJson(boolean lenientOnJson) { - JSON.setLenientOnJson(lenientOnJson); - return this; - } - - /** - * Get authentications (key: authentication name, value: authentication). - * - * @return Map of authentication objects - */ - public Map getAuthentications() { - return authentications; - } - - /** - * Get authentication for the given name. - * - * @param authName The authentication name - * @return The authentication, null if not found - */ - public Authentication getAuthentication(String authName) { - return authentications.get(authName); - } - - - /** - * Helper method to set username for the first HTTP basic authentication. - * - * @param username Username - */ - public void setUsername(String username) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setUsername(username); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set password for the first HTTP basic authentication. - * - * @param password Password - */ - public void setPassword(String password) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setPassword(password); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set API key value for the first API key authentication. - * - * @param apiKey API key - */ - public void setApiKey(String apiKey) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKey(apiKey); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set API key prefix for the first API key authentication. - * - * @param apiKeyPrefix API key prefix - */ - public void setApiKeyPrefix(String apiKeyPrefix) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set access token for the first OAuth2 authentication. - * - * @param accessToken Access token - */ - public void setAccessToken(String accessToken) { - throw new RuntimeException("No OAuth2 authentication configured!"); - } - - /** - * Helper method to set credentials for AWSV4 Signature - * - * @param accessKey Access Key - * @param secretKey Secret Key - * @param region Region - * @param service Service to access to - */ - public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { - throw new RuntimeException("No AWS4 authentication configured!"); - } - - /** - * Set the User-Agent header's value (by adding to the default header map). - * - * @param userAgent HTTP request's user agent - * @return ApiClient - */ - public ApiClient setUserAgent(String userAgent) { - addDefaultHeader("User-Agent", userAgent); - return this; - } - - /** - * Add a default header. - * - * @param key The header's key - * @param value The header's value - * @return ApiClient - */ - public ApiClient addDefaultHeader(String key, String value) { - defaultHeaderMap.put(key, value); - return this; - } - - /** - * Add a default cookie. - * - * @param key The cookie's key - * @param value The cookie's value - * @return ApiClient - */ - public ApiClient addDefaultCookie(String key, String value) { - defaultCookieMap.put(key, value); - return this; - } - - /** - * Check that whether debugging is enabled for this API client. - * - * @return True if debugging is enabled, false otherwise. - */ - public boolean isDebugging() { - return debugging; - } - - /** - * Enable/disable debugging for this API client. - * - * @param debugging To enable (true) or disable (false) debugging - * @return ApiClient - */ - public ApiClient setDebugging(boolean debugging) { - if (debugging != this.debugging) { - if (debugging) { - loggingInterceptor = new HttpLoggingInterceptor(); - loggingInterceptor.setLevel(Level.BODY); - httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); - } else { - final OkHttpClient.Builder builder = httpClient.newBuilder(); - builder.interceptors().remove(loggingInterceptor); - httpClient = builder.build(); - loggingInterceptor = null; - } - } - this.debugging = debugging; - return this; - } - - /** - * The path of temporary folder used to store downloaded files from endpoints - * with file response. The default value is null, i.e. using - * the system's default temporary folder. - * - * @see createTempFile - * @return Temporary folder path - */ - public String getTempFolderPath() { - return tempFolderPath; - } - - /** - * Set the temporary folder path (for downloading files) - * - * @param tempFolderPath Temporary folder path - * @return ApiClient - */ - public ApiClient setTempFolderPath(String tempFolderPath) { - this.tempFolderPath = tempFolderPath; - return this; - } - - /** - * Get connection timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getConnectTimeout() { - return httpClient.connectTimeoutMillis(); - } - - /** - * Sets the connect timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param connectionTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setConnectTimeout(int connectionTimeout) { - httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - /** - * Get read timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getReadTimeout() { - return httpClient.readTimeoutMillis(); - } - - /** - * Sets the read timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param readTimeout read timeout in milliseconds - * @return Api client - */ - public ApiClient setReadTimeout(int readTimeout) { - httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - /** - * Get write timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getWriteTimeout() { - return httpClient.writeTimeoutMillis(); - } - - /** - * Sets the write timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param writeTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setWriteTimeout(int writeTimeout) { - httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - - /** - * Format the given parameter object into string. - * - * @param param Parameter - * @return String representation of the parameter - */ - public String parameterToString(Object param) { - if (param == null) { - return ""; - } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { - //Serialize to json string and remove the " enclosing characters - String jsonStr = JSON.serialize(param); - return jsonStr.substring(1, jsonStr.length() - 1); - } else if (param instanceof Collection) { - StringBuilder b = new StringBuilder(); - for (Object o : (Collection) param) { - if (b.length() > 0) { - b.append(","); - } - b.append(o); - } - return b.toString(); - } else { - return String.valueOf(param); - } - } - - /** - * Formats the specified query parameter to a list containing a single {@code Pair} object. - * - * Note that {@code value} must not be a collection. - * - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list containing a single {@code Pair} object. - */ - public List parameterToPair(String name, Object value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value instanceof Collection) { - return params; - } - - params.add(new Pair(name, parameterToString(value))); - return params; - } - - /** - * Formats the specified collection query parameters to a list of {@code Pair} objects. - * - * Note that the values of each of the returned Pair objects are percent-encoded. - * - * @param collectionFormat The collection format of the parameter. - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list of {@code Pair} objects. - */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value.isEmpty()) { - return params; - } - - // create the params based on the collection format - if ("multi".equals(collectionFormat)) { - for (Object item : value) { - params.add(new Pair(name, escapeString(parameterToString(item)))); - } - return params; - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - // escape all delimiters except commas, which are URI reserved - // characters - if ("ssv".equals(collectionFormat)) { - delimiter = escapeString(" "); - } else if ("tsv".equals(collectionFormat)) { - delimiter = escapeString("\t"); - } else if ("pipes".equals(collectionFormat)) { - delimiter = escapeString("|"); - } - - StringBuilder sb = new StringBuilder(); - for (Object item : value) { - sb.append(delimiter); - sb.append(escapeString(parameterToString(item))); - } - - params.add(new Pair(name, sb.substring(delimiter.length()))); - - return params; - } - - /** - * Formats the specified collection path parameter to a string value. - * - * @param collectionFormat The collection format of the parameter. - * @param value The value of the parameter. - * @return String representation of the parameter - */ - public String collectionPathParameterToString(String collectionFormat, Collection value) { - // create the value based on the collection format - if ("multi".equals(collectionFormat)) { - // not valid for path params - return parameterToString(value); - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - if ("ssv".equals(collectionFormat)) { - delimiter = " "; - } else if ("tsv".equals(collectionFormat)) { - delimiter = "\t"; - } else if ("pipes".equals(collectionFormat)) { - delimiter = "|"; - } - - StringBuilder sb = new StringBuilder() ; - for (Object item : value) { - sb.append(delimiter); - sb.append(parameterToString(item)); - } - - return sb.substring(delimiter.length()); - } - - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif - * - * @param filename The filename to be sanitized - * @return The sanitized filename - */ - public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * "* / *" is also default to JSON - * @param mime MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public boolean isJsonMime(String mime) { - String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; - return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); - } - - /** - * Select the Accept header's value from the given accepts array: - * if JSON exists in the given array, use it; - * otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, - * null will be returned (not to set the Accept header explicitly). - */ - public String selectHeaderAccept(String[] accepts) { - if (accepts.length == 0) { - return null; - } - for (String accept : accepts) { - if (isJsonMime(accept)) { - return accept; - } - } - return StringUtil.join(accepts, ","); - } - - /** - * Select the Content-Type header's value from the given array: - * if JSON exists in the given array, use it; - * otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, - * returns null. If it matches "any", JSON will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0) { - return null; - } - - if (contentTypes[0].equals("*/*")) { - return "application/json"; - } - - for (String contentType : contentTypes) { - if (isJsonMime(contentType)) { - return contentType; - } - } - - return contentTypes[0]; - } - - /** - * Escape the given string to be used as URL query value. - * - * @param str String to be escaped - * @return Escaped string - */ - public String escapeString(String str) { - try { - return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); - } catch (UnsupportedEncodingException e) { - return str; - } - } - - /** - * Deserialize response body to Java object, according to the return type and - * the Content-Type response header. - * - * @param Type - * @param response HTTP response - * @param returnType The type of the Java object - * @return The deserialized Java object - * @throws com.equinix.openapi.ApiException If fail to deserialize response body, i.e. cannot read response body - * or the Content-Type of the response is not supported. - */ - @SuppressWarnings("unchecked") - public T deserialize(Response response, Type returnType) throws ApiException { - if (response == null || returnType == null) { - return null; - } - - if ("byte[]".equals(returnType.toString())) { - // Handle binary response (byte array). - try { - return (T) response.body().bytes(); - } catch (IOException e) { - throw new ApiException(e); - } - } else if (returnType.equals(File.class)) { - // Handle file downloading. - return (T) downloadFileFromResponse(response); - } - - String respBody; - try { - if (response.body() != null) - respBody = response.body().string(); - else - respBody = null; - } catch (IOException e) { - throw new ApiException(e); - } - - if (respBody == null || "".equals(respBody)) { - return null; - } - - String contentType = response.headers().get("Content-Type"); - if (contentType == null) { - // ensuring a default content type - contentType = "application/json"; - } - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody, returnType); - } else if (returnType.equals(String.class)) { - // Expecting string, return the raw response body. - return (T) respBody; - } else { - throw new ApiException( - "Content type \"" + contentType + "\" is not supported for type: " + returnType, - response.code(), - response.headers().toMultimap(), - respBody); - } - } - - /** - * Serialize the given Java object into request body according to the object's - * class and the request Content-Type. - * - * @param obj The Java object - * @param contentType The request Content-Type - * @return The serialized request body - * @throws com.equinix.openapi.ApiException If fail to serialize the given object - */ - public RequestBody serialize(Object obj, String contentType) throws ApiException { - if (obj instanceof byte[]) { - // Binary (byte array) body parameter support. - return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); - } else if (obj instanceof File) { - // File body parameter support. - return RequestBody.create((File) obj, MediaType.parse(contentType)); - } else if ("text/plain".equals(contentType) && obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); - } else if (isJsonMime(contentType)) { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - return RequestBody.create(content, MediaType.parse(contentType)); - } else if (obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); - } else { - throw new ApiException("Content type \"" + contentType + "\" is not supported"); - } - } - - /** - * Download file from the given response. - * - * @param response An instance of the Response object - * @throws com.equinix.openapi.ApiException If fail to read file content from response and write to disk - * @return Downloaded file - */ - public File downloadFileFromResponse(Response response) throws ApiException { - try { - File file = prepareDownloadFile(response); - BufferedSink sink = Okio.buffer(Okio.sink(file)); - sink.writeAll(response.body().source()); - sink.close(); - return file; - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * Prepare file for download - * - * @param response An instance of the Response object - * @return Prepared file for the download - * @throws java.io.IOException If fail to prepare file for download - */ - public File prepareDownloadFile(Response response) throws IOException { - String filename = null; - String contentDisposition = response.header("Content-Disposition"); - if (contentDisposition != null && !"".equals(contentDisposition)) { - // Get filename from the Content-Disposition header. - Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); - Matcher matcher = pattern.matcher(contentDisposition); - if (matcher.find()) { - filename = sanitizeFilename(matcher.group(1)); - } - } - - String prefix = null; - String suffix = null; - if (filename == null) { - prefix = "download-"; - suffix = ""; - } else { - int pos = filename.lastIndexOf("."); - if (pos == -1) { - prefix = filename + "-"; - } else { - prefix = filename.substring(0, pos) + "-"; - suffix = filename.substring(pos); - } - // Files.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) - prefix = "download-"; - } - - if (tempFolderPath == null) - return Files.createTempFile(prefix, suffix).toFile(); - else - return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); - } - - /** - * {@link #execute(Call, Type)} - * - * @param Type - * @param call An instance of the Call object - * @return ApiResponse<T> - * @throws com.equinix.openapi.ApiException If fail to execute the call - */ - public ApiResponse execute(Call call) throws ApiException { - return execute(call, null); - } - - /** - * Execute HTTP call and deserialize the HTTP response body into the given return type. - * - * @param returnType The return type used to deserialize HTTP response body - * @param The return type corresponding to (same with) returnType - * @param call Call - * @return ApiResponse object containing response status, headers and - * data, which is a Java object deserialized from response body and would be null - * when returnType is null. - * @throws com.equinix.openapi.ApiException If fail to execute the call - */ - public ApiResponse execute(Call call, Type returnType) throws ApiException { - try { - Response response = call.execute(); - T data = handleResponse(response, returnType); - return new ApiResponse(response.code(), response.headers().toMultimap(), data); - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * {@link #executeAsync(Call, Type, ApiCallback)} - * - * @param Type - * @param call An instance of the Call object - * @param callback ApiCallback<T> - */ - public void executeAsync(Call call, ApiCallback callback) { - executeAsync(call, null, callback); - } - - /** - * Execute HTTP call asynchronously. - * - * @param Type - * @param call The callback to be executed when the API call finishes - * @param returnType Return type - * @param callback ApiCallback - * @see #execute(Call, Type) - */ - @SuppressWarnings("unchecked") - public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { - call.enqueue(new Callback() { - @Override - public void onFailure(Call call, IOException e) { - callback.onFailure(new ApiException(e), 0, null); - } - - @Override - public void onResponse(Call call, Response response) throws IOException { - T result; - try { - result = (T) handleResponse(response, returnType); - } catch (ApiException e) { - callback.onFailure(e, response.code(), response.headers().toMultimap()); - return; - } catch (Exception e) { - callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); - return; - } - callback.onSuccess(result, response.code(), response.headers().toMultimap()); - } - }); - } - - /** - * Handle the given response, return the deserialized object when the response is successful. - * - * @param Type - * @param response Response - * @param returnType Return type - * @return Type - * @throws com.equinix.openapi.ApiException If the response has an unsuccessful status code or - * fail to deserialize the response body - */ - public T handleResponse(Response response, Type returnType) throws ApiException { - if (response.isSuccessful()) { - if (returnType == null || response.code() == 204) { - // returning null if the returnType is not defined, - // or the status code is 204 (No Content) - if (response.body() != null) { - try { - response.body().close(); - } catch (Exception e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - return null; - } else { - return deserialize(response, returnType); - } - } else { - String respBody = null; - if (response.body() != null) { - try { - respBody = response.body().string(); - } catch (IOException e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); - } - } - - /** - * Build HTTP call with the given options. - * - * @param baseUrl The base URL - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param callback Callback for upload/download progress - * @return The HTTP call - * @throws com.equinix.openapi.ApiException If fail to serialize the request body object - */ - public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); - - return httpClient.newCall(request); - } - - /** - * Build an HTTP request with the given options. - * - * @param baseUrl The base URL - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param callback Callback for upload/download progress - * @return The HTTP request - * @throws com.equinix.openapi.ApiException If fail to serialize the request body object - */ - public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams - List allQueryParams = new ArrayList(queryParams); - allQueryParams.addAll(collectionQueryParams); - - final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); - - // prepare HTTP request body - RequestBody reqBody; - String contentType = headerParams.get("Content-Type"); - String contentTypePure = contentType; - if (contentTypePure != null && contentTypePure.contains(";")) { - contentTypePure = contentType.substring(0, contentType.indexOf(";")); - } - if (!HttpMethod.permitsRequestBody(method)) { - reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { - reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentTypePure)) { - reqBody = buildRequestBodyMultipart(formParams); - } else if (body == null) { - if ("DELETE".equals(method)) { - // allow calling DELETE without sending a request body - reqBody = null; - } else { - // use an empty request body (for POST, PUT and PATCH) - reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); - } - } else { - reqBody = serialize(body, contentType); - } - - // update parameters with authentication settings - updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); - - final Request.Builder reqBuilder = new Request.Builder().url(url); - processHeaderParams(headerParams, reqBuilder); - processCookieParams(cookieParams, reqBuilder); - - // Associate callback with request (if not null) so interceptor can - // access it when creating ProgressResponseBody - reqBuilder.tag(callback); - - Request request = null; - - if (callback != null && reqBody != null) { - ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); - request = reqBuilder.method(method, progressRequestBody).build(); - } else { - request = reqBuilder.method(method, reqBody).build(); - } - - return request; - } - - /** - * Build full URL by concatenating base path, the given sub path and query parameters. - * - * @param baseUrl The base URL - * @param path The sub path - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @return The full URL - */ - public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { - final StringBuilder url = new StringBuilder(); - if (baseUrl != null) { - url.append(baseUrl).append(path); - } else { - String baseURL; - if (serverIndex != null) { - if (serverIndex < 0 || serverIndex >= servers.size()) { - throw new ArrayIndexOutOfBoundsException(String.format( - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() - )); - } - baseURL = servers.get(serverIndex).URL(serverVariables); - } else { - baseURL = basePath; - } - url.append(baseURL).append(path); - } - - if (queryParams != null && !queryParams.isEmpty()) { - // support (constant) query string in `path`, e.g. "/posts?draft=1" - String prefix = path.contains("?") ? "&" : "?"; - for (Pair param : queryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())).append("=").append(escapeString(value)); - } - } - } - - if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { - String prefix = url.toString().contains("?") ? "&" : "?"; - for (Pair param : collectionQueryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - // collection query parameter value already escaped as part of parameterToPairs - url.append(escapeString(param.getName())).append("=").append(value); - } - } - } - - return url.toString(); - } - - /** - * Set header parameters to the request builder, including default headers. - * - * @param headerParams Header parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { - for (Entry param : headerParams.entrySet()) { - reqBuilder.header(param.getKey(), parameterToString(param.getValue())); - } - for (Entry header : defaultHeaderMap.entrySet()) { - if (!headerParams.containsKey(header.getKey())) { - reqBuilder.header(header.getKey(), parameterToString(header.getValue())); - } - } - } - - /** - * Set cookie parameters to the request builder, including default cookies. - * - * @param cookieParams Cookie parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { - for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - for (Entry param : defaultCookieMap.entrySet()) { - if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - } - } - - /** - * Update query and header parameters based on authentication settings. - * - * @param authNames The authentications to apply - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws com.equinix.openapi.ApiException If fails to update the parameters - */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, - Map cookieParams, String payload, String method, URI uri) throws ApiException { - for (String authName : authNames) { - Authentication auth = authentications.get(authName); - if (auth == null) { - throw new RuntimeException("Authentication undefined: " + authName); - } - auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); - } - } - - /** - * Build a form-encoding request body with the given form parameters. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyFormEncoding(Map formParams) { - okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); - for (Entry param : formParams.entrySet()) { - formBuilder.add(param.getKey(), parameterToString(param.getValue())); - } - return formBuilder.build(); - } - - /** - * Build a multipart (file uploading) request body with the given form parameters, - * which could contain text fields and file fields. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyMultipart(Map formParams) { - MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); - } else if (param.getValue() instanceof List) { - List list = (List) param.getValue(); - for (Object item: list) { - if (item instanceof File) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } - return mpBuilder.build(); - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - public String guessContentTypeFromFile(File file) { - String contentType = URLConnection.guessContentTypeFromName(file.getName()); - if (contentType == null) { - return "application/octet-stream"; - } else { - return contentType; - } - } - - /** - * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param file The file to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); - } - - /** - * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param obj The complex object to add to the Header - */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { - RequestBody requestBody; - if (obj instanceof String) { - requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); - } else { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - requestBody = RequestBody.create(content, MediaType.parse("application/json")); - } - - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); - mpBuilder.addPart(partHeaders, requestBody); - } - - /** - * Get network interceptor to add it to the httpClient to track download progress for - * async requests. - */ - private Interceptor getProgressInterceptor() { - return new Interceptor() { - @Override - public Response intercept(Interceptor.Chain chain) throws IOException { - final Request request = chain.request(); - final Response originalResponse = chain.proceed(request); - if (request.tag() instanceof ApiCallback) { - final ApiCallback callback = (ApiCallback) request.tag(); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), callback)) - .build(); - } - return originalResponse; - } - }; - } - - /** - * Apply SSL related settings to httpClient according to the current values of - * verifyingSsl and sslCaCert. - */ - private void applySslSettings() { - try { - TrustManager[] trustManagers; - HostnameVerifier hostnameVerifier; - if (!verifyingSsl) { - trustManagers = new TrustManager[]{ - new X509TrustManager() { - @Override - public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return new java.security.cert.X509Certificate[]{}; - } - } - }; - hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - } else { - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - - if (sslCaCert == null) { - trustManagerFactory.init((KeyStore) null); - } else { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + (index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - trustManagerFactory.init(caKeyStore); - } - trustManagers = trustManagerFactory.getTrustManagers(); - hostnameVerifier = OkHostnameVerifier.INSTANCE; - } - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = httpClient.newBuilder() - .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) - .hostnameVerifier(hostnameVerifier) - .build(); - } catch (GeneralSecurityException e) { - throw new RuntimeException(e); - } - } - - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { - try { - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - keyStore.load(null, password); - return keyStore; - } catch (IOException e) { - throw new AssertionError(e); - } - } - - /** - * Convert the HTTP request body to a string. - * - * @param requestBody The HTTP request object - * @return The string representation of the HTTP request body - * @throws com.equinix.openapi.ApiException If fail to serialize the request body object into a string - */ - private String requestBodyToString(RequestBody requestBody) throws ApiException { - if (requestBody != null) { - try { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return buffer.readUtf8(); - } catch (final IOException e) { - throw new ApiException(e); - } - } - - // empty http request body - return ""; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiException.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiException.java deleted file mode 100644 index 6fcd40fef..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiException.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import java.util.Map; -import java.util.List; - - -/** - *

ApiException class.

- */ -@SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiException extends Exception { - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - - /** - *

Constructor for ApiException.

- */ - public ApiException() {} - - /** - *

Constructor for ApiException.

- * - * @param throwable a {@link java.lang.Throwable} object - */ - public ApiException(Throwable throwable) { - super(throwable); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - */ - public ApiException(String message) { - super(message); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(String message, int code, Map> responseHeaders, String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - */ - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, Map> responseHeaders, String responseBody) { - this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message a {@link java.lang.String} object - */ - public ApiException(int code, String message) { - super(message); - this.code = code; - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message the error message - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, String message, Map> responseHeaders, String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } - - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } - - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } - - /** - * Get the exception message including HTTP response data. - * - * @return The exception message - */ - public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", - super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiResponse.java deleted file mode 100644 index ad781a5a5..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ApiResponse.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import java.util.List; -import java.util.Map; - -/** - * API response returned by API call. - */ -public class ApiResponse { - final private int statusCode; - final private Map> headers; - final private T data; - - /** - *

Constructor for ApiResponse.

- * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - */ - public ApiResponse(int statusCode, Map> headers) { - this(statusCode, headers, null); - } - - /** - *

Constructor for ApiResponse.

- * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - * @param data The object deserialized from response bod - */ - public ApiResponse(int statusCode, Map> headers, T data) { - this.statusCode = statusCode; - this.headers = headers; - this.data = data; - } - - /** - *

Get the status code.

- * - * @return the status code - */ - public int getStatusCode() { - return statusCode; - } - - /** - *

Get the headers.

- * - * @return a {@link java.util.Map} of headers - */ - public Map> getHeaders() { - return headers; - } - - /** - *

Get the data.

- * - * @return the data - */ - public T getData() { - return data; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/Configuration.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/Configuration.java deleted file mode 100644 index 78501ea4a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/Configuration.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Configuration { - public static final String VERSION = "0.10.1"; - - private static ApiClient defaultApiClient = new ApiClient(); - - /** - * Get the default API client, which would be used when creating API - * instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - return defaultApiClient; - } - - /** - * Set the default API client, which would be used when creating API - * instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/GzipRequestInterceptor.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/GzipRequestInterceptor.java deleted file mode 100644 index 4f4e45c2b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/GzipRequestInterceptor.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import okhttp3.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -import java.io.IOException; - -/** - * Encodes request bodies using gzip. - * - * Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - @Override - public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = originalRequest.newBuilder() - .header("Content-Encoding", "gzip") - .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override - public MediaType contentType() { - return body.contentType(); - } - - @Override - public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/JSON.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/JSON.java deleted file mode 100644 index 70a5177b2..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/JSON.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonElement; -import io.gsonfire.GsonFireBuilder; -import io.gsonfire.TypeSelector; - -import okio.ByteString; - -import java.io.IOException; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.Locale; -import java.util.Map; -import java.util.HashMap; - -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ -public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - ; - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ActivateHardwareReservationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Address.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Attribute.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.AttributeData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.AuthToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.AuthTokenInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.AuthTokenList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.AuthTokenProject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.AuthTokenUser.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BGPSessionInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Batch.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BatchesList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpConfigRequestInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpDynamicNeighbor.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpDynamicNeighborCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpDynamicNeighborList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpNeighborData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpRoute.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpSession.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpSessionList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BgpSessionNeighbors.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.BondPortData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CapacityCheckPerFacilityInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CapacityCheckPerFacilityList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CapacityCheckPerMetroInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CapacityCheckPerMetroList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CapacityInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CapacityLevelPerBaremetal.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CapacityList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Component.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Coordinates.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CreateDeviceRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CreateEmailInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CreateMetalGatewayRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CreateOrganizationInterconnectionRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CreateSelfServiceReservationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.CreateSelfServiceReservationRequestPeriod.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DedicatedPortCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Device.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceActionInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceActionsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceCreateInFacilityInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceCreateInMetroInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceCreatedBy.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceHealthRollup.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceMetro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceProject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceProjectLite.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceUsage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.DeviceUsageList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Disk.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Email.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.EmailInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Entitlement.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Error.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Event.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.EventList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FabricServiceToken.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Facility.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FacilityInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FacilityList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Filesystem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FindIPAddressById200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FindMetalGatewayById200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FindTrafficTimeframeParameter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FirmwareSet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FirmwareSetListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.FirmwareSetResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.GlobalBgpRange.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.GlobalBgpRangeList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.HardwareReservation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.HardwareReservationList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Href.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPAddress.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPAssignment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPAssignmentInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPAssignmentList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPAssignmentMetro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPAssignmentUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPAvailabilitiesList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPReservation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPReservationFacility.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPReservationList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPReservationListIpAddressesInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPReservationMetro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPReservationOrHref.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.IPReservationRequestInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InstancesBatchCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InstancesBatchCreateInputBatchesInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Interconnection.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InterconnectionList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InterconnectionPort.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InterconnectionPortList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InterconnectionUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Invitation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InvitationInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InvitationList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Invoice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.InvoiceList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.License.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.LicenseCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.LicenseList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.LicenseUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.LineItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Membership.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MembershipInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MembershipList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Meta.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Metadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetadataNetwork.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetadataNetworkNetwork.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetadataNetworkNetworkBonding.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetalGateway.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetalGatewayCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetalGatewayElasticIpCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetalGatewayList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetalGatewayListMetalGatewaysInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetalGatewayLite.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Metro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetroInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MetroList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Mount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.MoveHardwareReservationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.NewPassword.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.OperatingSystem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.OperatingSystemList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Organization.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.OrganizationInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.OrganizationList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ParentBlock.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Partition.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PaymentMethod.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PaymentMethodBillingAddress.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PaymentMethodCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PaymentMethodList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PaymentMethodUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Plan.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanAvailableInInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanAvailableInInnerPrice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanAvailableInMetrosInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanSpecs.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanSpecsCpusInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanSpecsDrivesInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanSpecsFeatures.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanSpecsMemory.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PlanSpecsNicsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Port.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortAssignInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortConvertLayer3Input.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortConvertLayer3InputRequestIpsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortVlanAssignment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatch.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchVlanAssignmentsInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.PortVlanAssignmentList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Project.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ProjectCreateFromRootInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ProjectCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ProjectIdName.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ProjectList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ProjectUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ProjectUsage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ProjectUsageList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Raid.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.RecoveryCodeList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.RequestIPReservation201Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.RequestIPReservationRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SSHKey.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SSHKeyCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SSHKeyInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SSHKeyList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SelfServiceReservationItemRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SelfServiceReservationItemResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SelfServiceReservationList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SelfServiceReservationResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.ServerInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotMarketPricesList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotMarketPricesPerMetroList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotMarketPricesPerMetroReport.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotMarketRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotMarketRequestCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotMarketRequestCreateInputInstanceParameters.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotMarketRequestList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotMarketRequestMetro.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotPricesDatapoints.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotPricesHistoryReport.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotPricesPerBaremetal.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotPricesPerFacility.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotPricesPerNewFacility.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SpotPricesReport.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Storage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.SupportRequestInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.TransferRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.TransferRequestInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.TransferRequestList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.UpdateEmailInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.User.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.UserCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.UserLimited.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.UserList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.UserLite.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.UserUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Userdata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VerifyEmail.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VirtualCircuit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VirtualCircuitCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VirtualCircuitList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VirtualCircuitUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VirtualNetwork.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VirtualNetworkCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VirtualNetworkList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VlanFabricVcCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VlanVirtualCircuit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VlanVirtualCircuitCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VlanVirtualCircuitUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.Vrf.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfFabricVcCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfIpReservation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfIpReservationCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfIpReservationList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfIpReservationOrHref.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfMetalGateway.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfMetalGatewayCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfRoute.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfRouteCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfRouteList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfRouteUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfUpdateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfVirtualCircuit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfVirtualCircuitCreateInput.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.metal.v1.model.VrfVirtualCircuitUpdateInput.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** - * Gson TypeAdapter for Byte Array type - */ - public static class ByteArrayAdapter extends TypeAdapter { - - @Override - public void write(JsonWriter out, byte[] value) throws IOException { - if (value == null) { - out.nullValue(); - } else { - out.value(ByteString.of(value).base64()); - } - } - - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } - } - - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ - public static class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } - - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } - - /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() {} - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() {} - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } - - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/Pair.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/Pair.java deleted file mode 100644 index 6caa08200..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/Pair.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Pair { - private String name = ""; - private String value = ""; - - public Pair (String name, String value) { - setName(name); - setValue(value); - } - - private void setName(String name) { - if (!isValidString(name)) { - return; - } - - this.name = name; - } - - private void setValue(String value) { - if (!isValidString(value)) { - return; - } - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - return true; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ProgressRequestBody.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ProgressRequestBody.java deleted file mode 100644 index 56a6eee7f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ProgressRequestBody.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import okhttp3.MediaType; -import okhttp3.RequestBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSink; -import okio.ForwardingSink; -import okio.Okio; -import okio.Sink; - -public class ProgressRequestBody extends RequestBody { - - private final RequestBody requestBody; - - private final ApiCallback callback; - - public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { - this.requestBody = requestBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() throws IOException { - return requestBody.contentLength(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink bufferedSink = Okio.buffer(sink(sink)); - requestBody.writeTo(bufferedSink); - bufferedSink.flush(); - } - - private Sink sink(Sink sink) { - return new ForwardingSink(sink) { - - long bytesWritten = 0L; - long contentLength = 0L; - - @Override - public void write(Buffer source, long byteCount) throws IOException { - super.write(source, byteCount); - if (contentLength == 0) { - contentLength = contentLength(); - } - - bytesWritten += byteCount; - callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); - } - }; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ProgressResponseBody.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ProgressResponseBody.java deleted file mode 100644 index f15fd7710..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ProgressResponseBody.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import okhttp3.MediaType; -import okhttp3.ResponseBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSource; -import okio.ForwardingSource; -import okio.Okio; -import okio.Source; - -public class ProgressResponseBody extends ResponseBody { - - private final ResponseBody responseBody; - private final ApiCallback callback; - private BufferedSource bufferedSource; - - public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { - this.responseBody = responseBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return responseBody.contentType(); - } - - @Override - public long contentLength() { - return responseBody.contentLength(); - } - - @Override - public BufferedSource source() { - if (bufferedSource == null) { - bufferedSource = Okio.buffer(source(responseBody.source())); - } - return bufferedSource; - } - - private Source source(Source source) { - return new ForwardingSource(source) { - long totalBytesRead = 0L; - - @Override - public long read(Buffer sink, long byteCount) throws IOException { - long bytesRead = super.read(sink, byteCount); - // read() returns the number of bytes read, or -1 if this source is exhausted. - totalBytesRead += bytesRead != -1 ? bytesRead : 0; - callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); - return bytesRead; - } - }; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerConfiguration.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerConfiguration.java deleted file mode 100644 index 1d7908cdb..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.equinix.openapi; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replace("{" + name + "}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerVariable.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerVariable.java deleted file mode 100644 index 0272a5f47..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/ServerVariable.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.equinix.openapi; - -import java.util.HashSet; - -/** - * Representing a Server Variable for server URL template substitution. - */ -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/StringUtil.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/StringUtil.java deleted file mode 100644 index e0721393b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/StringUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi; - -import java.util.Collection; -import java.util.Iterator; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

- * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/ApiKeyAuth.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/ApiKeyAuth.java deleted file mode 100644 index 9df91f989..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/ApiKeyAuth.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.auth; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; - - private String apiKey; - private String apiKeyPrefix; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public String getApiKeyPrefix() { - return apiKeyPrefix; - } - - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } else if ("cookie".equals(location)) { - cookieParams.put(paramName, value); - } - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/Authentication.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/Authentication.java deleted file mode 100644 index 79fba331f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/Authentication.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.auth; - -import com.equinix.openapi.Pair; -import com.equinix.openapi.ApiException; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws ApiException if failed to update the parameters - */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/HttpBasicAuth.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/HttpBasicAuth.java deleted file mode 100644 index b0bae6b51..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/HttpBasicAuth.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.auth; - -import com.equinix.openapi.Pair; -import com.equinix.openapi.ApiException; - -import okhttp3.Credentials; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -import java.io.UnsupportedEncodingException; - -public class HttpBasicAuth implements Authentication { - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (username == null && password == null) { - return; - } - headerParams.put("Authorization", Credentials.basic( - username == null ? "" : username, - password == null ? "" : password)); - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/HttpBearerAuth.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/HttpBearerAuth.java deleted file mode 100644 index 6fb705919..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/auth/HttpBearerAuth.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.auth; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HttpBearerAuth implements Authentication { - private final String scheme; - private String bearerToken; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return bearerToken; - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (bearerToken == null) { - return; - } - - headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/AuthenticationApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/AuthenticationApi.java deleted file mode 100644 index 167ea5512..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/AuthenticationApi.java +++ /dev/null @@ -1,905 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.AuthToken; -import com.equinix.openapi.metal.v1.model.AuthTokenInput; -import com.equinix.openapi.metal.v1.model.AuthTokenList; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AuthenticationApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AuthenticationApi() { - this(Configuration.getDefaultApiClient()); - } - - public AuthenticationApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createAPIKey - * @param authTokenInput API key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createAPIKeyCall(AuthTokenInput authTokenInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = authTokenInput; - - // create path and map variables - String localVarPath = "/user/api-keys"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createAPIKeyValidateBeforeCall(AuthTokenInput authTokenInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'authTokenInput' is set - if (authTokenInput == null) { - throw new ApiException("Missing the required parameter 'authTokenInput' when calling createAPIKey(Async)"); - } - - return createAPIKeyCall(authTokenInput, include, _callback); - - } - - /** - * Create an API key - * Creates a API key for the current user. - * @param authTokenInput API key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return AuthToken - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public AuthToken createAPIKey(AuthTokenInput authTokenInput, List include) throws ApiException { - ApiResponse localVarResp = createAPIKeyWithHttpInfo(authTokenInput, include); - return localVarResp.getData(); - } - - /** - * Create an API key - * Creates a API key for the current user. - * @param authTokenInput API key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<AuthToken> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createAPIKeyWithHttpInfo(AuthTokenInput authTokenInput, List include) throws ApiException { - okhttp3.Call localVarCall = createAPIKeyValidateBeforeCall(authTokenInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an API key (asynchronously) - * Creates a API key for the current user. - * @param authTokenInput API key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createAPIKeyAsync(AuthTokenInput authTokenInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createAPIKeyValidateBeforeCall(authTokenInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createProjectAPIKey - * @param id Project UUID (required) - * @param authTokenInput API Key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectAPIKeyCall(UUID id, AuthTokenInput authTokenInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = authTokenInput; - - // create path and map variables - String localVarPath = "/projects/{id}/api-keys" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createProjectAPIKeyValidateBeforeCall(UUID id, AuthTokenInput authTokenInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createProjectAPIKey(Async)"); - } - - // verify the required parameter 'authTokenInput' is set - if (authTokenInput == null) { - throw new ApiException("Missing the required parameter 'authTokenInput' when calling createProjectAPIKey(Async)"); - } - - return createProjectAPIKeyCall(id, authTokenInput, include, _callback); - - } - - /** - * Create an API key for a project. - * Creates an API key for a project. - * @param id Project UUID (required) - * @param authTokenInput API Key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return AuthToken - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public AuthToken createProjectAPIKey(UUID id, AuthTokenInput authTokenInput, List include) throws ApiException { - ApiResponse localVarResp = createProjectAPIKeyWithHttpInfo(id, authTokenInput, include); - return localVarResp.getData(); - } - - /** - * Create an API key for a project. - * Creates an API key for a project. - * @param id Project UUID (required) - * @param authTokenInput API Key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<AuthToken> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createProjectAPIKeyWithHttpInfo(UUID id, AuthTokenInput authTokenInput, List include) throws ApiException { - okhttp3.Call localVarCall = createProjectAPIKeyValidateBeforeCall(id, authTokenInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an API key for a project. (asynchronously) - * Creates an API key for a project. - * @param id Project UUID (required) - * @param authTokenInput API Key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectAPIKeyAsync(UUID id, AuthTokenInput authTokenInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createProjectAPIKeyValidateBeforeCall(id, authTokenInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteAPIKey - * @param id API Key UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deleteAPIKeyCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/api-keys/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAPIKeyValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteAPIKey(Async)"); - } - - return deleteAPIKeyCall(id, _callback); - - } - - /** - * Delete the API key - * Deletes the API key. - * @param id API Key UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public void deleteAPIKey(UUID id) throws ApiException { - deleteAPIKeyWithHttpInfo(id); - } - - /** - * Delete the API key - * Deletes the API key. - * @param id API Key UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public ApiResponse deleteAPIKeyWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteAPIKeyValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the API key (asynchronously) - * Deletes the API key. - * @param id API Key UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deleteAPIKeyAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteAPIKeyValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteUserAPIKey - * @param id API Key UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deleteUserAPIKeyCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/api-keys/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteUserAPIKeyValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteUserAPIKey(Async)"); - } - - return deleteUserAPIKeyCall(id, _callback); - - } - - /** - * Delete the API key - * Deletes the current user API key. - * @param id API Key UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public void deleteUserAPIKey(UUID id) throws ApiException { - deleteUserAPIKeyWithHttpInfo(id); - } - - /** - * Delete the API key - * Deletes the current user API key. - * @param id API Key UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public ApiResponse deleteUserAPIKeyWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteUserAPIKeyValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the API key (asynchronously) - * Deletes the current user API key. - * @param id API Key UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deleteUserAPIKeyAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteUserAPIKeyValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findAPIKeys - * @param search Search by description (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findAPIKeysCall(String search, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/api-keys"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findAPIKeysValidateBeforeCall(String search, List include, final ApiCallback _callback) throws ApiException { - return findAPIKeysCall(search, include, _callback); - - } - - /** - * Retrieve all user API keys - * Returns all API keys for the current user. - * @param search Search by description (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return AuthTokenList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public AuthTokenList findAPIKeys(String search, List include) throws ApiException { - ApiResponse localVarResp = findAPIKeysWithHttpInfo(search, include); - return localVarResp.getData(); - } - - /** - * Retrieve all user API keys - * Returns all API keys for the current user. - * @param search Search by description (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<AuthTokenList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findAPIKeysWithHttpInfo(String search, List include) throws ApiException { - okhttp3.Call localVarCall = findAPIKeysValidateBeforeCall(search, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all user API keys (asynchronously) - * Returns all API keys for the current user. - * @param search Search by description (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findAPIKeysAsync(String search, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findAPIKeysValidateBeforeCall(search, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectAPIKeys - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findProjectAPIKeysCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/api-keys" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectAPIKeysValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectAPIKeys(Async)"); - } - - return findProjectAPIKeysCall(id, include, _callback); - - } - - /** - * Retrieve all API keys for the project. - * Returns all API keys for a specific project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return AuthTokenList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public AuthTokenList findProjectAPIKeys(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findProjectAPIKeysWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve all API keys for the project. - * Returns all API keys for a specific project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<AuthTokenList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findProjectAPIKeysWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findProjectAPIKeysValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all API keys for the project. (asynchronously) - * Returns all API keys for a specific project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findProjectAPIKeysAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectAPIKeysValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BatchesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BatchesApi.java deleted file mode 100644 index 52f013644..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BatchesApi.java +++ /dev/null @@ -1,645 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Batch; -import com.equinix.openapi.metal.v1.model.BatchesList; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.InstancesBatchCreateInput; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class BatchesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public BatchesApi() { - this(Configuration.getDefaultApiClient()); - } - - public BatchesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createDeviceBatch - * @param id Project UUID (required) - * @param instancesBatchCreateInput Batches to create (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createDeviceBatchCall(UUID id, InstancesBatchCreateInput instancesBatchCreateInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = instancesBatchCreateInput; - - // create path and map variables - String localVarPath = "/projects/{id}/devices/batch" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createDeviceBatchValidateBeforeCall(UUID id, InstancesBatchCreateInput instancesBatchCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createDeviceBatch(Async)"); - } - - // verify the required parameter 'instancesBatchCreateInput' is set - if (instancesBatchCreateInput == null) { - throw new ApiException("Missing the required parameter 'instancesBatchCreateInput' when calling createDeviceBatch(Async)"); - } - - return createDeviceBatchCall(id, instancesBatchCreateInput, _callback); - - } - - /** - * Create a devices batch - * Creates new devices in batch and provisions them in our datacenter. - * @param id Project UUID (required) - * @param instancesBatchCreateInput Batches to create (required) - * @return BatchesList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public BatchesList createDeviceBatch(UUID id, InstancesBatchCreateInput instancesBatchCreateInput) throws ApiException { - ApiResponse localVarResp = createDeviceBatchWithHttpInfo(id, instancesBatchCreateInput); - return localVarResp.getData(); - } - - /** - * Create a devices batch - * Creates new devices in batch and provisions them in our datacenter. - * @param id Project UUID (required) - * @param instancesBatchCreateInput Batches to create (required) - * @return ApiResponse<BatchesList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createDeviceBatchWithHttpInfo(UUID id, InstancesBatchCreateInput instancesBatchCreateInput) throws ApiException { - okhttp3.Call localVarCall = createDeviceBatchValidateBeforeCall(id, instancesBatchCreateInput, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a devices batch (asynchronously) - * Creates new devices in batch and provisions them in our datacenter. - * @param id Project UUID (required) - * @param instancesBatchCreateInput Batches to create (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createDeviceBatchAsync(UUID id, InstancesBatchCreateInput instancesBatchCreateInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createDeviceBatchValidateBeforeCall(id, instancesBatchCreateInput, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteBatch - * @param id Batch UUID (required) - * @param removeAssociatedInstances Delete all instances created from this batch (optional, default to false) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteBatchCall(UUID id, Boolean removeAssociatedInstances, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/batches/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (removeAssociatedInstances != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("remove_associated_instances", removeAssociatedInstances)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteBatchValidateBeforeCall(UUID id, Boolean removeAssociatedInstances, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteBatch(Async)"); - } - - return deleteBatchCall(id, removeAssociatedInstances, _callback); - - } - - /** - * Delete the Batch - * Deletes the Batch. - * @param id Batch UUID (required) - * @param removeAssociatedInstances Delete all instances created from this batch (optional, default to false) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
403 forbidden -
404 not found -
- */ - public void deleteBatch(UUID id, Boolean removeAssociatedInstances) throws ApiException { - deleteBatchWithHttpInfo(id, removeAssociatedInstances); - } - - /** - * Delete the Batch - * Deletes the Batch. - * @param id Batch UUID (required) - * @param removeAssociatedInstances Delete all instances created from this batch (optional, default to false) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteBatchWithHttpInfo(UUID id, Boolean removeAssociatedInstances) throws ApiException { - okhttp3.Call localVarCall = deleteBatchValidateBeforeCall(id, removeAssociatedInstances, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the Batch (asynchronously) - * Deletes the Batch. - * @param id Batch UUID (required) - * @param removeAssociatedInstances Delete all instances created from this batch (optional, default to false) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteBatchAsync(UUID id, Boolean removeAssociatedInstances, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteBatchValidateBeforeCall(id, removeAssociatedInstances, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findBatchById - * @param id Batch UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findBatchByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/batches/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findBatchByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findBatchById(Async)"); - } - - return findBatchByIdCall(id, include, _callback); - - } - - /** - * Retrieve a Batch - * Returns a Batch - * @param id Batch UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Batch - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public Batch findBatchById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findBatchByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve a Batch - * Returns a Batch - * @param id Batch UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Batch> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findBatchByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findBatchByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a Batch (asynchronously) - * Returns a Batch - * @param id Batch UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findBatchByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findBatchByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findBatchesByProject - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findBatchesByProjectCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/batches" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findBatchesByProjectValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findBatchesByProject(Async)"); - } - - return findBatchesByProjectCall(id, include, _callback); - - } - - /** - * Retrieve all batches by project - * Returns all batches for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return BatchesList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public BatchesList findBatchesByProject(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findBatchesByProjectWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve all batches by project - * Returns all batches for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<BatchesList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findBatchesByProjectWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findBatchesByProjectValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all batches by project (asynchronously) - * Returns all batches for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findBatchesByProjectAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findBatchesByProjectValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BgpApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BgpApi.java deleted file mode 100644 index 86338c78f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/BgpApi.java +++ /dev/null @@ -1,1062 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.BgpConfig; -import com.equinix.openapi.metal.v1.model.BgpConfigRequestInput; -import com.equinix.openapi.metal.v1.model.BgpSession; -import com.equinix.openapi.metal.v1.model.BgpSessionList; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.GlobalBgpRangeList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class BgpApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public BgpApi() { - this(Configuration.getDefaultApiClient()); - } - - public BgpApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for deleteBgpSession - * @param id BGP session UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteBgpSessionCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/bgp/sessions/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteBgpSessionValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteBgpSession(Async)"); - } - - return deleteBgpSessionCall(id, _callback); - - } - - /** - * Delete the BGP session - * Deletes the BGP session. - * @param id BGP session UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteBgpSession(UUID id) throws ApiException { - deleteBgpSessionWithHttpInfo(id); - } - - /** - * Delete the BGP session - * Deletes the BGP session. - * @param id BGP session UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteBgpSessionWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteBgpSessionValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the BGP session (asynchronously) - * Deletes the BGP session. - * @param id BGP session UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteBgpSessionAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteBgpSessionValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findBgpConfigByProject - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok When BGP configuration is not enabled empty structure is returned. When BGP configuration is disabled after being enabled BGP configuration data is returned with status disabled. -
401 unauthorized -
403 forbidden -
404 not found The project was not found. -
- */ - public okhttp3.Call findBgpConfigByProjectCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/bgp-config" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findBgpConfigByProjectValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findBgpConfigByProject(Async)"); - } - - return findBgpConfigByProjectCall(id, include, _callback); - - } - - /** - * Retrieve a bgp config - * Returns a bgp config - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return BgpConfig - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok When BGP configuration is not enabled empty structure is returned. When BGP configuration is disabled after being enabled BGP configuration data is returned with status disabled. -
401 unauthorized -
403 forbidden -
404 not found The project was not found. -
- */ - public BgpConfig findBgpConfigByProject(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findBgpConfigByProjectWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve a bgp config - * Returns a bgp config - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<BgpConfig> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok When BGP configuration is not enabled empty structure is returned. When BGP configuration is disabled after being enabled BGP configuration data is returned with status disabled. -
401 unauthorized -
403 forbidden -
404 not found The project was not found. -
- */ - public ApiResponse findBgpConfigByProjectWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findBgpConfigByProjectValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a bgp config (asynchronously) - * Returns a bgp config - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok When BGP configuration is not enabled empty structure is returned. When BGP configuration is disabled after being enabled BGP configuration data is returned with status disabled. -
401 unauthorized -
403 forbidden -
404 not found The project was not found. -
- */ - public okhttp3.Call findBgpConfigByProjectAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findBgpConfigByProjectValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findBgpSessionById - * @param id BGP session UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findBgpSessionByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/bgp/sessions/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findBgpSessionByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findBgpSessionById(Async)"); - } - - return findBgpSessionByIdCall(id, include, _callback); - - } - - /** - * Retrieve a BGP session - * Returns a BGP session - * @param id BGP session UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return BgpSession - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public BgpSession findBgpSessionById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findBgpSessionByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve a BGP session - * Returns a BGP session - * @param id BGP session UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<BgpSession> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findBgpSessionByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findBgpSessionByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a BGP session (asynchronously) - * Returns a BGP session - * @param id BGP session UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findBgpSessionByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findBgpSessionByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findGlobalBgpRanges - * @param id Project UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findGlobalBgpRangesCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/global-bgp-ranges" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findGlobalBgpRangesValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findGlobalBgpRanges(Async)"); - } - - return findGlobalBgpRangesCall(id, _callback); - - } - - /** - * Retrieve all global bgp ranges - * Returns all global bgp ranges for a project - * @param id Project UUID (required) - * @return GlobalBgpRangeList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public GlobalBgpRangeList findGlobalBgpRanges(UUID id) throws ApiException { - ApiResponse localVarResp = findGlobalBgpRangesWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve all global bgp ranges - * Returns all global bgp ranges for a project - * @param id Project UUID (required) - * @return ApiResponse<GlobalBgpRangeList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findGlobalBgpRangesWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findGlobalBgpRangesValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all global bgp ranges (asynchronously) - * Returns all global bgp ranges for a project - * @param id Project UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findGlobalBgpRangesAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findGlobalBgpRangesValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectBgpSessions - * @param id Project UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findProjectBgpSessionsCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/bgp/sessions" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectBgpSessionsValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectBgpSessions(Async)"); - } - - return findProjectBgpSessionsCall(id, _callback); - - } - - /** - * Retrieve all BGP sessions for project - * Provides a listing of available BGP sessions for the project. - * @param id Project UUID (required) - * @return BgpSessionList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public BgpSessionList findProjectBgpSessions(UUID id) throws ApiException { - ApiResponse localVarResp = findProjectBgpSessionsWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve all BGP sessions for project - * Provides a listing of available BGP sessions for the project. - * @param id Project UUID (required) - * @return ApiResponse<BgpSessionList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findProjectBgpSessionsWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findProjectBgpSessionsValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all BGP sessions for project (asynchronously) - * Provides a listing of available BGP sessions for the project. - * @param id Project UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findProjectBgpSessionsAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectBgpSessionsValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for requestBgpConfig - * @param id Project UUID (required) - * @param bgpConfigRequestInput BGP config Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call requestBgpConfigCall(UUID id, BgpConfigRequestInput bgpConfigRequestInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = bgpConfigRequestInput; - - // create path and map variables - String localVarPath = "/projects/{id}/bgp-configs" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call requestBgpConfigValidateBeforeCall(UUID id, BgpConfigRequestInput bgpConfigRequestInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling requestBgpConfig(Async)"); - } - - // verify the required parameter 'bgpConfigRequestInput' is set - if (bgpConfigRequestInput == null) { - throw new ApiException("Missing the required parameter 'bgpConfigRequestInput' when calling requestBgpConfig(Async)"); - } - - return requestBgpConfigCall(id, bgpConfigRequestInput, include, _callback); - - } - - /** - * Requesting bgp config - * Requests to enable bgp configuration for a project. - * @param id Project UUID (required) - * @param bgpConfigRequestInput BGP config Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public void requestBgpConfig(UUID id, BgpConfigRequestInput bgpConfigRequestInput, List include) throws ApiException { - requestBgpConfigWithHttpInfo(id, bgpConfigRequestInput, include); - } - - /** - * Requesting bgp config - * Requests to enable bgp configuration for a project. - * @param id Project UUID (required) - * @param bgpConfigRequestInput BGP config Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse requestBgpConfigWithHttpInfo(UUID id, BgpConfigRequestInput bgpConfigRequestInput, List include) throws ApiException { - okhttp3.Call localVarCall = requestBgpConfigValidateBeforeCall(id, bgpConfigRequestInput, include, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Requesting bgp config (asynchronously) - * Requests to enable bgp configuration for a project. - * @param id Project UUID (required) - * @param bgpConfigRequestInput BGP config Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call requestBgpConfigAsync(UUID id, BgpConfigRequestInput bgpConfigRequestInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = requestBgpConfigValidateBeforeCall(id, bgpConfigRequestInput, include, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for updateBgpSession - * @param id BGP session UUID (required) - * @param body Default route (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateBgpSessionCall(UUID id, Boolean body, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/bgp/sessions/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateBgpSessionValidateBeforeCall(UUID id, Boolean body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateBgpSession(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling updateBgpSession(Async)"); - } - - return updateBgpSessionCall(id, body, _callback); - - } - - /** - * Update the BGP session - * Updates the BGP session by either enabling or disabling the default route functionality. - * @param id BGP session UUID (required) - * @param body Default route (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public void updateBgpSession(UUID id, Boolean body) throws ApiException { - updateBgpSessionWithHttpInfo(id, body); - } - - /** - * Update the BGP session - * Updates the BGP session by either enabling or disabling the default route functionality. - * @param id BGP session UUID (required) - * @param body Default route (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateBgpSessionWithHttpInfo(UUID id, Boolean body) throws ApiException { - okhttp3.Call localVarCall = updateBgpSessionValidateBeforeCall(id, body, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Update the BGP session (asynchronously) - * Updates the BGP session by either enabling or disabling the default route functionality. - * @param id BGP session UUID (required) - * @param body Default route (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateBgpSessionAsync(UUID id, Boolean body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateBgpSessionValidateBeforeCall(id, body, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/CapacityApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/CapacityApi.java deleted file mode 100644 index cc6f65a74..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/CapacityApi.java +++ /dev/null @@ -1,847 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.CapacityCheckPerFacilityList; -import com.equinix.openapi.metal.v1.model.CapacityCheckPerMetroList; -import com.equinix.openapi.metal.v1.model.CapacityInput; -import com.equinix.openapi.metal.v1.model.CapacityList; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CapacityApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CapacityApi() { - this(Configuration.getDefaultApiClient()); - } - - public CapacityApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for checkCapacityForFacility - * @param capacityInput Facility to check capacity in (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- * @deprecated - */ - @Deprecated - public okhttp3.Call checkCapacityForFacilityCall(CapacityInput capacityInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = capacityInput; - - // create path and map variables - String localVarPath = "/capacity"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call checkCapacityForFacilityValidateBeforeCall(CapacityInput capacityInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'capacityInput' is set - if (capacityInput == null) { - throw new ApiException("Missing the required parameter 'capacityInput' when calling checkCapacityForFacility(Async)"); - } - - return checkCapacityForFacilityCall(capacityInput, _callback); - - } - - /** - * Check capacity - * Validates if a deploy can be fulfilled. - * @param capacityInput Facility to check capacity in (required) - * @return CapacityCheckPerFacilityList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- * @deprecated - */ - @Deprecated - public CapacityCheckPerFacilityList checkCapacityForFacility(CapacityInput capacityInput) throws ApiException { - ApiResponse localVarResp = checkCapacityForFacilityWithHttpInfo(capacityInput); - return localVarResp.getData(); - } - - /** - * Check capacity - * Validates if a deploy can be fulfilled. - * @param capacityInput Facility to check capacity in (required) - * @return ApiResponse<CapacityCheckPerFacilityList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- * @deprecated - */ - @Deprecated - public ApiResponse checkCapacityForFacilityWithHttpInfo(CapacityInput capacityInput) throws ApiException { - okhttp3.Call localVarCall = checkCapacityForFacilityValidateBeforeCall(capacityInput, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Check capacity (asynchronously) - * Validates if a deploy can be fulfilled. - * @param capacityInput Facility to check capacity in (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- * @deprecated - */ - @Deprecated - public okhttp3.Call checkCapacityForFacilityAsync(CapacityInput capacityInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = checkCapacityForFacilityValidateBeforeCall(capacityInput, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for checkCapacityForMetro - * @param capacityInput Metro to check capacity in (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call checkCapacityForMetroCall(CapacityInput capacityInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = capacityInput; - - // create path and map variables - String localVarPath = "/capacity/metros"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call checkCapacityForMetroValidateBeforeCall(CapacityInput capacityInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'capacityInput' is set - if (capacityInput == null) { - throw new ApiException("Missing the required parameter 'capacityInput' when calling checkCapacityForMetro(Async)"); - } - - return checkCapacityForMetroCall(capacityInput, _callback); - - } - - /** - * Check capacity for a metro - * Validates if a deploy can be fulfilled in a metro. - * @param capacityInput Metro to check capacity in (required) - * @return CapacityCheckPerMetroList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public CapacityCheckPerMetroList checkCapacityForMetro(CapacityInput capacityInput) throws ApiException { - ApiResponse localVarResp = checkCapacityForMetroWithHttpInfo(capacityInput); - return localVarResp.getData(); - } - - /** - * Check capacity for a metro - * Validates if a deploy can be fulfilled in a metro. - * @param capacityInput Metro to check capacity in (required) - * @return ApiResponse<CapacityCheckPerMetroList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse checkCapacityForMetroWithHttpInfo(CapacityInput capacityInput) throws ApiException { - okhttp3.Call localVarCall = checkCapacityForMetroValidateBeforeCall(capacityInput, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Check capacity for a metro (asynchronously) - * Validates if a deploy can be fulfilled in a metro. - * @param capacityInput Metro to check capacity in (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call checkCapacityForMetroAsync(CapacityInput capacityInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = checkCapacityForMetroValidateBeforeCall(capacityInput, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findCapacityForFacility - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findCapacityForFacilityCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/capacity"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findCapacityForFacilityValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return findCapacityForFacilityCall(_callback); - - } - - /** - * View capacity - * Returns a list of facilities and plans with their current capacity. - * @return CapacityList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public CapacityList findCapacityForFacility() throws ApiException { - ApiResponse localVarResp = findCapacityForFacilityWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * View capacity - * Returns a list of facilities and plans with their current capacity. - * @return ApiResponse<CapacityList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findCapacityForFacilityWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = findCapacityForFacilityValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * View capacity (asynchronously) - * Returns a list of facilities and plans with their current capacity. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findCapacityForFacilityAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findCapacityForFacilityValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findCapacityForMetro - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findCapacityForMetroCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/capacity/metros"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findCapacityForMetroValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return findCapacityForMetroCall(_callback); - - } - - /** - * View capacity for metros - * Returns a list of metros and plans with their current capacity. - * @return CapacityList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public CapacityList findCapacityForMetro() throws ApiException { - ApiResponse localVarResp = findCapacityForMetroWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * View capacity for metros - * Returns a list of metros and plans with their current capacity. - * @return ApiResponse<CapacityList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findCapacityForMetroWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = findCapacityForMetroValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * View capacity for metros (asynchronously) - * Returns a list of metros and plans with their current capacity. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findCapacityForMetroAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findCapacityForMetroValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationCapacityPerFacility - * @param id Organization UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public okhttp3.Call findOrganizationCapacityPerFacilityCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/capacity" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationCapacityPerFacilityValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationCapacityPerFacility(Async)"); - } - - return findOrganizationCapacityPerFacilityCall(id, _callback); - - } - - /** - * View available hardware plans per Facility for given organization - * Returns a list of facilities and plans with their current capacity. - * @param id Organization UUID (required) - * @return CapacityList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public CapacityList findOrganizationCapacityPerFacility(UUID id) throws ApiException { - ApiResponse localVarResp = findOrganizationCapacityPerFacilityWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * View available hardware plans per Facility for given organization - * Returns a list of facilities and plans with their current capacity. - * @param id Organization UUID (required) - * @return ApiResponse<CapacityList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public ApiResponse findOrganizationCapacityPerFacilityWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findOrganizationCapacityPerFacilityValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * View available hardware plans per Facility for given organization (asynchronously) - * Returns a list of facilities and plans with their current capacity. - * @param id Organization UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public okhttp3.Call findOrganizationCapacityPerFacilityAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationCapacityPerFacilityValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationCapacityPerMetro - * @param id Organization UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public okhttp3.Call findOrganizationCapacityPerMetroCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/capacity/metros" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationCapacityPerMetroValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationCapacityPerMetro(Async)"); - } - - return findOrganizationCapacityPerMetroCall(id, _callback); - - } - - /** - * View available hardware plans per Metro for given organization - * Returns a list of metros and plans with their current capacity. - * @param id Organization UUID (required) - * @return CapacityList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public CapacityList findOrganizationCapacityPerMetro(UUID id) throws ApiException { - ApiResponse localVarResp = findOrganizationCapacityPerMetroWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * View available hardware plans per Metro for given organization - * Returns a list of metros and plans with their current capacity. - * @param id Organization UUID (required) - * @return ApiResponse<CapacityList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public ApiResponse findOrganizationCapacityPerMetroWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findOrganizationCapacityPerMetroValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * View available hardware plans per Metro for given organization (asynchronously) - * Returns a list of metros and plans with their current capacity. - * @param id Organization UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public okhttp3.Call findOrganizationCapacityPerMetroAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationCapacityPerMetroValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ConsoleLogDetailsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ConsoleLogDetailsApi.java deleted file mode 100644 index 07d089cfd..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ConsoleLogDetailsApi.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import java.io.File; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ConsoleLogDetailsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ConsoleLogDetailsApi() { - this(Configuration.getDefaultApiClient()); - } - - public ConsoleLogDetailsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for captureScreenshot - * @param id Device UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 An image file -
403 forbidden -
404 not found -
501 not implemented for device -
- */ - public okhttp3.Call captureScreenshotCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/diagnostics/screenshot" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/jpeg", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call captureScreenshotValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling captureScreenshot(Async)"); - } - - return captureScreenshotCall(id, _callback); - - } - - /** - * - * Capture a screenshot from the device, if supported, via the BMC. - * @param id Device UUID (required) - * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 An image file -
403 forbidden -
404 not found -
501 not implemented for device -
- */ - public File captureScreenshot(UUID id) throws ApiException { - ApiResponse localVarResp = captureScreenshotWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * - * Capture a screenshot from the device, if supported, via the BMC. - * @param id Device UUID (required) - * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 An image file -
403 forbidden -
404 not found -
501 not implemented for device -
- */ - public ApiResponse captureScreenshotWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = captureScreenshotValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Capture a screenshot from the device, if supported, via the BMC. - * @param id Device UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 An image file -
403 forbidden -
404 not found -
501 not implemented for device -
- */ - public okhttp3.Call captureScreenshotAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = captureScreenshotValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/DevicesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/DevicesApi.java deleted file mode 100644 index e223abb1e..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/DevicesApi.java +++ /dev/null @@ -1,3204 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.BGPSessionInput; -import com.equinix.openapi.metal.v1.model.BgpSession; -import com.equinix.openapi.metal.v1.model.BgpSessionList; -import com.equinix.openapi.metal.v1.model.BgpSessionNeighbors; -import com.equinix.openapi.metal.v1.model.CreateDeviceRequest; -import com.equinix.openapi.metal.v1.model.Device; -import com.equinix.openapi.metal.v1.model.DeviceActionInput; -import com.equinix.openapi.metal.v1.model.DeviceHealthRollup; -import com.equinix.openapi.metal.v1.model.DeviceList; -import com.equinix.openapi.metal.v1.model.DeviceUpdateInput; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FindTrafficTimeframeParameter; -import com.equinix.openapi.metal.v1.model.FirmwareSetResponse; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPAssignmentInput; -import com.equinix.openapi.metal.v1.model.IPAssignmentList; -import com.equinix.openapi.metal.v1.model.Metadata; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.Userdata; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DevicesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public DevicesApi() { - this(Configuration.getDefaultApiClient()); - } - - public DevicesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createBgpSession - * @param id Device UUID (required) - * @param bgPSessionInput BGP session to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
422 unprocessable entity -
- */ - public okhttp3.Call createBgpSessionCall(UUID id, BGPSessionInput bgPSessionInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = bgPSessionInput; - - // create path and map variables - String localVarPath = "/devices/{id}/bgp/sessions" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createBgpSessionValidateBeforeCall(UUID id, BGPSessionInput bgPSessionInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createBgpSession(Async)"); - } - - // verify the required parameter 'bgPSessionInput' is set - if (bgPSessionInput == null) { - throw new ApiException("Missing the required parameter 'bgPSessionInput' when calling createBgpSession(Async)"); - } - - return createBgpSessionCall(id, bgPSessionInput, include, _callback); - - } - - /** - * Create a BGP session - * Creates a BGP session. - * @param id Device UUID (required) - * @param bgPSessionInput BGP session to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return BgpSession - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
422 unprocessable entity -
- */ - public BgpSession createBgpSession(UUID id, BGPSessionInput bgPSessionInput, List include) throws ApiException { - ApiResponse localVarResp = createBgpSessionWithHttpInfo(id, bgPSessionInput, include); - return localVarResp.getData(); - } - - /** - * Create a BGP session - * Creates a BGP session. - * @param id Device UUID (required) - * @param bgPSessionInput BGP session to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<BgpSession> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
422 unprocessable entity -
- */ - public ApiResponse createBgpSessionWithHttpInfo(UUID id, BGPSessionInput bgPSessionInput, List include) throws ApiException { - okhttp3.Call localVarCall = createBgpSessionValidateBeforeCall(id, bgPSessionInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a BGP session (asynchronously) - * Creates a BGP session. - * @param id Device UUID (required) - * @param bgPSessionInput BGP session to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
422 unprocessable entity -
- */ - public okhttp3.Call createBgpSessionAsync(UUID id, BGPSessionInput bgPSessionInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createBgpSessionValidateBeforeCall(id, bgPSessionInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createDevice - * @param id Project UUID (required) - * @param createDeviceRequest Device to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createDeviceCall(UUID id, CreateDeviceRequest createDeviceRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createDeviceRequest; - - // create path and map variables - String localVarPath = "/projects/{id}/devices" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createDeviceValidateBeforeCall(UUID id, CreateDeviceRequest createDeviceRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createDevice(Async)"); - } - - // verify the required parameter 'createDeviceRequest' is set - if (createDeviceRequest == null) { - throw new ApiException("Missing the required parameter 'createDeviceRequest' when calling createDevice(Async)"); - } - - return createDeviceCall(id, createDeviceRequest, include, exclude, _callback); - - } - - /** - * Create a device - * Creates a new device and provisions it in the specified location. Device type-specific options are accepted. For example, `baremetal` devices accept `operating_system`, `hostname`, and `plan`. These parameters may not be accepted for other device types. The default device type is `baremetal`. - * @param id Project UUID (required) - * @param createDeviceRequest Device to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Device - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Device createDevice(UUID id, CreateDeviceRequest createDeviceRequest, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createDeviceWithHttpInfo(id, createDeviceRequest, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a device - * Creates a new device and provisions it in the specified location. Device type-specific options are accepted. For example, `baremetal` devices accept `operating_system`, `hostname`, and `plan`. These parameters may not be accepted for other device types. The default device type is `baremetal`. - * @param id Project UUID (required) - * @param createDeviceRequest Device to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Device> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createDeviceWithHttpInfo(UUID id, CreateDeviceRequest createDeviceRequest, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createDeviceValidateBeforeCall(id, createDeviceRequest, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a device (asynchronously) - * Creates a new device and provisions it in the specified location. Device type-specific options are accepted. For example, `baremetal` devices accept `operating_system`, `hostname`, and `plan`. These parameters may not be accepted for other device types. The default device type is `baremetal`. - * @param id Project UUID (required) - * @param createDeviceRequest Device to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createDeviceAsync(UUID id, CreateDeviceRequest createDeviceRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createDeviceValidateBeforeCall(id, createDeviceRequest, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createIPAssignment - * @param id Device UUID (required) - * @param ipAssignmentInput IPAssignment to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createIPAssignmentCall(UUID id, IPAssignmentInput ipAssignmentInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = ipAssignmentInput; - - // create path and map variables - String localVarPath = "/devices/{id}/ips" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createIPAssignmentValidateBeforeCall(UUID id, IPAssignmentInput ipAssignmentInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createIPAssignment(Async)"); - } - - // verify the required parameter 'ipAssignmentInput' is set - if (ipAssignmentInput == null) { - throw new ApiException("Missing the required parameter 'ipAssignmentInput' when calling createIPAssignment(Async)"); - } - - return createIPAssignmentCall(id, ipAssignmentInput, include, exclude, _callback); - - } - - /** - * Create an ip assignment - * Creates an ip assignment for a device. - * @param id Device UUID (required) - * @param ipAssignmentInput IPAssignment to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return IPAssignment - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public IPAssignment createIPAssignment(UUID id, IPAssignmentInput ipAssignmentInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createIPAssignmentWithHttpInfo(id, ipAssignmentInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create an ip assignment - * Creates an ip assignment for a device. - * @param id Device UUID (required) - * @param ipAssignmentInput IPAssignment to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<IPAssignment> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createIPAssignmentWithHttpInfo(UUID id, IPAssignmentInput ipAssignmentInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createIPAssignmentValidateBeforeCall(id, ipAssignmentInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an ip assignment (asynchronously) - * Creates an ip assignment for a device. - * @param id Device UUID (required) - * @param ipAssignmentInput IPAssignment to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createIPAssignmentAsync(UUID id, IPAssignmentInput ipAssignmentInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createIPAssignmentValidateBeforeCall(id, ipAssignmentInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteDevice - * @param id Device UUID (required) - * @param forceDelete Force the deletion of the device, by detaching any storage volume still active. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call deleteDeviceCall(UUID id, Boolean forceDelete, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (forceDelete != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("force_delete", forceDelete)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDeviceValidateBeforeCall(UUID id, Boolean forceDelete, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteDevice(Async)"); - } - - return deleteDeviceCall(id, forceDelete, _callback); - - } - - /** - * Delete the device - * Deletes a device and deprovisions it in our datacenter. - * @param id Device UUID (required) - * @param forceDelete Force the deletion of the device, by detaching any storage volume still active. (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public void deleteDevice(UUID id, Boolean forceDelete) throws ApiException { - deleteDeviceWithHttpInfo(id, forceDelete); - } - - /** - * Delete the device - * Deletes a device and deprovisions it in our datacenter. - * @param id Device UUID (required) - * @param forceDelete Force the deletion of the device, by detaching any storage volume still active. (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse deleteDeviceWithHttpInfo(UUID id, Boolean forceDelete) throws ApiException { - okhttp3.Call localVarCall = deleteDeviceValidateBeforeCall(id, forceDelete, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the device (asynchronously) - * Deletes a device and deprovisions it in our datacenter. - * @param id Device UUID (required) - * @param forceDelete Force the deletion of the device, by detaching any storage volume still active. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call deleteDeviceAsync(UUID id, Boolean forceDelete, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteDeviceValidateBeforeCall(id, forceDelete, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findBgpSessions - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public okhttp3.Call findBgpSessionsCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/bgp/sessions" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findBgpSessionsValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findBgpSessions(Async)"); - } - - return findBgpSessionsCall(id, include, _callback); - - } - - /** - * Retrieve all BGP sessions - * Provides a listing of available BGP sessions for the device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return BgpSessionList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public BgpSessionList findBgpSessions(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findBgpSessionsWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve all BGP sessions - * Provides a listing of available BGP sessions for the device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<BgpSessionList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public ApiResponse findBgpSessionsWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findBgpSessionsValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all BGP sessions (asynchronously) - * Provides a listing of available BGP sessions for the device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public okhttp3.Call findBgpSessionsAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findBgpSessionsValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findDeviceById - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findDeviceByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findDeviceByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findDeviceById(Async)"); - } - - return findDeviceByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve a device - * Type-specific options (such as facility for baremetal devices) will be included as part of the main data structure. State value can be one of: active inactive queued or provisioning - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Device - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Device findDeviceById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findDeviceByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve a device - * Type-specific options (such as facility for baremetal devices) will be included as part of the main data structure. State value can be one of: active inactive queued or provisioning - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Device> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findDeviceByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findDeviceByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a device (asynchronously) - * Type-specific options (such as facility for baremetal devices) will be included as part of the main data structure. State value can be one of: active inactive queued or provisioning - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findDeviceByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findDeviceByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findDeviceCustomdata - * @param id Instance UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findDeviceCustomdataCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/customdata" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findDeviceCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findDeviceCustomdata(Async)"); - } - - return findDeviceCustomdataCall(id, _callback); - - } - - /** - * Retrieve the custom metadata of an instance - * Provides the custom metadata stored for this instance in json format - * @param id Instance UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void findDeviceCustomdata(UUID id) throws ApiException { - findDeviceCustomdataWithHttpInfo(id); - } - - /** - * Retrieve the custom metadata of an instance - * Provides the custom metadata stored for this instance in json format - * @param id Instance UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findDeviceCustomdataWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findDeviceCustomdataValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve the custom metadata of an instance (asynchronously) - * Provides the custom metadata stored for this instance in json format - * @param id Instance UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findDeviceCustomdataAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findDeviceCustomdataValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findDeviceMetadataByID - * @param id Device UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call findDeviceMetadataByIDCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/metadata" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findDeviceMetadataByIDValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findDeviceMetadataByID(Async)"); - } - - return findDeviceMetadataByIDCall(id, _callback); - - } - - /** - * Retrieve metadata - * Retrieve device metadata - * @param id Device UUID (required) - * @return Metadata - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public Metadata findDeviceMetadataByID(UUID id) throws ApiException { - ApiResponse localVarResp = findDeviceMetadataByIDWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve metadata - * Retrieve device metadata - * @param id Device UUID (required) - * @return ApiResponse<Metadata> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse findDeviceMetadataByIDWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findDeviceMetadataByIDValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve metadata (asynchronously) - * Retrieve device metadata - * @param id Device UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call findDeviceMetadataByIDAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findDeviceMetadataByIDValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findDeviceUserdataByID - * @param id Device UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call findDeviceUserdataByIDCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/userdata" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findDeviceUserdataByIDValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findDeviceUserdataByID(Async)"); - } - - return findDeviceUserdataByIDCall(id, _callback); - - } - - /** - * Retrieve userdata - * Retrieve device userdata - * @param id Device UUID (required) - * @return Userdata - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public Userdata findDeviceUserdataByID(UUID id) throws ApiException { - ApiResponse localVarResp = findDeviceUserdataByIDWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve userdata - * Retrieve device userdata - * @param id Device UUID (required) - * @return ApiResponse<Userdata> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse findDeviceUserdataByIDWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findDeviceUserdataByIDValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve userdata (asynchronously) - * Retrieve device userdata - * @param id Device UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call findDeviceUserdataByIDAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findDeviceUserdataByIDValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findIPAssignmentCustomdata - * @param instanceId Instance UUID (required) - * @param id Ip Assignment UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPAssignmentCustomdataCall(UUID instanceId, UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{instance_id}/ips/{id}/customdata" - .replace("{" + "instance_id" + "}", localVarApiClient.escapeString(instanceId.toString())) - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findIPAssignmentCustomdataValidateBeforeCall(UUID instanceId, UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'instanceId' is set - if (instanceId == null) { - throw new ApiException("Missing the required parameter 'instanceId' when calling findIPAssignmentCustomdata(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findIPAssignmentCustomdata(Async)"); - } - - return findIPAssignmentCustomdataCall(instanceId, id, _callback); - - } - - /** - * Retrieve the custom metadata of an IP Assignment - * Provides the custom metadata stored for this IP Assignment in json format - * @param instanceId Instance UUID (required) - * @param id Ip Assignment UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void findIPAssignmentCustomdata(UUID instanceId, UUID id) throws ApiException { - findIPAssignmentCustomdataWithHttpInfo(instanceId, id); - } - - /** - * Retrieve the custom metadata of an IP Assignment - * Provides the custom metadata stored for this IP Assignment in json format - * @param instanceId Instance UUID (required) - * @param id Ip Assignment UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findIPAssignmentCustomdataWithHttpInfo(UUID instanceId, UUID id) throws ApiException { - okhttp3.Call localVarCall = findIPAssignmentCustomdataValidateBeforeCall(instanceId, id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve the custom metadata of an IP Assignment (asynchronously) - * Provides the custom metadata stored for this IP Assignment in json format - * @param instanceId Instance UUID (required) - * @param id Ip Assignment UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPAssignmentCustomdataAsync(UUID instanceId, UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findIPAssignmentCustomdataValidateBeforeCall(instanceId, id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findIPAssignments - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findIPAssignmentsCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/ips" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findIPAssignmentsValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findIPAssignments(Async)"); - } - - return findIPAssignmentsCall(id, include, exclude, _callback); - - } - - /** - * Retrieve all ip assignments - * Returns all ip assignments for a device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return IPAssignmentList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public IPAssignmentList findIPAssignments(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findIPAssignmentsWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all ip assignments - * Returns all ip assignments for a device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<IPAssignmentList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findIPAssignmentsWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findIPAssignmentsValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all ip assignments (asynchronously) - * Returns all ip assignments for a device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findIPAssignmentsAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findIPAssignmentsValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findInstanceBandwidth - * @param id Device UUID (required) - * @param from Timestamp from range (required) - * @param until Timestamp to range (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInstanceBandwidthCall(UUID id, String from, String until, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/bandwidth" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (from != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("from", from)); - } - - if (until != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("until", until)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findInstanceBandwidthValidateBeforeCall(UUID id, String from, String until, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findInstanceBandwidth(Async)"); - } - - // verify the required parameter 'from' is set - if (from == null) { - throw new ApiException("Missing the required parameter 'from' when calling findInstanceBandwidth(Async)"); - } - - // verify the required parameter 'until' is set - if (until == null) { - throw new ApiException("Missing the required parameter 'until' when calling findInstanceBandwidth(Async)"); - } - - return findInstanceBandwidthCall(id, from, until, _callback); - - } - - /** - * Retrieve an instance bandwidth - * Retrieve an instance bandwidth for a given period of time. - * @param id Device UUID (required) - * @param from Timestamp from range (required) - * @param until Timestamp to range (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public void findInstanceBandwidth(UUID id, String from, String until) throws ApiException { - findInstanceBandwidthWithHttpInfo(id, from, until); - } - - /** - * Retrieve an instance bandwidth - * Retrieve an instance bandwidth for a given period of time. - * @param id Device UUID (required) - * @param from Timestamp from range (required) - * @param until Timestamp to range (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse findInstanceBandwidthWithHttpInfo(UUID id, String from, String until) throws ApiException { - okhttp3.Call localVarCall = findInstanceBandwidthValidateBeforeCall(id, from, until, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve an instance bandwidth (asynchronously) - * Retrieve an instance bandwidth for a given period of time. - * @param id Device UUID (required) - * @param from Timestamp from range (required) - * @param until Timestamp to range (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInstanceBandwidthAsync(UUID id, String from, String until, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findInstanceBandwidthValidateBeforeCall(id, from, until, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationDevices - * @param id Organization UUID (required) - * @param search Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional) - * @param categories Filter by plan category (optional) - * @param facility Filter by device facility (optional) - * @param hostname Filter by partial hostname (optional) - * @param reserved Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional) - * @param tag Filter by device tag (optional) - * @param type Filter by instance type (ondemand,spot,reserved) (optional) - * @param hasTerminationTime Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationDevicesCall(UUID id, String search, List categories, String facility, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/devices" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - if (categories != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "categories", categories)); - } - - if (facility != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("facility", facility)); - } - - if (hostname != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("hostname", hostname)); - } - - if (reserved != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("reserved", reserved)); - } - - if (tag != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("tag", tag)); - } - - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); - } - - if (hasTerminationTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("has_termination_time", hasTerminationTime)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationDevicesValidateBeforeCall(UUID id, String search, List categories, String facility, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationDevices(Async)"); - } - - return findOrganizationDevicesCall(id, search, categories, facility, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve all devices of an organization - * Provides a collection of devices for a given organization. - * @param id Organization UUID (required) - * @param search Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional) - * @param categories Filter by plan category (optional) - * @param facility Filter by device facility (optional) - * @param hostname Filter by partial hostname (optional) - * @param reserved Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional) - * @param tag Filter by device tag (optional) - * @param type Filter by instance type (ondemand,spot,reserved) (optional) - * @param hasTerminationTime Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return DeviceList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public DeviceList findOrganizationDevices(UUID id, String search, List categories, String facility, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findOrganizationDevicesWithHttpInfo(id, search, categories, facility, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all devices of an organization - * Provides a collection of devices for a given organization. - * @param id Organization UUID (required) - * @param search Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional) - * @param categories Filter by plan category (optional) - * @param facility Filter by device facility (optional) - * @param hostname Filter by partial hostname (optional) - * @param reserved Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional) - * @param tag Filter by device tag (optional) - * @param type Filter by instance type (ondemand,spot,reserved) (optional) - * @param hasTerminationTime Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<DeviceList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findOrganizationDevicesWithHttpInfo(UUID id, String search, List categories, String facility, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findOrganizationDevicesValidateBeforeCall(id, search, categories, facility, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all devices of an organization (asynchronously) - * Provides a collection of devices for a given organization. - * @param id Organization UUID (required) - * @param search Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional) - * @param categories Filter by plan category (optional) - * @param facility Filter by device facility (optional) - * @param hostname Filter by partial hostname (optional) - * @param reserved Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional) - * @param tag Filter by device tag (optional) - * @param type Filter by instance type (ondemand,spot,reserved) (optional) - * @param hasTerminationTime Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationDevicesAsync(UUID id, String search, List categories, String facility, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationDevicesValidateBeforeCall(id, search, categories, facility, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectDevices - * @param id Project UUID (required) - * @param search Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional) - * @param categories Filter by plan category (optional) - * @param facility Filter by device facility (optional) - * @param metro Filter by device metro (optional) - * @param hostname Filter by partial hostname (optional) - * @param reserved Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional) - * @param tag Filter by device tag (optional) - * @param type Filter by instance type (ondemand,spot,reserved) (optional) - * @param hasTerminationTime Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectDevicesCall(UUID id, String search, List categories, String facility, String metro, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/devices" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - if (categories != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "categories", categories)); - } - - if (facility != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("facility", facility)); - } - - if (metro != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("metro", metro)); - } - - if (hostname != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("hostname", hostname)); - } - - if (reserved != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("reserved", reserved)); - } - - if (tag != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("tag", tag)); - } - - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); - } - - if (hasTerminationTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("has_termination_time", hasTerminationTime)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectDevicesValidateBeforeCall(UUID id, String search, List categories, String facility, String metro, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectDevices(Async)"); - } - - return findProjectDevicesCall(id, search, categories, facility, metro, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve all devices of a project - * Provides a collection of devices for a given project. - * @param id Project UUID (required) - * @param search Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional) - * @param categories Filter by plan category (optional) - * @param facility Filter by device facility (optional) - * @param metro Filter by device metro (optional) - * @param hostname Filter by partial hostname (optional) - * @param reserved Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional) - * @param tag Filter by device tag (optional) - * @param type Filter by instance type (ondemand,spot,reserved) (optional) - * @param hasTerminationTime Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return DeviceList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public DeviceList findProjectDevices(UUID id, String search, List categories, String facility, String metro, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findProjectDevicesWithHttpInfo(id, search, categories, facility, metro, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all devices of a project - * Provides a collection of devices for a given project. - * @param id Project UUID (required) - * @param search Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional) - * @param categories Filter by plan category (optional) - * @param facility Filter by device facility (optional) - * @param metro Filter by device metro (optional) - * @param hostname Filter by partial hostname (optional) - * @param reserved Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional) - * @param tag Filter by device tag (optional) - * @param type Filter by instance type (ondemand,spot,reserved) (optional) - * @param hasTerminationTime Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<DeviceList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findProjectDevicesWithHttpInfo(UUID id, String search, List categories, String facility, String metro, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findProjectDevicesValidateBeforeCall(id, search, categories, facility, metro, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all devices of a project (asynchronously) - * Provides a collection of devices for a given project. - * @param id Project UUID (required) - * @param search Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional) - * @param categories Filter by plan category (optional) - * @param facility Filter by device facility (optional) - * @param metro Filter by device metro (optional) - * @param hostname Filter by partial hostname (optional) - * @param reserved Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional) - * @param tag Filter by device tag (optional) - * @param type Filter by instance type (ondemand,spot,reserved) (optional) - * @param hasTerminationTime Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectDevicesAsync(UUID id, String search, List categories, String facility, String metro, String hostname, Boolean reserved, String tag, String type, Boolean hasTerminationTime, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectDevicesValidateBeforeCall(id, search, categories, facility, metro, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findTraffic - * @param id Device UUID (required) - * @param direction Traffic direction (required) - * @param interval Traffic interval (optional) - * @param bucket Traffic bucket (optional) - * @param timeframe (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findTrafficCall(UUID id, String direction, String interval, String bucket, FindTrafficTimeframeParameter timeframe, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/traffic" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (direction != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("direction", direction)); - } - - if (interval != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("interval", interval)); - } - - if (bucket != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("bucket", bucket)); - } - - if (timeframe != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeframe", timeframe)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findTrafficValidateBeforeCall(UUID id, String direction, String interval, String bucket, FindTrafficTimeframeParameter timeframe, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findTraffic(Async)"); - } - - // verify the required parameter 'direction' is set - if (direction == null) { - throw new ApiException("Missing the required parameter 'direction' when calling findTraffic(Async)"); - } - - return findTrafficCall(id, direction, interval, bucket, timeframe, _callback); - - } - - /** - * Retrieve device traffic - * Returns traffic for a specific device. - * @param id Device UUID (required) - * @param direction Traffic direction (required) - * @param interval Traffic interval (optional) - * @param bucket Traffic bucket (optional) - * @param timeframe (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void findTraffic(UUID id, String direction, String interval, String bucket, FindTrafficTimeframeParameter timeframe) throws ApiException { - findTrafficWithHttpInfo(id, direction, interval, bucket, timeframe); - } - - /** - * Retrieve device traffic - * Returns traffic for a specific device. - * @param id Device UUID (required) - * @param direction Traffic direction (required) - * @param interval Traffic interval (optional) - * @param bucket Traffic bucket (optional) - * @param timeframe (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findTrafficWithHttpInfo(UUID id, String direction, String interval, String bucket, FindTrafficTimeframeParameter timeframe) throws ApiException { - okhttp3.Call localVarCall = findTrafficValidateBeforeCall(id, direction, interval, bucket, timeframe, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve device traffic (asynchronously) - * Returns traffic for a specific device. - * @param id Device UUID (required) - * @param direction Traffic direction (required) - * @param interval Traffic interval (optional) - * @param bucket Traffic bucket (optional) - * @param timeframe (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findTrafficAsync(UUID id, String direction, String interval, String bucket, FindTrafficTimeframeParameter timeframe, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findTrafficValidateBeforeCall(id, direction, interval, bucket, timeframe, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getBgpNeighborData - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call getBgpNeighborDataCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/bgp/neighbors" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getBgpNeighborDataValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getBgpNeighborData(Async)"); - } - - return getBgpNeighborDataCall(id, include, _callback); - - } - - /** - * Retrieve BGP neighbor data for this device - * Provides a summary of the BGP neighbor data associated to the BGP sessions for this device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return BgpSessionNeighbors - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public BgpSessionNeighbors getBgpNeighborData(UUID id, List include) throws ApiException { - ApiResponse localVarResp = getBgpNeighborDataWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve BGP neighbor data for this device - * Provides a summary of the BGP neighbor data associated to the BGP sessions for this device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<BgpSessionNeighbors> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse getBgpNeighborDataWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = getBgpNeighborDataValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve BGP neighbor data for this device (asynchronously) - * Provides a summary of the BGP neighbor data associated to the BGP sessions for this device. - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call getBgpNeighborDataAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getBgpNeighborDataValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getDeviceFirmwareSets - * @param id Device UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public okhttp3.Call getDeviceFirmwareSetsCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/firmware-sets" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getDeviceFirmwareSetsValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getDeviceFirmwareSets(Async)"); - } - - return getDeviceFirmwareSetsCall(id, _callback); - - } - - /** - * Get Device's associated Firmware Set - * Returns the firmware set associated with the device. If a custom firmware set is associated with the device, then it is returned. Otherwise, if a default firmware set is available it is returned. - * @param id Device UUID (required) - * @return FirmwareSetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public FirmwareSetResponse getDeviceFirmwareSets(UUID id) throws ApiException { - ApiResponse localVarResp = getDeviceFirmwareSetsWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Get Device's associated Firmware Set - * Returns the firmware set associated with the device. If a custom firmware set is associated with the device, then it is returned. Otherwise, if a default firmware set is available it is returned. - * @param id Device UUID (required) - * @return ApiResponse<FirmwareSetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public ApiResponse getDeviceFirmwareSetsWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = getDeviceFirmwareSetsValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Device's associated Firmware Set (asynchronously) - * Returns the firmware set associated with the device. If a custom firmware set is associated with the device, then it is returned. Otherwise, if a default firmware set is available it is returned. - * @param id Device UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public okhttp3.Call getDeviceFirmwareSetsAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getDeviceFirmwareSetsValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getDeviceHealthRollup - * @param id Device UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public okhttp3.Call getDeviceHealthRollupCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/diagnostics/health/rollup" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getDeviceHealthRollupValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getDeviceHealthRollup(Async)"); - } - - return getDeviceHealthRollupCall(id, _callback); - - } - - /** - * Get Device's Health Status - * Returns the health rollup status of the device. - * @param id Device UUID (required) - * @return DeviceHealthRollup - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public DeviceHealthRollup getDeviceHealthRollup(UUID id) throws ApiException { - ApiResponse localVarResp = getDeviceHealthRollupWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Get Device's Health Status - * Returns the health rollup status of the device. - * @param id Device UUID (required) - * @return ApiResponse<DeviceHealthRollup> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public ApiResponse getDeviceHealthRollupWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = getDeviceHealthRollupValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Device's Health Status (asynchronously) - * Returns the health rollup status of the device. - * @param id Device UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public okhttp3.Call getDeviceHealthRollupAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getDeviceHealthRollupValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for performAction - * @param id Device UUID (required) - * @param deviceActionInput Action to perform (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 accepted -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call performActionCall(UUID id, DeviceActionInput deviceActionInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deviceActionInput; - - // create path and map variables - String localVarPath = "/devices/{id}/actions" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call performActionValidateBeforeCall(UUID id, DeviceActionInput deviceActionInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling performAction(Async)"); - } - - // verify the required parameter 'deviceActionInput' is set - if (deviceActionInput == null) { - throw new ApiException("Missing the required parameter 'deviceActionInput' when calling performAction(Async)"); - } - - return performActionCall(id, deviceActionInput, _callback); - - } - - /** - * Perform an action - * Performs an action for the given device. Possible actions include: power_on, power_off, reboot, reinstall, and rescue (reboot the device into rescue OS.) - * @param id Device UUID (required) - * @param deviceActionInput Action to perform (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 accepted -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public void performAction(UUID id, DeviceActionInput deviceActionInput) throws ApiException { - performActionWithHttpInfo(id, deviceActionInput); - } - - /** - * Perform an action - * Performs an action for the given device. Possible actions include: power_on, power_off, reboot, reinstall, and rescue (reboot the device into rescue OS.) - * @param id Device UUID (required) - * @param deviceActionInput Action to perform (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 accepted -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse performActionWithHttpInfo(UUID id, DeviceActionInput deviceActionInput) throws ApiException { - okhttp3.Call localVarCall = performActionValidateBeforeCall(id, deviceActionInput, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Perform an action (asynchronously) - * Performs an action for the given device. Possible actions include: power_on, power_off, reboot, reinstall, and rescue (reboot the device into rescue OS.) - * @param id Device UUID (required) - * @param deviceActionInput Action to perform (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 accepted -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call performActionAsync(UUID id, DeviceActionInput deviceActionInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = performActionValidateBeforeCall(id, deviceActionInput, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for updateDevice - * @param id Device UUID (required) - * @param deviceUpdateInput Device to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateDeviceCall(UUID id, DeviceUpdateInput deviceUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = deviceUpdateInput; - - // create path and map variables - String localVarPath = "/devices/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateDeviceValidateBeforeCall(UUID id, DeviceUpdateInput deviceUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateDevice(Async)"); - } - - // verify the required parameter 'deviceUpdateInput' is set - if (deviceUpdateInput == null) { - throw new ApiException("Missing the required parameter 'deviceUpdateInput' when calling updateDevice(Async)"); - } - - return updateDeviceCall(id, deviceUpdateInput, include, exclude, _callback); - - } - - /** - * Update the device - * Updates the device. - * @param id Device UUID (required) - * @param deviceUpdateInput Device to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Device - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Device updateDevice(UUID id, DeviceUpdateInput deviceUpdateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateDeviceWithHttpInfo(id, deviceUpdateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update the device - * Updates the device. - * @param id Device UUID (required) - * @param deviceUpdateInput Device to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Device> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateDeviceWithHttpInfo(UUID id, DeviceUpdateInput deviceUpdateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateDeviceValidateBeforeCall(id, deviceUpdateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the device (asynchronously) - * Updates the device. - * @param id Device UUID (required) - * @param deviceUpdateInput Device to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateDeviceAsync(UUID id, DeviceUpdateInput deviceUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateDeviceValidateBeforeCall(id, deviceUpdateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EmailsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EmailsApi.java deleted file mode 100644 index 55b55b233..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EmailsApi.java +++ /dev/null @@ -1,625 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.CreateEmailInput; -import com.equinix.openapi.metal.v1.model.Email; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.UpdateEmailInput; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class EmailsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public EmailsApi() { - this(Configuration.getDefaultApiClient()); - } - - public EmailsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createEmail - * @param createEmailInput Email to create (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createEmailCall(CreateEmailInput createEmailInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createEmailInput; - - // create path and map variables - String localVarPath = "/emails"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createEmailValidateBeforeCall(CreateEmailInput createEmailInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'createEmailInput' is set - if (createEmailInput == null) { - throw new ApiException("Missing the required parameter 'createEmailInput' when calling createEmail(Async)"); - } - - return createEmailCall(createEmailInput, _callback); - - } - - /** - * Create an email - * Add a new email address to the current user. - * @param createEmailInput Email to create (required) - * @return Email - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public Email createEmail(CreateEmailInput createEmailInput) throws ApiException { - ApiResponse localVarResp = createEmailWithHttpInfo(createEmailInput); - return localVarResp.getData(); - } - - /** - * Create an email - * Add a new email address to the current user. - * @param createEmailInput Email to create (required) - * @return ApiResponse<Email> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createEmailWithHttpInfo(CreateEmailInput createEmailInput) throws ApiException { - okhttp3.Call localVarCall = createEmailValidateBeforeCall(createEmailInput, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an email (asynchronously) - * Add a new email address to the current user. - * @param createEmailInput Email to create (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createEmailAsync(CreateEmailInput createEmailInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createEmailValidateBeforeCall(createEmailInput, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteEmail - * @param id Email UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteEmailCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/emails/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteEmailValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteEmail(Async)"); - } - - return deleteEmailCall(id, _callback); - - } - - /** - * Delete the email - * Deletes the email. - * @param id Email UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteEmail(UUID id) throws ApiException { - deleteEmailWithHttpInfo(id); - } - - /** - * Delete the email - * Deletes the email. - * @param id Email UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteEmailWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteEmailValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the email (asynchronously) - * Deletes the email. - * @param id Email UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteEmailAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteEmailValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findEmailById - * @param id Email UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findEmailByIdCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/emails/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findEmailByIdValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findEmailById(Async)"); - } - - return findEmailByIdCall(id, _callback); - - } - - /** - * Retrieve an email - * Provides one of the user’s emails. - * @param id Email UUID (required) - * @return Email - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Email findEmailById(UUID id) throws ApiException { - ApiResponse localVarResp = findEmailByIdWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve an email - * Provides one of the user’s emails. - * @param id Email UUID (required) - * @return ApiResponse<Email> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findEmailByIdWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findEmailByIdValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve an email (asynchronously) - * Provides one of the user’s emails. - * @param id Email UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findEmailByIdAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findEmailByIdValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateEmail - * @param id Email UUID (required) - * @param updateEmailInput email to update (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateEmailCall(UUID id, UpdateEmailInput updateEmailInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateEmailInput; - - // create path and map variables - String localVarPath = "/emails/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateEmailValidateBeforeCall(UUID id, UpdateEmailInput updateEmailInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateEmail(Async)"); - } - - // verify the required parameter 'updateEmailInput' is set - if (updateEmailInput == null) { - throw new ApiException("Missing the required parameter 'updateEmailInput' when calling updateEmail(Async)"); - } - - return updateEmailCall(id, updateEmailInput, _callback); - - } - - /** - * Update the email - * Updates the email. - * @param id Email UUID (required) - * @param updateEmailInput email to update (required) - * @return Email - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Email updateEmail(UUID id, UpdateEmailInput updateEmailInput) throws ApiException { - ApiResponse localVarResp = updateEmailWithHttpInfo(id, updateEmailInput); - return localVarResp.getData(); - } - - /** - * Update the email - * Updates the email. - * @param id Email UUID (required) - * @param updateEmailInput email to update (required) - * @return ApiResponse<Email> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateEmailWithHttpInfo(UUID id, UpdateEmailInput updateEmailInput) throws ApiException { - okhttp3.Call localVarCall = updateEmailValidateBeforeCall(id, updateEmailInput, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the email (asynchronously) - * Updates the email. - * @param id Email UUID (required) - * @param updateEmailInput email to update (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateEmailAsync(UUID id, UpdateEmailInput updateEmailInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateEmailValidateBeforeCall(id, updateEmailInput, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EventsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EventsApi.java deleted file mode 100644 index e8750c1c5..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/EventsApi.java +++ /dev/null @@ -1,1557 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Event; -import com.equinix.openapi.metal.v1.model.EventList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class EventsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public EventsApi() { - this(Configuration.getDefaultApiClient()); - } - - public EventsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findDeviceEvents - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findDeviceEventsCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/events" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findDeviceEventsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findDeviceEvents(Async)"); - } - - return findDeviceEventsCall(id, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve device's events - * Returns a list of events pertaining to a specific device - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return EventList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public EventList findDeviceEvents(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findDeviceEventsWithHttpInfo(id, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve device's events - * Returns a list of events pertaining to a specific device - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<EventList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findDeviceEventsWithHttpInfo(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findDeviceEventsValidateBeforeCall(id, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve device's events (asynchronously) - * Returns a list of events pertaining to a specific device - * @param id Device UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findDeviceEventsAsync(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findDeviceEventsValidateBeforeCall(id, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findEventById - * @param id Event UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findEventByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/events/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findEventByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findEventById(Async)"); - } - - return findEventByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve an event - * Returns a single event if the user has access - * @param id Event UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Event - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Event findEventById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findEventByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve an event - * Returns a single event if the user has access - * @param id Event UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Event> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findEventByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findEventByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve an event (asynchronously) - * Returns a single event if the user has access - * @param id Event UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findEventByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findEventByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findEvents - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findEventsCall(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/events"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findEventsValidateBeforeCall(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - return findEventsCall(include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve current user's events - * Returns a list of the current user’s events - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return EventList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public EventList findEvents(List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findEventsWithHttpInfo(include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve current user's events - * Returns a list of the current user’s events - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<EventList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findEventsWithHttpInfo(List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findEventsValidateBeforeCall(include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve current user's events (asynchronously) - * Returns a list of the current user’s events - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findEventsAsync(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findEventsValidateBeforeCall(include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findInterconnectionEvents - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInterconnectionEventsCall(UUID connectionId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connections/{connection_id}/events" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findInterconnectionEventsValidateBeforeCall(UUID connectionId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling findInterconnectionEvents(Async)"); - } - - return findInterconnectionEventsCall(connectionId, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve interconnection events - * Returns a list of the interconnection events - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return EventList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public EventList findInterconnectionEvents(UUID connectionId, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findInterconnectionEventsWithHttpInfo(connectionId, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve interconnection events - * Returns a list of the interconnection events - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<EventList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findInterconnectionEventsWithHttpInfo(UUID connectionId, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findInterconnectionEventsValidateBeforeCall(connectionId, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve interconnection events (asynchronously) - * Returns a list of the interconnection events - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInterconnectionEventsAsync(UUID connectionId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findInterconnectionEventsValidateBeforeCall(connectionId, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findInterconnectionPortEvents - * @param connectionId Interconnection UUID (required) - * @param id Interconnection Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInterconnectionPortEventsCall(UUID connectionId, UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connections/{connection_id}/ports/{id}/events" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())) - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findInterconnectionPortEventsValidateBeforeCall(UUID connectionId, UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling findInterconnectionPortEvents(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findInterconnectionPortEvents(Async)"); - } - - return findInterconnectionPortEventsCall(connectionId, id, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve interconnection port events - * Returns a list of the interconnection port events - * @param connectionId Interconnection UUID (required) - * @param id Interconnection Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return Event - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Event findInterconnectionPortEvents(UUID connectionId, UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findInterconnectionPortEventsWithHttpInfo(connectionId, id, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve interconnection port events - * Returns a list of the interconnection port events - * @param connectionId Interconnection UUID (required) - * @param id Interconnection Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<Event> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findInterconnectionPortEventsWithHttpInfo(UUID connectionId, UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findInterconnectionPortEventsValidateBeforeCall(connectionId, id, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve interconnection port events (asynchronously) - * Returns a list of the interconnection port events - * @param connectionId Interconnection UUID (required) - * @param id Interconnection Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInterconnectionPortEventsAsync(UUID connectionId, UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findInterconnectionPortEventsValidateBeforeCall(connectionId, id, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationEvents - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationEventsCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/events" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationEventsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationEvents(Async)"); - } - - return findOrganizationEventsCall(id, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve organization's events - * Returns a list of events for a single organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return EventList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public EventList findOrganizationEvents(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findOrganizationEventsWithHttpInfo(id, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve organization's events - * Returns a list of events for a single organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<EventList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findOrganizationEventsWithHttpInfo(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findOrganizationEventsValidateBeforeCall(id, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve organization's events (asynchronously) - * Returns a list of events for a single organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationEventsAsync(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationEventsValidateBeforeCall(id, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectEvents - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectEventsCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/events" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectEventsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectEvents(Async)"); - } - - return findProjectEventsCall(id, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve project's events - * Returns a list of events for a single project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return EventList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public EventList findProjectEvents(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findProjectEventsWithHttpInfo(id, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve project's events - * Returns a list of events for a single project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<EventList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findProjectEventsWithHttpInfo(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findProjectEventsValidateBeforeCall(id, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve project's events (asynchronously) - * Returns a list of events for a single project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectEventsAsync(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectEventsValidateBeforeCall(id, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findVirtualCircuitEvents - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVirtualCircuitEventsCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/virtual-circuits/{id}/events" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findVirtualCircuitEventsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findVirtualCircuitEvents(Async)"); - } - - return findVirtualCircuitEventsCall(id, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve virtual circuit events - * Returns a list of the virtual circuit events - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return Event - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Event findVirtualCircuitEvents(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findVirtualCircuitEventsWithHttpInfo(id, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve virtual circuit events - * Returns a list of the virtual circuit events - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<Event> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findVirtualCircuitEventsWithHttpInfo(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findVirtualCircuitEventsValidateBeforeCall(id, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve virtual circuit events (asynchronously) - * Returns a list of the virtual circuit events - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVirtualCircuitEventsAsync(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findVirtualCircuitEventsValidateBeforeCall(id, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findVrfRouteEvents - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfRouteEventsCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/routes/{id}/events" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findVrfRouteEventsValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findVrfRouteEvents(Async)"); - } - - return findVrfRouteEventsCall(id, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve VRF route events - * Returns a list of the VRF route events - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return Event - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Event findVrfRouteEvents(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findVrfRouteEventsWithHttpInfo(id, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve VRF route events - * Returns a list of the VRF route events - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<Event> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findVrfRouteEventsWithHttpInfo(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findVrfRouteEventsValidateBeforeCall(id, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve VRF route events (asynchronously) - * Returns a list of the VRF route events - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfRouteEventsAsync(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findVrfRouteEventsValidateBeforeCall(id, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FacilitiesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FacilitiesApi.java deleted file mode 100644 index e4e559dd0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FacilitiesApi.java +++ /dev/null @@ -1,539 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FacilityList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class FacilitiesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public FacilitiesApi() { - this(Configuration.getDefaultApiClient()); - } - - public FacilitiesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findFacilities - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- * @deprecated - */ - @Deprecated - public okhttp3.Call findFacilitiesCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/facilities"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call findFacilitiesValidateBeforeCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - return findFacilitiesCall(include, exclude, _callback); - - } - - /** - * Retrieve all facilities - * Provides a listing of available datacenters where you can provision Packet devices. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return FacilityList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- * @deprecated - */ - @Deprecated - public FacilityList findFacilities(List include, List exclude) throws ApiException { - ApiResponse localVarResp = findFacilitiesWithHttpInfo(include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all facilities - * Provides a listing of available datacenters where you can provision Packet devices. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<FacilityList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- * @deprecated - */ - @Deprecated - public ApiResponse findFacilitiesWithHttpInfo(List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findFacilitiesValidateBeforeCall(include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all facilities (asynchronously) - * Provides a listing of available datacenters where you can provision Packet devices. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- * @deprecated - */ - @Deprecated - public okhttp3.Call findFacilitiesAsync(List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findFacilitiesValidateBeforeCall(include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findFacilitiesByOrganization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- * @deprecated - */ - @Deprecated - public okhttp3.Call findFacilitiesByOrganizationCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/facilities" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call findFacilitiesByOrganizationValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findFacilitiesByOrganization(Async)"); - } - - return findFacilitiesByOrganizationCall(id, include, exclude, _callback); - - } - - /** - * Retrieve all facilities visible by the organization - * Returns a listing of available datacenters for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return FacilityList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- * @deprecated - */ - @Deprecated - public FacilityList findFacilitiesByOrganization(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findFacilitiesByOrganizationWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all facilities visible by the organization - * Returns a listing of available datacenters for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<FacilityList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- * @deprecated - */ - @Deprecated - public ApiResponse findFacilitiesByOrganizationWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findFacilitiesByOrganizationValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all facilities visible by the organization (asynchronously) - * Returns a listing of available datacenters for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- * @deprecated - */ - @Deprecated - public okhttp3.Call findFacilitiesByOrganizationAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findFacilitiesByOrganizationValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findFacilitiesByProject - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- * @deprecated - */ - @Deprecated - public okhttp3.Call findFacilitiesByProjectCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/facilities" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call findFacilitiesByProjectValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findFacilitiesByProject(Async)"); - } - - return findFacilitiesByProjectCall(id, include, exclude, _callback); - - } - - /** - * Retrieve all facilities visible by the project - * Returns a listing of available datacenters for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return FacilityList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- * @deprecated - */ - @Deprecated - public FacilityList findFacilitiesByProject(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findFacilitiesByProjectWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all facilities visible by the project - * Returns a listing of available datacenters for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<FacilityList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- * @deprecated - */ - @Deprecated - public ApiResponse findFacilitiesByProjectWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findFacilitiesByProjectValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all facilities visible by the project (asynchronously) - * Returns a listing of available datacenters for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- * @deprecated - */ - @Deprecated - public okhttp3.Call findFacilitiesByProjectAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findFacilitiesByProjectValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FirmwareSetsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FirmwareSetsApi.java deleted file mode 100644 index 4a0a6c0d0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/FirmwareSetsApi.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FirmwareSetListResponse; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class FirmwareSetsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public FirmwareSetsApi() { - this(Configuration.getDefaultApiClient()); - } - - public FirmwareSetsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getOrganizationFirmwareSets - * @param id Organization UUID (required) - * @param page page number to return (optional) - * @param perPage items returned per page. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public okhttp3.Call getOrganizationFirmwareSetsCall(UUID id, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/firmware-sets" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getOrganizationFirmwareSetsValidateBeforeCall(UUID id, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getOrganizationFirmwareSets(Async)"); - } - - return getOrganizationFirmwareSetsCall(id, page, perPage, _callback); - - } - - /** - * Get Organization's Firmware Sets - * Returns all firmware sets associated with the organization. - * @param id Organization UUID (required) - * @param page page number to return (optional) - * @param perPage items returned per page. (optional) - * @return FirmwareSetListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public FirmwareSetListResponse getOrganizationFirmwareSets(UUID id, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = getOrganizationFirmwareSetsWithHttpInfo(id, page, perPage); - return localVarResp.getData(); - } - - /** - * Get Organization's Firmware Sets - * Returns all firmware sets associated with the organization. - * @param id Organization UUID (required) - * @param page page number to return (optional) - * @param perPage items returned per page. (optional) - * @return ApiResponse<FirmwareSetListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public ApiResponse getOrganizationFirmwareSetsWithHttpInfo(UUID id, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = getOrganizationFirmwareSetsValidateBeforeCall(id, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Organization's Firmware Sets (asynchronously) - * Returns all firmware sets associated with the organization. - * @param id Organization UUID (required) - * @param page page number to return (optional) - * @param perPage items returned per page. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public okhttp3.Call getOrganizationFirmwareSetsAsync(UUID id, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getOrganizationFirmwareSetsValidateBeforeCall(id, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getProjectFirmwareSets - * @param id Project UUID (required) - * @param page page number to return (optional) - * @param perPage items returned per page. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public okhttp3.Call getProjectFirmwareSetsCall(UUID id, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/firmware-sets" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getProjectFirmwareSetsValidateBeforeCall(UUID id, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getProjectFirmwareSets(Async)"); - } - - return getProjectFirmwareSetsCall(id, page, perPage, _callback); - - } - - /** - * Get Project's Firmware Sets - * Returns all firmware sets associated with the project or organization. - * @param id Project UUID (required) - * @param page page number to return (optional) - * @param perPage items returned per page. (optional) - * @return FirmwareSetListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public FirmwareSetListResponse getProjectFirmwareSets(UUID id, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = getProjectFirmwareSetsWithHttpInfo(id, page, perPage); - return localVarResp.getData(); - } - - /** - * Get Project's Firmware Sets - * Returns all firmware sets associated with the project or organization. - * @param id Project UUID (required) - * @param page page number to return (optional) - * @param perPage items returned per page. (optional) - * @return ApiResponse<FirmwareSetListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public ApiResponse getProjectFirmwareSetsWithHttpInfo(UUID id, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = getProjectFirmwareSetsValidateBeforeCall(id, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Project's Firmware Sets (asynchronously) - * Returns all firmware sets associated with the project or organization. - * @param id Project UUID (required) - * @param page page number to return (optional) - * @param perPage items returned per page. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Successful operation -
401 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
404 Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. -
500 Internal Server Error -
- */ - public okhttp3.Call getProjectFirmwareSetsAsync(UUID id, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getProjectFirmwareSetsValidateBeforeCall(id, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApi.java deleted file mode 100644 index 27af19857..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApi.java +++ /dev/null @@ -1,739 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.ActivateHardwareReservationRequest; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.HardwareReservation; -import com.equinix.openapi.metal.v1.model.HardwareReservationList; -import com.equinix.openapi.metal.v1.model.MoveHardwareReservationRequest; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class HardwareReservationsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public HardwareReservationsApi() { - this(Configuration.getDefaultApiClient()); - } - - public HardwareReservationsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for activateHardwareReservation - * @param id Hardware Reservation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param activateHardwareReservationRequest Note to attach to the reservation (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call activateHardwareReservationCall(UUID id, List include, List exclude, ActivateHardwareReservationRequest activateHardwareReservationRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = activateHardwareReservationRequest; - - // create path and map variables - String localVarPath = "/hardware-reservations/{id}/activate" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call activateHardwareReservationValidateBeforeCall(UUID id, List include, List exclude, ActivateHardwareReservationRequest activateHardwareReservationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling activateHardwareReservation(Async)"); - } - - return activateHardwareReservationCall(id, include, exclude, activateHardwareReservationRequest, _callback); - - } - - /** - * Activate a spare hardware reservation - * Activate a spare hardware reservation - * @param id Hardware Reservation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param activateHardwareReservationRequest Note to attach to the reservation (optional) - * @return HardwareReservation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public HardwareReservation activateHardwareReservation(UUID id, List include, List exclude, ActivateHardwareReservationRequest activateHardwareReservationRequest) throws ApiException { - ApiResponse localVarResp = activateHardwareReservationWithHttpInfo(id, include, exclude, activateHardwareReservationRequest); - return localVarResp.getData(); - } - - /** - * Activate a spare hardware reservation - * Activate a spare hardware reservation - * @param id Hardware Reservation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param activateHardwareReservationRequest Note to attach to the reservation (optional) - * @return ApiResponse<HardwareReservation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse activateHardwareReservationWithHttpInfo(UUID id, List include, List exclude, ActivateHardwareReservationRequest activateHardwareReservationRequest) throws ApiException { - okhttp3.Call localVarCall = activateHardwareReservationValidateBeforeCall(id, include, exclude, activateHardwareReservationRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Activate a spare hardware reservation (asynchronously) - * Activate a spare hardware reservation - * @param id Hardware Reservation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param activateHardwareReservationRequest Note to attach to the reservation (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call activateHardwareReservationAsync(UUID id, List include, List exclude, ActivateHardwareReservationRequest activateHardwareReservationRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = activateHardwareReservationValidateBeforeCall(id, include, exclude, activateHardwareReservationRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findHardwareReservationById - * @param id HardwareReservation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findHardwareReservationByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/hardware-reservations/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findHardwareReservationByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findHardwareReservationById(Async)"); - } - - return findHardwareReservationByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve a hardware reservation - * Returns a single hardware reservation - * @param id HardwareReservation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return HardwareReservation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public HardwareReservation findHardwareReservationById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findHardwareReservationByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve a hardware reservation - * Returns a single hardware reservation - * @param id HardwareReservation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<HardwareReservation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findHardwareReservationByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findHardwareReservationByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a hardware reservation (asynchronously) - * Returns a single hardware reservation - * @param id HardwareReservation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findHardwareReservationByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findHardwareReservationByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectHardwareReservations - * @param id Project UUID (required) - * @param query Search by facility code, plan name, project name, reservation short ID or device hostname (optional) - * @param state Filter by hardware reservation state (optional) - * @param provisionable Filter hardware reservation that is provisionable (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectHardwareReservationsCall(UUID id, String query, String state, String provisionable, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/hardware-reservations" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (query != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); - } - - if (state != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("state", state)); - } - - if (provisionable != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("provisionable", provisionable)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectHardwareReservationsValidateBeforeCall(UUID id, String query, String state, String provisionable, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectHardwareReservations(Async)"); - } - - return findProjectHardwareReservationsCall(id, query, state, provisionable, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve all hardware reservations for a given project - * Provides a collection of hardware reservations for a given project. - * @param id Project UUID (required) - * @param query Search by facility code, plan name, project name, reservation short ID or device hostname (optional) - * @param state Filter by hardware reservation state (optional) - * @param provisionable Filter hardware reservation that is provisionable (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return HardwareReservationList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public HardwareReservationList findProjectHardwareReservations(UUID id, String query, String state, String provisionable, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findProjectHardwareReservationsWithHttpInfo(id, query, state, provisionable, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all hardware reservations for a given project - * Provides a collection of hardware reservations for a given project. - * @param id Project UUID (required) - * @param query Search by facility code, plan name, project name, reservation short ID or device hostname (optional) - * @param state Filter by hardware reservation state (optional) - * @param provisionable Filter hardware reservation that is provisionable (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<HardwareReservationList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findProjectHardwareReservationsWithHttpInfo(UUID id, String query, String state, String provisionable, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findProjectHardwareReservationsValidateBeforeCall(id, query, state, provisionable, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all hardware reservations for a given project (asynchronously) - * Provides a collection of hardware reservations for a given project. - * @param id Project UUID (required) - * @param query Search by facility code, plan name, project name, reservation short ID or device hostname (optional) - * @param state Filter by hardware reservation state (optional) - * @param provisionable Filter hardware reservation that is provisionable (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectHardwareReservationsAsync(UUID id, String query, String state, String provisionable, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectHardwareReservationsValidateBeforeCall(id, query, state, provisionable, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for moveHardwareReservation - * @param id Hardware Reservation UUID (required) - * @param moveHardwareReservationRequest Destination Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call moveHardwareReservationCall(UUID id, MoveHardwareReservationRequest moveHardwareReservationRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = moveHardwareReservationRequest; - - // create path and map variables - String localVarPath = "/hardware-reservations/{id}/move" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call moveHardwareReservationValidateBeforeCall(UUID id, MoveHardwareReservationRequest moveHardwareReservationRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling moveHardwareReservation(Async)"); - } - - // verify the required parameter 'moveHardwareReservationRequest' is set - if (moveHardwareReservationRequest == null) { - throw new ApiException("Missing the required parameter 'moveHardwareReservationRequest' when calling moveHardwareReservation(Async)"); - } - - return moveHardwareReservationCall(id, moveHardwareReservationRequest, include, exclude, _callback); - - } - - /** - * Move a hardware reservation - * Move a hardware reservation to another project - * @param id Hardware Reservation UUID (required) - * @param moveHardwareReservationRequest Destination Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return HardwareReservation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public HardwareReservation moveHardwareReservation(UUID id, MoveHardwareReservationRequest moveHardwareReservationRequest, List include, List exclude) throws ApiException { - ApiResponse localVarResp = moveHardwareReservationWithHttpInfo(id, moveHardwareReservationRequest, include, exclude); - return localVarResp.getData(); - } - - /** - * Move a hardware reservation - * Move a hardware reservation to another project - * @param id Hardware Reservation UUID (required) - * @param moveHardwareReservationRequest Destination Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<HardwareReservation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse moveHardwareReservationWithHttpInfo(UUID id, MoveHardwareReservationRequest moveHardwareReservationRequest, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = moveHardwareReservationValidateBeforeCall(id, moveHardwareReservationRequest, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Move a hardware reservation (asynchronously) - * Move a hardware reservation to another project - * @param id Hardware Reservation UUID (required) - * @param moveHardwareReservationRequest Destination Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call moveHardwareReservationAsync(UUID id, MoveHardwareReservationRequest moveHardwareReservationRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = moveHardwareReservationValidateBeforeCall(id, moveHardwareReservationRequest, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IncidentsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IncidentsApi.java deleted file mode 100644 index 1fdd146af..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IncidentsApi.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class IncidentsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public IncidentsApi() { - this(Configuration.getDefaultApiClient()); - } - - public IncidentsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findIncidents - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findIncidentsCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/incidents"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findIncidentsValidateBeforeCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - return findIncidentsCall(include, exclude, _callback); - - } - - /** - * Retrieve the number of incidents - * Retrieve the number of incidents. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public void findIncidents(List include, List exclude) throws ApiException { - findIncidentsWithHttpInfo(include, exclude); - } - - /** - * Retrieve the number of incidents - * Retrieve the number of incidents. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findIncidentsWithHttpInfo(List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findIncidentsValidateBeforeCall(include, exclude, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve the number of incidents (asynchronously) - * Retrieve the number of incidents. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findIncidentsAsync(List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findIncidentsValidateBeforeCall(include, exclude, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InterconnectionsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InterconnectionsApi.java deleted file mode 100644 index b998706a6..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InterconnectionsApi.java +++ /dev/null @@ -1,2347 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.CreateOrganizationInterconnectionRequest; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Interconnection; -import com.equinix.openapi.metal.v1.model.InterconnectionList; -import com.equinix.openapi.metal.v1.model.InterconnectionPort; -import com.equinix.openapi.metal.v1.model.InterconnectionPortList; -import com.equinix.openapi.metal.v1.model.InterconnectionUpdateInput; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.VirtualCircuit; -import com.equinix.openapi.metal.v1.model.VirtualCircuitCreateInput; -import com.equinix.openapi.metal.v1.model.VirtualCircuitList; -import com.equinix.openapi.metal.v1.model.VirtualCircuitUpdateInput; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class InterconnectionsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public InterconnectionsApi() { - this(Configuration.getDefaultApiClient()); - } - - public InterconnectionsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createInterconnectionPortVirtualCircuit - * @param connectionId UUID of the interconnection (required) - * @param portId UUID of the interconnection port (required) - * @param virtualCircuitCreateInput Virtual Circuit details (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call createInterconnectionPortVirtualCircuitCall(UUID connectionId, UUID portId, VirtualCircuitCreateInput virtualCircuitCreateInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = virtualCircuitCreateInput; - - // create path and map variables - String localVarPath = "/connections/{connection_id}/ports/{port_id}/virtual-circuits" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())) - .replace("{" + "port_id" + "}", localVarApiClient.escapeString(portId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createInterconnectionPortVirtualCircuitValidateBeforeCall(UUID connectionId, UUID portId, VirtualCircuitCreateInput virtualCircuitCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling createInterconnectionPortVirtualCircuit(Async)"); - } - - // verify the required parameter 'portId' is set - if (portId == null) { - throw new ApiException("Missing the required parameter 'portId' when calling createInterconnectionPortVirtualCircuit(Async)"); - } - - // verify the required parameter 'virtualCircuitCreateInput' is set - if (virtualCircuitCreateInput == null) { - throw new ApiException("Missing the required parameter 'virtualCircuitCreateInput' when calling createInterconnectionPortVirtualCircuit(Async)"); - } - - return createInterconnectionPortVirtualCircuitCall(connectionId, portId, virtualCircuitCreateInput, _callback); - - } - - /** - * Create a new Virtual Circuit - * Create a new Virtual Circuit on a Dedicated Port. To create a regular Virtual Circuit, specify a Virtual Network record and an NNI VLAN value. To create a VRF-based Virtual Circuit, specify the VRF ID and subnet, along with the NNI VLAN value. - * @param connectionId UUID of the interconnection (required) - * @param portId UUID of the interconnection port (required) - * @param virtualCircuitCreateInput Virtual Circuit details (required) - * @return VirtualCircuit - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 ok -
403 forbidden -
404 not found -
- */ - public VirtualCircuit createInterconnectionPortVirtualCircuit(UUID connectionId, UUID portId, VirtualCircuitCreateInput virtualCircuitCreateInput) throws ApiException { - ApiResponse localVarResp = createInterconnectionPortVirtualCircuitWithHttpInfo(connectionId, portId, virtualCircuitCreateInput); - return localVarResp.getData(); - } - - /** - * Create a new Virtual Circuit - * Create a new Virtual Circuit on a Dedicated Port. To create a regular Virtual Circuit, specify a Virtual Network record and an NNI VLAN value. To create a VRF-based Virtual Circuit, specify the VRF ID and subnet, along with the NNI VLAN value. - * @param connectionId UUID of the interconnection (required) - * @param portId UUID of the interconnection port (required) - * @param virtualCircuitCreateInput Virtual Circuit details (required) - * @return ApiResponse<VirtualCircuit> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse createInterconnectionPortVirtualCircuitWithHttpInfo(UUID connectionId, UUID portId, VirtualCircuitCreateInput virtualCircuitCreateInput) throws ApiException { - okhttp3.Call localVarCall = createInterconnectionPortVirtualCircuitValidateBeforeCall(connectionId, portId, virtualCircuitCreateInput, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a new Virtual Circuit (asynchronously) - * Create a new Virtual Circuit on a Dedicated Port. To create a regular Virtual Circuit, specify a Virtual Network record and an NNI VLAN value. To create a VRF-based Virtual Circuit, specify the VRF ID and subnet, along with the NNI VLAN value. - * @param connectionId UUID of the interconnection (required) - * @param portId UUID of the interconnection port (required) - * @param virtualCircuitCreateInput Virtual Circuit details (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call createInterconnectionPortVirtualCircuitAsync(UUID connectionId, UUID portId, VirtualCircuitCreateInput virtualCircuitCreateInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createInterconnectionPortVirtualCircuitValidateBeforeCall(connectionId, portId, virtualCircuitCreateInput, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createOrganizationInterconnection - * @param organizationId UUID of the organization (required) - * @param createOrganizationInterconnectionRequest Dedicated port or shared interconnection (also known as Fabric VC) creation request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createOrganizationInterconnectionCall(UUID organizationId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createOrganizationInterconnectionRequest; - - // create path and map variables - String localVarPath = "/organizations/{organization_id}/connections" - .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createOrganizationInterconnectionValidateBeforeCall(UUID organizationId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { - throw new ApiException("Missing the required parameter 'organizationId' when calling createOrganizationInterconnection(Async)"); - } - - // verify the required parameter 'createOrganizationInterconnectionRequest' is set - if (createOrganizationInterconnectionRequest == null) { - throw new ApiException("Missing the required parameter 'createOrganizationInterconnectionRequest' when calling createOrganizationInterconnection(Async)"); - } - - return createOrganizationInterconnectionCall(organizationId, createOrganizationInterconnectionRequest, include, exclude, _callback); - - } - - /** - * Request a new interconnection for the organization - * Creates a new interconnection request. A Project ID must be specified in the request body for connections on shared ports. - * @param organizationId UUID of the organization (required) - * @param createOrganizationInterconnectionRequest Dedicated port or shared interconnection (also known as Fabric VC) creation request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Interconnection - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Interconnection createOrganizationInterconnection(UUID organizationId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createOrganizationInterconnectionWithHttpInfo(organizationId, createOrganizationInterconnectionRequest, include, exclude); - return localVarResp.getData(); - } - - /** - * Request a new interconnection for the organization - * Creates a new interconnection request. A Project ID must be specified in the request body for connections on shared ports. - * @param organizationId UUID of the organization (required) - * @param createOrganizationInterconnectionRequest Dedicated port or shared interconnection (also known as Fabric VC) creation request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Interconnection> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createOrganizationInterconnectionWithHttpInfo(UUID organizationId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createOrganizationInterconnectionValidateBeforeCall(organizationId, createOrganizationInterconnectionRequest, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Request a new interconnection for the organization (asynchronously) - * Creates a new interconnection request. A Project ID must be specified in the request body for connections on shared ports. - * @param organizationId UUID of the organization (required) - * @param createOrganizationInterconnectionRequest Dedicated port or shared interconnection (also known as Fabric VC) creation request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createOrganizationInterconnectionAsync(UUID organizationId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createOrganizationInterconnectionValidateBeforeCall(organizationId, createOrganizationInterconnectionRequest, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createProjectInterconnection - * @param projectId UUID of the project (required) - * @param createOrganizationInterconnectionRequest Dedicated port or shared interconnection (also known as Fabric VC) creation request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectInterconnectionCall(UUID projectId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createOrganizationInterconnectionRequest; - - // create path and map variables - String localVarPath = "/projects/{project_id}/connections" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createProjectInterconnectionValidateBeforeCall(UUID projectId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling createProjectInterconnection(Async)"); - } - - // verify the required parameter 'createOrganizationInterconnectionRequest' is set - if (createOrganizationInterconnectionRequest == null) { - throw new ApiException("Missing the required parameter 'createOrganizationInterconnectionRequest' when calling createProjectInterconnection(Async)"); - } - - return createProjectInterconnectionCall(projectId, createOrganizationInterconnectionRequest, include, exclude, _callback); - - } - - /** - * Request a new interconnection for the project's organization - * Creates a new interconnection request - * @param projectId UUID of the project (required) - * @param createOrganizationInterconnectionRequest Dedicated port or shared interconnection (also known as Fabric VC) creation request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Interconnection - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
422 unprocessable entity -
- */ - public Interconnection createProjectInterconnection(UUID projectId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createProjectInterconnectionWithHttpInfo(projectId, createOrganizationInterconnectionRequest, include, exclude); - return localVarResp.getData(); - } - - /** - * Request a new interconnection for the project's organization - * Creates a new interconnection request - * @param projectId UUID of the project (required) - * @param createOrganizationInterconnectionRequest Dedicated port or shared interconnection (also known as Fabric VC) creation request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Interconnection> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
422 unprocessable entity -
- */ - public ApiResponse createProjectInterconnectionWithHttpInfo(UUID projectId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createProjectInterconnectionValidateBeforeCall(projectId, createOrganizationInterconnectionRequest, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Request a new interconnection for the project's organization (asynchronously) - * Creates a new interconnection request - * @param projectId UUID of the project (required) - * @param createOrganizationInterconnectionRequest Dedicated port or shared interconnection (also known as Fabric VC) creation request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectInterconnectionAsync(UUID projectId, CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createProjectInterconnectionValidateBeforeCall(projectId, createOrganizationInterconnectionRequest, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteInterconnection - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteInterconnectionCall(UUID connectionId, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connections/{connection_id}" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteInterconnectionValidateBeforeCall(UUID connectionId, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling deleteInterconnection(Async)"); - } - - return deleteInterconnectionCall(connectionId, include, exclude, _callback); - - } - - /** - * Delete interconnection - * Delete a interconnection, its associated ports and virtual circuits. - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Interconnection - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
403 forbidden -
404 not found -
- */ - public Interconnection deleteInterconnection(UUID connectionId, List include, List exclude) throws ApiException { - ApiResponse localVarResp = deleteInterconnectionWithHttpInfo(connectionId, include, exclude); - return localVarResp.getData(); - } - - /** - * Delete interconnection - * Delete a interconnection, its associated ports and virtual circuits. - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Interconnection> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteInterconnectionWithHttpInfo(UUID connectionId, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = deleteInterconnectionValidateBeforeCall(connectionId, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Delete interconnection (asynchronously) - * Delete a interconnection, its associated ports and virtual circuits. - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteInterconnectionAsync(UUID connectionId, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteInterconnectionValidateBeforeCall(connectionId, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVirtualCircuit - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteVirtualCircuitCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/virtual-circuits/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVirtualCircuitValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteVirtualCircuit(Async)"); - } - - return deleteVirtualCircuitCall(id, include, exclude, _callback); - - } - - /** - * Delete a virtual circuit - * Delete a virtual circuit from a Dedicated Port. - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VirtualCircuit - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
403 forbidden -
404 not found -
- */ - public VirtualCircuit deleteVirtualCircuit(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = deleteVirtualCircuitWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Delete a virtual circuit - * Delete a virtual circuit from a Dedicated Port. - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VirtualCircuit> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteVirtualCircuitWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = deleteVirtualCircuitValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Delete a virtual circuit (asynchronously) - * Delete a virtual circuit from a Dedicated Port. - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteVirtualCircuitAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteVirtualCircuitValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getInterconnection - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call getInterconnectionCall(UUID connectionId, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connections/{connection_id}" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getInterconnectionValidateBeforeCall(UUID connectionId, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling getInterconnection(Async)"); - } - - return getInterconnectionCall(connectionId, include, exclude, _callback); - - } - - /** - * Get interconnection - * Get the details of a interconnection - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Interconnection - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public Interconnection getInterconnection(UUID connectionId, List include, List exclude) throws ApiException { - ApiResponse localVarResp = getInterconnectionWithHttpInfo(connectionId, include, exclude); - return localVarResp.getData(); - } - - /** - * Get interconnection - * Get the details of a interconnection - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Interconnection> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse getInterconnectionWithHttpInfo(UUID connectionId, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = getInterconnectionValidateBeforeCall(connectionId, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get interconnection (asynchronously) - * Get the details of a interconnection - * @param connectionId Interconnection UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call getInterconnectionAsync(UUID connectionId, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getInterconnectionValidateBeforeCall(connectionId, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getInterconnectionPort - * @param connectionId UUID of the interconnection (required) - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call getInterconnectionPortCall(UUID connectionId, UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connections/{connection_id}/ports/{id}" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())) - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getInterconnectionPortValidateBeforeCall(UUID connectionId, UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling getInterconnectionPort(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getInterconnectionPort(Async)"); - } - - return getInterconnectionPortCall(connectionId, id, include, exclude, _callback); - - } - - /** - * Get a interconnection port - * Get the details of an interconnection port. - * @param connectionId UUID of the interconnection (required) - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return InterconnectionPort - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public InterconnectionPort getInterconnectionPort(UUID connectionId, UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = getInterconnectionPortWithHttpInfo(connectionId, id, include, exclude); - return localVarResp.getData(); - } - - /** - * Get a interconnection port - * Get the details of an interconnection port. - * @param connectionId UUID of the interconnection (required) - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<InterconnectionPort> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse getInterconnectionPortWithHttpInfo(UUID connectionId, UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = getInterconnectionPortValidateBeforeCall(connectionId, id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a interconnection port (asynchronously) - * Get the details of an interconnection port. - * @param connectionId UUID of the interconnection (required) - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call getInterconnectionPortAsync(UUID connectionId, UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getInterconnectionPortValidateBeforeCall(connectionId, id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getVirtualCircuit - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call getVirtualCircuitCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/virtual-circuits/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getVirtualCircuitValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getVirtualCircuit(Async)"); - } - - return getVirtualCircuitCall(id, include, exclude, _callback); - - } - - /** - * Get a virtual circuit - * Get the details of a virtual circuit - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VirtualCircuit - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public VirtualCircuit getVirtualCircuit(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = getVirtualCircuitWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Get a virtual circuit - * Get the details of a virtual circuit - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VirtualCircuit> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse getVirtualCircuitWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = getVirtualCircuitValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a virtual circuit (asynchronously) - * Get the details of a virtual circuit - * @param id Virtual Circuit UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call getVirtualCircuitAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getVirtualCircuitValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listInterconnectionPortVirtualCircuits - * @param connectionId UUID of the interconnection (required) - * @param portId UUID of the interconnection port (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call listInterconnectionPortVirtualCircuitsCall(UUID connectionId, UUID portId, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connections/{connection_id}/ports/{port_id}/virtual-circuits" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())) - .replace("{" + "port_id" + "}", localVarApiClient.escapeString(portId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listInterconnectionPortVirtualCircuitsValidateBeforeCall(UUID connectionId, UUID portId, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling listInterconnectionPortVirtualCircuits(Async)"); - } - - // verify the required parameter 'portId' is set - if (portId == null) { - throw new ApiException("Missing the required parameter 'portId' when calling listInterconnectionPortVirtualCircuits(Async)"); - } - - return listInterconnectionPortVirtualCircuitsCall(connectionId, portId, include, exclude, _callback); - - } - - /** - * List a interconnection port's virtual circuits - * List the virtual circuit record(s) associatiated with a particular interconnection port. - * @param connectionId UUID of the interconnection (required) - * @param portId UUID of the interconnection port (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VirtualCircuitList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public VirtualCircuitList listInterconnectionPortVirtualCircuits(UUID connectionId, UUID portId, List include, List exclude) throws ApiException { - ApiResponse localVarResp = listInterconnectionPortVirtualCircuitsWithHttpInfo(connectionId, portId, include, exclude); - return localVarResp.getData(); - } - - /** - * List a interconnection port's virtual circuits - * List the virtual circuit record(s) associatiated with a particular interconnection port. - * @param connectionId UUID of the interconnection (required) - * @param portId UUID of the interconnection port (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VirtualCircuitList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse listInterconnectionPortVirtualCircuitsWithHttpInfo(UUID connectionId, UUID portId, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = listInterconnectionPortVirtualCircuitsValidateBeforeCall(connectionId, portId, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List a interconnection port's virtual circuits (asynchronously) - * List the virtual circuit record(s) associatiated with a particular interconnection port. - * @param connectionId UUID of the interconnection (required) - * @param portId UUID of the interconnection port (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call listInterconnectionPortVirtualCircuitsAsync(UUID connectionId, UUID portId, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listInterconnectionPortVirtualCircuitsValidateBeforeCall(connectionId, portId, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listInterconnectionPorts - * @param connectionId UUID of the interconnection (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call listInterconnectionPortsCall(UUID connectionId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connections/{connection_id}/ports" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listInterconnectionPortsValidateBeforeCall(UUID connectionId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling listInterconnectionPorts(Async)"); - } - - return listInterconnectionPortsCall(connectionId, _callback); - - } - - /** - * List a interconnection's ports - * List the ports associated to an interconnection. - * @param connectionId UUID of the interconnection (required) - * @return InterconnectionPortList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public InterconnectionPortList listInterconnectionPorts(UUID connectionId) throws ApiException { - ApiResponse localVarResp = listInterconnectionPortsWithHttpInfo(connectionId); - return localVarResp.getData(); - } - - /** - * List a interconnection's ports - * List the ports associated to an interconnection. - * @param connectionId UUID of the interconnection (required) - * @return ApiResponse<InterconnectionPortList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse listInterconnectionPortsWithHttpInfo(UUID connectionId) throws ApiException { - okhttp3.Call localVarCall = listInterconnectionPortsValidateBeforeCall(connectionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List a interconnection's ports (asynchronously) - * List the ports associated to an interconnection. - * @param connectionId UUID of the interconnection (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call listInterconnectionPortsAsync(UUID connectionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listInterconnectionPortsValidateBeforeCall(connectionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listInterconnectionVirtualCircuits - * @param connectionId UUID of the interconnection (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call listInterconnectionVirtualCircuitsCall(UUID connectionId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connections/{connection_id}/virtual-circuits" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listInterconnectionVirtualCircuitsValidateBeforeCall(UUID connectionId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling listInterconnectionVirtualCircuits(Async)"); - } - - return listInterconnectionVirtualCircuitsCall(connectionId, _callback); - - } - - /** - * List a interconnection's virtual circuits - * List the virtual circuit record(s) associated with a particular interconnection id. - * @param connectionId UUID of the interconnection (required) - * @return VirtualCircuitList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public VirtualCircuitList listInterconnectionVirtualCircuits(UUID connectionId) throws ApiException { - ApiResponse localVarResp = listInterconnectionVirtualCircuitsWithHttpInfo(connectionId); - return localVarResp.getData(); - } - - /** - * List a interconnection's virtual circuits - * List the virtual circuit record(s) associated with a particular interconnection id. - * @param connectionId UUID of the interconnection (required) - * @return ApiResponse<VirtualCircuitList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse listInterconnectionVirtualCircuitsWithHttpInfo(UUID connectionId) throws ApiException { - okhttp3.Call localVarCall = listInterconnectionVirtualCircuitsValidateBeforeCall(connectionId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List a interconnection's virtual circuits (asynchronously) - * List the virtual circuit record(s) associated with a particular interconnection id. - * @param connectionId UUID of the interconnection (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call listInterconnectionVirtualCircuitsAsync(UUID connectionId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listInterconnectionVirtualCircuitsValidateBeforeCall(connectionId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for organizationListInterconnections - * @param organizationId UUID of the organization (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call organizationListInterconnectionsCall(UUID organizationId, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{organization_id}/connections" - .replace("{" + "organization_id" + "}", localVarApiClient.escapeString(organizationId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call organizationListInterconnectionsValidateBeforeCall(UUID organizationId, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { - throw new ApiException("Missing the required parameter 'organizationId' when calling organizationListInterconnections(Async)"); - } - - return organizationListInterconnectionsCall(organizationId, include, exclude, _callback); - - } - - /** - * List organization connections - * List the connections belonging to the organization - * @param organizationId UUID of the organization (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return InterconnectionList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public InterconnectionList organizationListInterconnections(UUID organizationId, List include, List exclude) throws ApiException { - ApiResponse localVarResp = organizationListInterconnectionsWithHttpInfo(organizationId, include, exclude); - return localVarResp.getData(); - } - - /** - * List organization connections - * List the connections belonging to the organization - * @param organizationId UUID of the organization (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<InterconnectionList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse organizationListInterconnectionsWithHttpInfo(UUID organizationId, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = organizationListInterconnectionsValidateBeforeCall(organizationId, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List organization connections (asynchronously) - * List the connections belonging to the organization - * @param organizationId UUID of the organization (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call organizationListInterconnectionsAsync(UUID organizationId, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = organizationListInterconnectionsValidateBeforeCall(organizationId, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for projectListInterconnections - * @param projectId UUID of the project (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call projectListInterconnectionsCall(UUID projectId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{project_id}/connections" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call projectListInterconnectionsValidateBeforeCall(UUID projectId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling projectListInterconnections(Async)"); - } - - return projectListInterconnectionsCall(projectId, include, exclude, page, perPage, _callback); - - } - - /** - * List project connections - * List the connections belonging to the project - * @param projectId UUID of the project (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return InterconnectionList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public InterconnectionList projectListInterconnections(UUID projectId, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = projectListInterconnectionsWithHttpInfo(projectId, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * List project connections - * List the connections belonging to the project - * @param projectId UUID of the project (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<InterconnectionList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse projectListInterconnectionsWithHttpInfo(UUID projectId, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = projectListInterconnectionsValidateBeforeCall(projectId, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List project connections (asynchronously) - * List the connections belonging to the project - * @param projectId UUID of the project (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call projectListInterconnectionsAsync(UUID projectId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = projectListInterconnectionsValidateBeforeCall(projectId, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateInterconnection - * @param connectionId Interconnection UUID (required) - * @param interconnectionUpdateInput Updated interconnection details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call updateInterconnectionCall(UUID connectionId, InterconnectionUpdateInput interconnectionUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = interconnectionUpdateInput; - - // create path and map variables - String localVarPath = "/connections/{connection_id}" - .replace("{" + "connection_id" + "}", localVarApiClient.escapeString(connectionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateInterconnectionValidateBeforeCall(UUID connectionId, InterconnectionUpdateInput interconnectionUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionId' is set - if (connectionId == null) { - throw new ApiException("Missing the required parameter 'connectionId' when calling updateInterconnection(Async)"); - } - - // verify the required parameter 'interconnectionUpdateInput' is set - if (interconnectionUpdateInput == null) { - throw new ApiException("Missing the required parameter 'interconnectionUpdateInput' when calling updateInterconnection(Async)"); - } - - return updateInterconnectionCall(connectionId, interconnectionUpdateInput, include, exclude, _callback); - - } - - /** - * Update interconnection - * Update the details of a interconnection - * @param connectionId Interconnection UUID (required) - * @param interconnectionUpdateInput Updated interconnection details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Interconnection - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public Interconnection updateInterconnection(UUID connectionId, InterconnectionUpdateInput interconnectionUpdateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateInterconnectionWithHttpInfo(connectionId, interconnectionUpdateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update interconnection - * Update the details of a interconnection - * @param connectionId Interconnection UUID (required) - * @param interconnectionUpdateInput Updated interconnection details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Interconnection> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse updateInterconnectionWithHttpInfo(UUID connectionId, InterconnectionUpdateInput interconnectionUpdateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateInterconnectionValidateBeforeCall(connectionId, interconnectionUpdateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update interconnection (asynchronously) - * Update the details of a interconnection - * @param connectionId Interconnection UUID (required) - * @param interconnectionUpdateInput Updated interconnection details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call updateInterconnectionAsync(UUID connectionId, InterconnectionUpdateInput interconnectionUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateInterconnectionValidateBeforeCall(connectionId, interconnectionUpdateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateVirtualCircuit - * @param id Virtual Circuit UUID (required) - * @param virtualCircuitUpdateInput Updated Virtual Circuit details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
202 accepted -
403 forbidden -
404 not found -
- */ - public okhttp3.Call updateVirtualCircuitCall(UUID id, VirtualCircuitUpdateInput virtualCircuitUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = virtualCircuitUpdateInput; - - // create path and map variables - String localVarPath = "/virtual-circuits/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateVirtualCircuitValidateBeforeCall(UUID id, VirtualCircuitUpdateInput virtualCircuitUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateVirtualCircuit(Async)"); - } - - // verify the required parameter 'virtualCircuitUpdateInput' is set - if (virtualCircuitUpdateInput == null) { - throw new ApiException("Missing the required parameter 'virtualCircuitUpdateInput' when calling updateVirtualCircuit(Async)"); - } - - return updateVirtualCircuitCall(id, virtualCircuitUpdateInput, include, exclude, _callback); - - } - - /** - * Update a virtual circuit - * Update the details of a virtual circuit. - * @param id Virtual Circuit UUID (required) - * @param virtualCircuitUpdateInput Updated Virtual Circuit details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VirtualCircuit - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
202 accepted -
403 forbidden -
404 not found -
- */ - public VirtualCircuit updateVirtualCircuit(UUID id, VirtualCircuitUpdateInput virtualCircuitUpdateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateVirtualCircuitWithHttpInfo(id, virtualCircuitUpdateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update a virtual circuit - * Update the details of a virtual circuit. - * @param id Virtual Circuit UUID (required) - * @param virtualCircuitUpdateInput Updated Virtual Circuit details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VirtualCircuit> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
202 accepted -
403 forbidden -
404 not found -
- */ - public ApiResponse updateVirtualCircuitWithHttpInfo(UUID id, VirtualCircuitUpdateInput virtualCircuitUpdateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateVirtualCircuitValidateBeforeCall(id, virtualCircuitUpdateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a virtual circuit (asynchronously) - * Update the details of a virtual circuit. - * @param id Virtual Circuit UUID (required) - * @param virtualCircuitUpdateInput Updated Virtual Circuit details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
202 accepted -
403 forbidden -
404 not found -
- */ - public okhttp3.Call updateVirtualCircuitAsync(UUID id, VirtualCircuitUpdateInput virtualCircuitUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateVirtualCircuitValidateBeforeCall(id, virtualCircuitUpdateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvitationsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvitationsApi.java deleted file mode 100644 index 8a030488f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvitationsApi.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Invitation; -import com.equinix.openapi.metal.v1.model.Membership; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class InvitationsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public InvitationsApi() { - this(Configuration.getDefaultApiClient()); - } - - public InvitationsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for acceptInvitation - * @param id Invitation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call acceptInvitationCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/invitations/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call acceptInvitationValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling acceptInvitation(Async)"); - } - - return acceptInvitationCall(id, include, _callback); - - } - - /** - * Accept an invitation - * Accept an invitation. - * @param id Invitation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Membership - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Membership acceptInvitation(UUID id, List include) throws ApiException { - ApiResponse localVarResp = acceptInvitationWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Accept an invitation - * Accept an invitation. - * @param id Invitation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Membership> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse acceptInvitationWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = acceptInvitationValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Accept an invitation (asynchronously) - * Accept an invitation. - * @param id Invitation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call acceptInvitationAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = acceptInvitationValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for declineInvitation - * @param id Invitation UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call declineInvitationCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/invitations/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call declineInvitationValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling declineInvitation(Async)"); - } - - return declineInvitationCall(id, _callback); - - } - - /** - * Decline an invitation - * Decline an invitation. - * @param id Invitation UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void declineInvitation(UUID id) throws ApiException { - declineInvitationWithHttpInfo(id); - } - - /** - * Decline an invitation - * Decline an invitation. - * @param id Invitation UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse declineInvitationWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = declineInvitationValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Decline an invitation (asynchronously) - * Decline an invitation. - * @param id Invitation UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call declineInvitationAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = declineInvitationValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findInvitationById - * @param id Invitation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInvitationByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/invitations/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findInvitationByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findInvitationById(Async)"); - } - - return findInvitationByIdCall(id, include, _callback); - - } - - /** - * View an invitation - * Returns a single invitation. (It include the `invitable` to maintain backward compatibility but will be removed soon) - * @param id Invitation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Invitation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Invitation findInvitationById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findInvitationByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * View an invitation - * Returns a single invitation. (It include the `invitable` to maintain backward compatibility but will be removed soon) - * @param id Invitation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Invitation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findInvitationByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findInvitationByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * View an invitation (asynchronously) - * Returns a single invitation. (It include the `invitable` to maintain backward compatibility but will be removed soon) - * @param id Invitation UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInvitationByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findInvitationByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvoicesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvoicesApi.java deleted file mode 100644 index de6af58e3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/InvoicesApi.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Invoice; -import com.equinix.openapi.metal.v1.model.InvoiceList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class InvoicesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public InvoicesApi() { - this(Configuration.getDefaultApiClient()); - } - - public InvoicesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findOrganizationInvoices - * @param id Organization UUID (required) - * @param page page number (optional) - * @param perPage per page (optional) - * @param status filter by status (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findOrganizationInvoicesCall(UUID id, Integer page, Integer perPage, String status, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/invoices" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - if (status != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationInvoicesValidateBeforeCall(UUID id, Integer page, Integer perPage, String status, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationInvoices(Async)"); - } - - return findOrganizationInvoicesCall(id, page, perPage, status, _callback); - - } - - /** - * Retrieve all invoices for an organization - * Returns all invoices for an organization - * @param id Organization UUID (required) - * @param page page number (optional) - * @param perPage per page (optional) - * @param status filter by status (optional) - * @return InvoiceList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public InvoiceList findOrganizationInvoices(UUID id, Integer page, Integer perPage, String status) throws ApiException { - ApiResponse localVarResp = findOrganizationInvoicesWithHttpInfo(id, page, perPage, status); - return localVarResp.getData(); - } - - /** - * Retrieve all invoices for an organization - * Returns all invoices for an organization - * @param id Organization UUID (required) - * @param page page number (optional) - * @param perPage per page (optional) - * @param status filter by status (optional) - * @return ApiResponse<InvoiceList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findOrganizationInvoicesWithHttpInfo(UUID id, Integer page, Integer perPage, String status) throws ApiException { - okhttp3.Call localVarCall = findOrganizationInvoicesValidateBeforeCall(id, page, perPage, status, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all invoices for an organization (asynchronously) - * Returns all invoices for an organization - * @param id Organization UUID (required) - * @param page page number (optional) - * @param perPage per page (optional) - * @param status filter by status (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findOrganizationInvoicesAsync(UUID id, Integer page, Integer perPage, String status, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationInvoicesValidateBeforeCall(id, page, perPage, status, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getInvoiceById - * @param id Invoice UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call getInvoiceByIdCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/invoices/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getInvoiceByIdValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getInvoiceById(Async)"); - } - - return getInvoiceByIdCall(id, _callback); - - } - - /** - * Retrieve an invoice - * Returns the invoice identified by the provided id - * @param id Invoice UUID (required) - * @return Invoice - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public Invoice getInvoiceById(UUID id) throws ApiException { - ApiResponse localVarResp = getInvoiceByIdWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve an invoice - * Returns the invoice identified by the provided id - * @param id Invoice UUID (required) - * @return ApiResponse<Invoice> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse getInvoiceByIdWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = getInvoiceByIdValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve an invoice (asynchronously) - * Returns the invoice identified by the provided id - * @param id Invoice UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call getInvoiceByIdAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getInvoiceByIdValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IpAddressesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IpAddressesApi.java deleted file mode 100644 index 3c39902e3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/IpAddressesApi.java +++ /dev/null @@ -1,1131 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FindIPAddressById200Response; -import com.equinix.openapi.metal.v1.model.IPAssignmentUpdateInput; -import com.equinix.openapi.metal.v1.model.IPAvailabilitiesList; -import com.equinix.openapi.metal.v1.model.IPReservationList; -import com.equinix.openapi.metal.v1.model.RequestIPReservation201Response; -import com.equinix.openapi.metal.v1.model.RequestIPReservationRequest; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class IpAddressesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public IpAddressesApi() { - this(Configuration.getDefaultApiClient()); - } - - public IpAddressesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for deleteIPAddress - * @param id IP Address UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteIPAddressCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ips/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteIPAddressValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteIPAddress(Async)"); - } - - return deleteIPAddressCall(id, _callback); - - } - - /** - * Unassign an ip address - * This call can be used to un-assign an IP assignment or delete an IP reservation. Un-assign an IP address record. Use the assignment UUID you get after attaching the IP. This will remove the relationship between an IP and the device or metal gateway and will make the IP address available to be assigned to another device, once the IP has been un-configured from the network. Delete an IP reservation. Use the reservation UUID you get after adding the IP to the project. This will permanently delete the IP block reservation from the project. - * @param id IP Address UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteIPAddress(UUID id) throws ApiException { - deleteIPAddressWithHttpInfo(id); - } - - /** - * Unassign an ip address - * This call can be used to un-assign an IP assignment or delete an IP reservation. Un-assign an IP address record. Use the assignment UUID you get after attaching the IP. This will remove the relationship between an IP and the device or metal gateway and will make the IP address available to be assigned to another device, once the IP has been un-configured from the network. Delete an IP reservation. Use the reservation UUID you get after adding the IP to the project. This will permanently delete the IP block reservation from the project. - * @param id IP Address UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteIPAddressWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteIPAddressValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Unassign an ip address (asynchronously) - * This call can be used to un-assign an IP assignment or delete an IP reservation. Un-assign an IP address record. Use the assignment UUID you get after attaching the IP. This will remove the relationship between an IP and the device or metal gateway and will make the IP address available to be assigned to another device, once the IP has been un-configured from the network. Delete an IP reservation. Use the reservation UUID you get after adding the IP to the project. This will permanently delete the IP block reservation from the project. - * @param id IP Address UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteIPAddressAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteIPAddressValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findIPAddressById - * @param id IP Address UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPAddressByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ips/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findIPAddressByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findIPAddressById(Async)"); - } - - return findIPAddressByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve an ip address - * Returns a single ip address if the user has access. - * @param id IP Address UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return FindIPAddressById200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public FindIPAddressById200Response findIPAddressById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findIPAddressByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve an ip address - * Returns a single ip address if the user has access. - * @param id IP Address UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<FindIPAddressById200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findIPAddressByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findIPAddressByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve an ip address (asynchronously) - * Returns a single ip address if the user has access. - * @param id IP Address UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPAddressByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findIPAddressByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findIPAddressCustomdata - * @param id Ip Reservation UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPAddressCustomdataCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ips/{id}/customdata" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findIPAddressCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findIPAddressCustomdata(Async)"); - } - - return findIPAddressCustomdataCall(id, _callback); - - } - - /** - * Retrieve the custom metadata of an IP Reservation or IP Assignment - * Provides the custom metadata stored for this IP Reservation or IP Assignment in json format - * @param id Ip Reservation UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void findIPAddressCustomdata(UUID id) throws ApiException { - findIPAddressCustomdataWithHttpInfo(id); - } - - /** - * Retrieve the custom metadata of an IP Reservation or IP Assignment - * Provides the custom metadata stored for this IP Reservation or IP Assignment in json format - * @param id Ip Reservation UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findIPAddressCustomdataWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findIPAddressCustomdataValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve the custom metadata of an IP Reservation or IP Assignment (asynchronously) - * Provides the custom metadata stored for this IP Reservation or IP Assignment in json format - * @param id Ip Reservation UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPAddressCustomdataAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findIPAddressCustomdataValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findIPAvailabilities - * @param id IP Reservation UUID (required) - * @param cidr Size of subnets in bits (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPAvailabilitiesCall(UUID id, String cidr, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ips/{id}/available" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (cidr != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cidr", cidr)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findIPAvailabilitiesValidateBeforeCall(UUID id, String cidr, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findIPAvailabilities(Async)"); - } - - // verify the required parameter 'cidr' is set - if (cidr == null) { - throw new ApiException("Missing the required parameter 'cidr' when calling findIPAvailabilities(Async)"); - } - - return findIPAvailabilitiesCall(id, cidr, _callback); - - } - - /** - * Retrieve all available subnets of a particular reservation - * Provides a list of IP resevations for a single project. - * @param id IP Reservation UUID (required) - * @param cidr Size of subnets in bits (required) - * @return IPAvailabilitiesList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public IPAvailabilitiesList findIPAvailabilities(UUID id, String cidr) throws ApiException { - ApiResponse localVarResp = findIPAvailabilitiesWithHttpInfo(id, cidr); - return localVarResp.getData(); - } - - /** - * Retrieve all available subnets of a particular reservation - * Provides a list of IP resevations for a single project. - * @param id IP Reservation UUID (required) - * @param cidr Size of subnets in bits (required) - * @return ApiResponse<IPAvailabilitiesList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findIPAvailabilitiesWithHttpInfo(UUID id, String cidr) throws ApiException { - okhttp3.Call localVarCall = findIPAvailabilitiesValidateBeforeCall(id, cidr, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all available subnets of a particular reservation (asynchronously) - * Provides a list of IP resevations for a single project. - * @param id IP Reservation UUID (required) - * @param cidr Size of subnets in bits (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPAvailabilitiesAsync(UUID id, String cidr, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findIPAvailabilitiesValidateBeforeCall(id, cidr, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findIPReservations - * @param id Project UUID (required) - * @param types Filter project IP reservations by reservation type (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param perPage Items returned per page (optional, default to 250) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPReservationsCall(UUID id, List types, List include, List exclude, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/ips" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (types != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "types", types)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findIPReservationsValidateBeforeCall(UUID id, List types, List include, List exclude, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findIPReservations(Async)"); - } - - return findIPReservationsCall(id, types, include, exclude, perPage, _callback); - - } - - /** - * Retrieve all ip reservations - * Provides a paginated list of IP reservations for a single project. - * @param id Project UUID (required) - * @param types Filter project IP reservations by reservation type (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param perPage Items returned per page (optional, default to 250) - * @return IPReservationList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public IPReservationList findIPReservations(UUID id, List types, List include, List exclude, Integer perPage) throws ApiException { - ApiResponse localVarResp = findIPReservationsWithHttpInfo(id, types, include, exclude, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all ip reservations - * Provides a paginated list of IP reservations for a single project. - * @param id Project UUID (required) - * @param types Filter project IP reservations by reservation type (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param perPage Items returned per page (optional, default to 250) - * @return ApiResponse<IPReservationList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findIPReservationsWithHttpInfo(UUID id, List types, List include, List exclude, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findIPReservationsValidateBeforeCall(id, types, include, exclude, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all ip reservations (asynchronously) - * Provides a paginated list of IP reservations for a single project. - * @param id Project UUID (required) - * @param types Filter project IP reservations by reservation type (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param perPage Items returned per page (optional, default to 250) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPReservationsAsync(UUID id, List types, List include, List exclude, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findIPReservationsValidateBeforeCall(id, types, include, exclude, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for requestIPReservation - * @param id Project UUID (required) - * @param requestIPReservationRequest IP Reservation Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call requestIPReservationCall(UUID id, RequestIPReservationRequest requestIPReservationRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = requestIPReservationRequest; - - // create path and map variables - String localVarPath = "/projects/{id}/ips" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call requestIPReservationValidateBeforeCall(UUID id, RequestIPReservationRequest requestIPReservationRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling requestIPReservation(Async)"); - } - - // verify the required parameter 'requestIPReservationRequest' is set - if (requestIPReservationRequest == null) { - throw new ApiException("Missing the required parameter 'requestIPReservationRequest' when calling requestIPReservation(Async)"); - } - - return requestIPReservationCall(id, requestIPReservationRequest, include, exclude, _callback); - - } - - /** - * Requesting IP reservations - * Request more IP space for a project in order to have additional IP addresses to assign to devices. If the request is within the max quota, an IP reservation will be created. If the project will exceed its IP quota, a request will be submitted for review, and will return an IP Reservation with a `state` of `pending`. You can automatically have the request fail with HTTP status 422 instead of triggering the review process by providing the `fail_on_approval_required` parameter set to `true` in the request. - * @param id Project UUID (required) - * @param requestIPReservationRequest IP Reservation Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return RequestIPReservation201Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public RequestIPReservation201Response requestIPReservation(UUID id, RequestIPReservationRequest requestIPReservationRequest, List include, List exclude) throws ApiException { - ApiResponse localVarResp = requestIPReservationWithHttpInfo(id, requestIPReservationRequest, include, exclude); - return localVarResp.getData(); - } - - /** - * Requesting IP reservations - * Request more IP space for a project in order to have additional IP addresses to assign to devices. If the request is within the max quota, an IP reservation will be created. If the project will exceed its IP quota, a request will be submitted for review, and will return an IP Reservation with a `state` of `pending`. You can automatically have the request fail with HTTP status 422 instead of triggering the review process by providing the `fail_on_approval_required` parameter set to `true` in the request. - * @param id Project UUID (required) - * @param requestIPReservationRequest IP Reservation Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<RequestIPReservation201Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse requestIPReservationWithHttpInfo(UUID id, RequestIPReservationRequest requestIPReservationRequest, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = requestIPReservationValidateBeforeCall(id, requestIPReservationRequest, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Requesting IP reservations (asynchronously) - * Request more IP space for a project in order to have additional IP addresses to assign to devices. If the request is within the max quota, an IP reservation will be created. If the project will exceed its IP quota, a request will be submitted for review, and will return an IP Reservation with a `state` of `pending`. You can automatically have the request fail with HTTP status 422 instead of triggering the review process by providing the `fail_on_approval_required` parameter set to `true` in the request. - * @param id Project UUID (required) - * @param requestIPReservationRequest IP Reservation Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call requestIPReservationAsync(UUID id, RequestIPReservationRequest requestIPReservationRequest, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = requestIPReservationValidateBeforeCall(id, requestIPReservationRequest, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateIPAddress - * @param id IP Address UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param ipAssignmentUpdateInput (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call updateIPAddressCall(UUID id, List include, List exclude, IPAssignmentUpdateInput ipAssignmentUpdateInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = ipAssignmentUpdateInput; - - // create path and map variables - String localVarPath = "/ips/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateIPAddressValidateBeforeCall(UUID id, List include, List exclude, IPAssignmentUpdateInput ipAssignmentUpdateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateIPAddress(Async)"); - } - - return updateIPAddressCall(id, include, exclude, ipAssignmentUpdateInput, _callback); - - } - - /** - * Update an ip address - * Update details about an ip address - * @param id IP Address UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param ipAssignmentUpdateInput (optional) - * @return FindIPAddressById200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public FindIPAddressById200Response updateIPAddress(UUID id, List include, List exclude, IPAssignmentUpdateInput ipAssignmentUpdateInput) throws ApiException { - ApiResponse localVarResp = updateIPAddressWithHttpInfo(id, include, exclude, ipAssignmentUpdateInput); - return localVarResp.getData(); - } - - /** - * Update an ip address - * Update details about an ip address - * @param id IP Address UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param ipAssignmentUpdateInput (optional) - * @return ApiResponse<FindIPAddressById200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse updateIPAddressWithHttpInfo(UUID id, List include, List exclude, IPAssignmentUpdateInput ipAssignmentUpdateInput) throws ApiException { - okhttp3.Call localVarCall = updateIPAddressValidateBeforeCall(id, include, exclude, ipAssignmentUpdateInput, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update an ip address (asynchronously) - * Update details about an ip address - * @param id IP Address UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param ipAssignmentUpdateInput (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call updateIPAddressAsync(UUID id, List include, List exclude, IPAssignmentUpdateInput ipAssignmentUpdateInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateIPAddressValidateBeforeCall(id, include, exclude, ipAssignmentUpdateInput, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/LicensesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/LicensesApi.java deleted file mode 100644 index 1e8380ecb..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/LicensesApi.java +++ /dev/null @@ -1,859 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.License; -import com.equinix.openapi.metal.v1.model.LicenseCreateInput; -import com.equinix.openapi.metal.v1.model.LicenseList; -import com.equinix.openapi.metal.v1.model.LicenseUpdateInput; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class LicensesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public LicensesApi() { - this(Configuration.getDefaultApiClient()); - } - - public LicensesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createLicense - * @param id Project UUID (required) - * @param licenseCreateInput License to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createLicenseCall(UUID id, LicenseCreateInput licenseCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = licenseCreateInput; - - // create path and map variables - String localVarPath = "/projects/{id}/licenses" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createLicenseValidateBeforeCall(UUID id, LicenseCreateInput licenseCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createLicense(Async)"); - } - - // verify the required parameter 'licenseCreateInput' is set - if (licenseCreateInput == null) { - throw new ApiException("Missing the required parameter 'licenseCreateInput' when calling createLicense(Async)"); - } - - return createLicenseCall(id, licenseCreateInput, include, exclude, _callback); - - } - - /** - * Create a License - * Creates a new license for the given project - * @param id Project UUID (required) - * @param licenseCreateInput License to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return License - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public License createLicense(UUID id, LicenseCreateInput licenseCreateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createLicenseWithHttpInfo(id, licenseCreateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a License - * Creates a new license for the given project - * @param id Project UUID (required) - * @param licenseCreateInput License to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<License> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createLicenseWithHttpInfo(UUID id, LicenseCreateInput licenseCreateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createLicenseValidateBeforeCall(id, licenseCreateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a License (asynchronously) - * Creates a new license for the given project - * @param id Project UUID (required) - * @param licenseCreateInput License to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createLicenseAsync(UUID id, LicenseCreateInput licenseCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createLicenseValidateBeforeCall(id, licenseCreateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteLicense - * @param id License UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteLicenseCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/licenses/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteLicenseValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteLicense(Async)"); - } - - return deleteLicenseCall(id, _callback); - - } - - /** - * Delete the license - * Deletes a license. - * @param id License UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteLicense(UUID id) throws ApiException { - deleteLicenseWithHttpInfo(id); - } - - /** - * Delete the license - * Deletes a license. - * @param id License UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteLicenseWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteLicenseValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the license (asynchronously) - * Deletes a license. - * @param id License UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteLicenseAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteLicenseValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findLicenseById - * @param id License UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findLicenseByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/licenses/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findLicenseByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findLicenseById(Async)"); - } - - return findLicenseByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve a license - * Returns a license - * @param id License UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return License - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public License findLicenseById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findLicenseByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve a license - * Returns a license - * @param id License UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<License> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findLicenseByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findLicenseByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a license (asynchronously) - * Returns a license - * @param id License UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findLicenseByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findLicenseByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectLicenses - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectLicensesCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/licenses" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectLicensesValidateBeforeCall(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectLicenses(Async)"); - } - - return findProjectLicensesCall(id, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve all licenses - * Provides a collection of licenses for a given project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return LicenseList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public LicenseList findProjectLicenses(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findProjectLicensesWithHttpInfo(id, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all licenses - * Provides a collection of licenses for a given project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<LicenseList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findProjectLicensesWithHttpInfo(UUID id, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findProjectLicensesValidateBeforeCall(id, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all licenses (asynchronously) - * Provides a collection of licenses for a given project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectLicensesAsync(UUID id, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectLicensesValidateBeforeCall(id, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateLicense - * @param id License UUID (required) - * @param licenseUpdateInput License to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateLicenseCall(UUID id, LicenseUpdateInput licenseUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = licenseUpdateInput; - - // create path and map variables - String localVarPath = "/licenses/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateLicenseValidateBeforeCall(UUID id, LicenseUpdateInput licenseUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateLicense(Async)"); - } - - // verify the required parameter 'licenseUpdateInput' is set - if (licenseUpdateInput == null) { - throw new ApiException("Missing the required parameter 'licenseUpdateInput' when calling updateLicense(Async)"); - } - - return updateLicenseCall(id, licenseUpdateInput, include, exclude, _callback); - - } - - /** - * Update the license - * Updates the license. - * @param id License UUID (required) - * @param licenseUpdateInput License to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return License - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public License updateLicense(UUID id, LicenseUpdateInput licenseUpdateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateLicenseWithHttpInfo(id, licenseUpdateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update the license - * Updates the license. - * @param id License UUID (required) - * @param licenseUpdateInput License to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<License> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateLicenseWithHttpInfo(UUID id, LicenseUpdateInput licenseUpdateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateLicenseValidateBeforeCall(id, licenseUpdateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the license (asynchronously) - * Updates the license. - * @param id License UUID (required) - * @param licenseUpdateInput License to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateLicenseAsync(UUID id, LicenseUpdateInput licenseUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateLicenseValidateBeforeCall(id, licenseUpdateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MembershipsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MembershipsApi.java deleted file mode 100644 index 6cf3814b0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MembershipsApi.java +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Membership; -import com.equinix.openapi.metal.v1.model.MembershipInput; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class MembershipsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public MembershipsApi() { - this(Configuration.getDefaultApiClient()); - } - - public MembershipsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for deleteMembership - * @param id Membership UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteMembershipCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/memberships/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteMembershipValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteMembership(Async)"); - } - - return deleteMembershipCall(id, _callback); - - } - - /** - * Delete the membership - * Deletes the membership. - * @param id Membership UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteMembership(UUID id) throws ApiException { - deleteMembershipWithHttpInfo(id); - } - - /** - * Delete the membership - * Deletes the membership. - * @param id Membership UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteMembershipWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteMembershipValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the membership (asynchronously) - * Deletes the membership. - * @param id Membership UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteMembershipAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteMembershipValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findMembershipById - * @param id Membership UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findMembershipByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/memberships/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findMembershipByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findMembershipById(Async)"); - } - - return findMembershipByIdCall(id, include, _callback); - - } - - /** - * Retrieve a membership - * Returns a single membership. - * @param id Membership UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Membership - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Membership findMembershipById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findMembershipByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve a membership - * Returns a single membership. - * @param id Membership UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Membership> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findMembershipByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findMembershipByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a membership (asynchronously) - * Returns a single membership. - * @param id Membership UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findMembershipByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findMembershipByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateMembership - * @param id Membership UUID (required) - * @param membershipInput Membership to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateMembershipCall(UUID id, MembershipInput membershipInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = membershipInput; - - // create path and map variables - String localVarPath = "/memberships/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateMembershipValidateBeforeCall(UUID id, MembershipInput membershipInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateMembership(Async)"); - } - - // verify the required parameter 'membershipInput' is set - if (membershipInput == null) { - throw new ApiException("Missing the required parameter 'membershipInput' when calling updateMembership(Async)"); - } - - return updateMembershipCall(id, membershipInput, include, _callback); - - } - - /** - * Update the membership - * Updates the membership. - * @param id Membership UUID (required) - * @param membershipInput Membership to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Membership - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Membership updateMembership(UUID id, MembershipInput membershipInput, List include) throws ApiException { - ApiResponse localVarResp = updateMembershipWithHttpInfo(id, membershipInput, include); - return localVarResp.getData(); - } - - /** - * Update the membership - * Updates the membership. - * @param id Membership UUID (required) - * @param membershipInput Membership to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Membership> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateMembershipWithHttpInfo(UUID id, MembershipInput membershipInput, List include) throws ApiException { - okhttp3.Call localVarCall = updateMembershipValidateBeforeCall(id, membershipInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the membership (asynchronously) - * Updates the membership. - * @param id Membership UUID (required) - * @param membershipInput Membership to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateMembershipAsync(UUID id, MembershipInput membershipInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateMembershipValidateBeforeCall(id, membershipInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApi.java deleted file mode 100644 index 5fd71a8ab..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApi.java +++ /dev/null @@ -1,1028 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.CreateMetalGatewayRequest; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FindMetalGatewayById200Response; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPAssignmentList; -import com.equinix.openapi.metal.v1.model.MetalGatewayElasticIpCreateInput; -import com.equinix.openapi.metal.v1.model.MetalGatewayList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class MetalGatewaysApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public MetalGatewaysApi() { - this(Configuration.getDefaultApiClient()); - } - - public MetalGatewaysApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createMetalGateway - * @param projectId Project UUID (required) - * @param createMetalGatewayRequest Metal Gateway to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createMetalGatewayCall(UUID projectId, CreateMetalGatewayRequest createMetalGatewayRequest, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createMetalGatewayRequest; - - // create path and map variables - String localVarPath = "/projects/{project_id}/metal-gateways" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createMetalGatewayValidateBeforeCall(UUID projectId, CreateMetalGatewayRequest createMetalGatewayRequest, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling createMetalGateway(Async)"); - } - - // verify the required parameter 'createMetalGatewayRequest' is set - if (createMetalGatewayRequest == null) { - throw new ApiException("Missing the required parameter 'createMetalGatewayRequest' when calling createMetalGateway(Async)"); - } - - return createMetalGatewayCall(projectId, createMetalGatewayRequest, include, exclude, page, perPage, _callback); - - } - - /** - * Create a metal gateway - * Create a metal gateway in a project - * @param projectId Project UUID (required) - * @param createMetalGatewayRequest Metal Gateway to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return FindMetalGatewayById200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public FindMetalGatewayById200Response createMetalGateway(UUID projectId, CreateMetalGatewayRequest createMetalGatewayRequest, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = createMetalGatewayWithHttpInfo(projectId, createMetalGatewayRequest, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Create a metal gateway - * Create a metal gateway in a project - * @param projectId Project UUID (required) - * @param createMetalGatewayRequest Metal Gateway to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<FindMetalGatewayById200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createMetalGatewayWithHttpInfo(UUID projectId, CreateMetalGatewayRequest createMetalGatewayRequest, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = createMetalGatewayValidateBeforeCall(projectId, createMetalGatewayRequest, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a metal gateway (asynchronously) - * Create a metal gateway in a project - * @param projectId Project UUID (required) - * @param createMetalGatewayRequest Metal Gateway to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createMetalGatewayAsync(UUID projectId, CreateMetalGatewayRequest createMetalGatewayRequest, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createMetalGatewayValidateBeforeCall(projectId, createMetalGatewayRequest, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createMetalGatewayElasticIp - * @param id Metal Gateway UUID (required) - * @param metalGatewayElasticIpCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public okhttp3.Call createMetalGatewayElasticIpCall(UUID id, MetalGatewayElasticIpCreateInput metalGatewayElasticIpCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = metalGatewayElasticIpCreateInput; - - // create path and map variables - String localVarPath = "/metal-gateways/{id}/ips" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createMetalGatewayElasticIpValidateBeforeCall(UUID id, MetalGatewayElasticIpCreateInput metalGatewayElasticIpCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createMetalGatewayElasticIp(Async)"); - } - - // verify the required parameter 'metalGatewayElasticIpCreateInput' is set - if (metalGatewayElasticIpCreateInput == null) { - throw new ApiException("Missing the required parameter 'metalGatewayElasticIpCreateInput' when calling createMetalGatewayElasticIp(Async)"); - } - - return createMetalGatewayElasticIpCall(id, metalGatewayElasticIpCreateInput, include, exclude, _callback); - - } - - /** - * Create a Metal Gateway Elastic IP - * Create a new Elastic IP on this Metal Gateway. Assign an IPv4 range as an elastic IP to the Metal Gateway, with a specified next-hop address contained within the Metal Gateway. Notice: Elastic IPs on Metal Gateways are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id Metal Gateway UUID (required) - * @param metalGatewayElasticIpCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return IPAssignment - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public IPAssignment createMetalGatewayElasticIp(UUID id, MetalGatewayElasticIpCreateInput metalGatewayElasticIpCreateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createMetalGatewayElasticIpWithHttpInfo(id, metalGatewayElasticIpCreateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a Metal Gateway Elastic IP - * Create a new Elastic IP on this Metal Gateway. Assign an IPv4 range as an elastic IP to the Metal Gateway, with a specified next-hop address contained within the Metal Gateway. Notice: Elastic IPs on Metal Gateways are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id Metal Gateway UUID (required) - * @param metalGatewayElasticIpCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<IPAssignment> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public ApiResponse createMetalGatewayElasticIpWithHttpInfo(UUID id, MetalGatewayElasticIpCreateInput metalGatewayElasticIpCreateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createMetalGatewayElasticIpValidateBeforeCall(id, metalGatewayElasticIpCreateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a Metal Gateway Elastic IP (asynchronously) - * Create a new Elastic IP on this Metal Gateway. Assign an IPv4 range as an elastic IP to the Metal Gateway, with a specified next-hop address contained within the Metal Gateway. Notice: Elastic IPs on Metal Gateways are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id Metal Gateway UUID (required) - * @param metalGatewayElasticIpCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public okhttp3.Call createMetalGatewayElasticIpAsync(UUID id, MetalGatewayElasticIpCreateInput metalGatewayElasticIpCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createMetalGatewayElasticIpValidateBeforeCall(id, metalGatewayElasticIpCreateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteMetalGateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deleteMetalGatewayCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/metal-gateways/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteMetalGatewayValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteMetalGateway(Async)"); - } - - return deleteMetalGatewayCall(id, include, exclude, _callback); - - } - - /** - * Deletes the metal gateway - * Deletes a metal gateway and any elastic IP assignments associated with this metal gateway. - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return FindMetalGatewayById200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
401 unauthorized -
404 not found -
- */ - public FindMetalGatewayById200Response deleteMetalGateway(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = deleteMetalGatewayWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Deletes the metal gateway - * Deletes a metal gateway and any elastic IP assignments associated with this metal gateway. - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<FindMetalGatewayById200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
401 unauthorized -
404 not found -
- */ - public ApiResponse deleteMetalGatewayWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = deleteMetalGatewayValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Deletes the metal gateway (asynchronously) - * Deletes a metal gateway and any elastic IP assignments associated with this metal gateway. - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
202 accepted -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deleteMetalGatewayAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteMetalGatewayValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findMetalGatewayById - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findMetalGatewayByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/metal-gateways/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findMetalGatewayByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findMetalGatewayById(Async)"); - } - - return findMetalGatewayByIdCall(id, include, exclude, _callback); - - } - - /** - * Returns the metal gateway - * Returns a specific metal gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return FindMetalGatewayById200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public FindMetalGatewayById200Response findMetalGatewayById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findMetalGatewayByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Returns the metal gateway - * Returns a specific metal gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<FindMetalGatewayById200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findMetalGatewayByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findMetalGatewayByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Returns the metal gateway (asynchronously) - * Returns a specific metal gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findMetalGatewayByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findMetalGatewayByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findMetalGatewaysByProject - * @param projectId Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findMetalGatewaysByProjectCall(UUID projectId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{project_id}/metal-gateways" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findMetalGatewaysByProjectValidateBeforeCall(UUID projectId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling findMetalGatewaysByProject(Async)"); - } - - return findMetalGatewaysByProjectCall(projectId, include, exclude, page, perPage, _callback); - - } - - /** - * Returns all metal gateways for a project - * Return all metal gateways for a project - * @param projectId Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return MetalGatewayList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public MetalGatewayList findMetalGatewaysByProject(UUID projectId, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findMetalGatewaysByProjectWithHttpInfo(projectId, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Returns all metal gateways for a project - * Return all metal gateways for a project - * @param projectId Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<MetalGatewayList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findMetalGatewaysByProjectWithHttpInfo(UUID projectId, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findMetalGatewaysByProjectValidateBeforeCall(projectId, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Returns all metal gateways for a project (asynchronously) - * Return all metal gateways for a project - * @param projectId Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findMetalGatewaysByProjectAsync(UUID projectId, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findMetalGatewaysByProjectValidateBeforeCall(projectId, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getMetalGatewayElasticIps - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call getMetalGatewayElasticIpsCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/metal-gateways/{id}/ips" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getMetalGatewayElasticIpsValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getMetalGatewayElasticIps(Async)"); - } - - return getMetalGatewayElasticIpsCall(id, include, exclude, _callback); - - } - - /** - * List Metal Gateway Elastic IPs - * Returns the list of Elastic IPs assigned to this Metal Gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return IPAssignmentList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public IPAssignmentList getMetalGatewayElasticIps(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = getMetalGatewayElasticIpsWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * List Metal Gateway Elastic IPs - * Returns the list of Elastic IPs assigned to this Metal Gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<IPAssignmentList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public ApiResponse getMetalGatewayElasticIpsWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = getMetalGatewayElasticIpsValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List Metal Gateway Elastic IPs (asynchronously) - * Returns the list of Elastic IPs assigned to this Metal Gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call getMetalGatewayElasticIpsAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getMetalGatewayElasticIpsValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetrosApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetrosApi.java deleted file mode 100644 index 4db4b228c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/MetrosApi.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.MetroList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class MetrosApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public MetrosApi() { - this(Configuration.getDefaultApiClient()); - } - - public MetrosApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findMetros - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findMetrosCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/locations/metros"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findMetrosValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return findMetrosCall(_callback); - - } - - /** - * Retrieve all metros - * Provides a listing of available metros - * @return MetroList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public MetroList findMetros() throws ApiException { - ApiResponse localVarResp = findMetrosWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Retrieve all metros - * Provides a listing of available metros - * @return ApiResponse<MetroList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findMetrosWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = findMetrosValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all metros (asynchronously) - * Provides a listing of available metros - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findMetrosAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findMetrosValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getMetro - * @param id Metro UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
404 not found -
- */ - public okhttp3.Call getMetroCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/locations/metros/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getMetroValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getMetro(Async)"); - } - - return getMetroCall(id, _callback); - - } - - /** - * Retrieve a specific Metro's details - * Show the details for a metro, including name, code, and country. - * @param id Metro UUID (required) - * @return Metro - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
404 not found -
- */ - public Metro getMetro(UUID id) throws ApiException { - ApiResponse localVarResp = getMetroWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve a specific Metro's details - * Show the details for a metro, including name, code, and country. - * @param id Metro UUID (required) - * @return ApiResponse<Metro> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
404 not found -
- */ - public ApiResponse getMetroWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = getMetroValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a specific Metro's details (asynchronously) - * Show the details for a metro, including name, code, and country. - * @param id Metro UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
404 not found -
- */ - public okhttp3.Call getMetroAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getMetroValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApi.java deleted file mode 100644 index bf2580719..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApi.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.OperatingSystemList; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class OperatingSystemsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public OperatingSystemsApi() { - this(Configuration.getDefaultApiClient()); - } - - public OperatingSystemsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findOperatingSystemVersion - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findOperatingSystemVersionCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/operating-system-versions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOperatingSystemVersionValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return findOperatingSystemVersionCall(_callback); - - } - - /** - * Retrieve all operating system versions - * Provides a listing of available operating system versions. - * @return OperatingSystemList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public OperatingSystemList findOperatingSystemVersion() throws ApiException { - ApiResponse localVarResp = findOperatingSystemVersionWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Retrieve all operating system versions - * Provides a listing of available operating system versions. - * @return ApiResponse<OperatingSystemList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findOperatingSystemVersionWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = findOperatingSystemVersionValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all operating system versions (asynchronously) - * Provides a listing of available operating system versions. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findOperatingSystemVersionAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOperatingSystemVersionValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOperatingSystems - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findOperatingSystemsCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/operating-systems"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOperatingSystemsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return findOperatingSystemsCall(_callback); - - } - - /** - * Retrieve all operating systems - * Provides a listing of available operating systems to provision your new device with. - * @return OperatingSystemList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public OperatingSystemList findOperatingSystems() throws ApiException { - ApiResponse localVarResp = findOperatingSystemsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Retrieve all operating systems - * Provides a listing of available operating systems to provision your new device with. - * @return ApiResponse<OperatingSystemList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findOperatingSystemsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = findOperatingSystemsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all operating systems (asynchronously) - * Provides a listing of available operating systems to provision your new device with. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findOperatingSystemsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOperatingSystemsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OrganizationsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OrganizationsApi.java deleted file mode 100644 index bc4aa2235..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OrganizationsApi.java +++ /dev/null @@ -1,2362 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Invitation; -import com.equinix.openapi.metal.v1.model.InvitationInput; -import com.equinix.openapi.metal.v1.model.InvitationList; -import com.equinix.openapi.metal.v1.model.OperatingSystemList; -import com.equinix.openapi.metal.v1.model.Organization; -import com.equinix.openapi.metal.v1.model.OrganizationInput; -import com.equinix.openapi.metal.v1.model.OrganizationList; -import com.equinix.openapi.metal.v1.model.PaymentMethod; -import com.equinix.openapi.metal.v1.model.PaymentMethodCreateInput; -import com.equinix.openapi.metal.v1.model.PaymentMethodList; -import com.equinix.openapi.metal.v1.model.PlanList; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.ProjectCreateInput; -import com.equinix.openapi.metal.v1.model.ProjectList; -import com.equinix.openapi.metal.v1.model.TransferRequestList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class OrganizationsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public OrganizationsApi() { - this(Configuration.getDefaultApiClient()); - } - - public OrganizationsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createOrganization - * @param organizationInput Organization to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createOrganizationCall(OrganizationInput organizationInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = organizationInput; - - // create path and map variables - String localVarPath = "/organizations"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createOrganizationValidateBeforeCall(OrganizationInput organizationInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationInput' is set - if (organizationInput == null) { - throw new ApiException("Missing the required parameter 'organizationInput' when calling createOrganization(Async)"); - } - - return createOrganizationCall(organizationInput, include, exclude, _callback); - - } - - /** - * Create an organization - * Creates an organization. - * @param organizationInput Organization to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Organization - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public Organization createOrganization(OrganizationInput organizationInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createOrganizationWithHttpInfo(organizationInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create an organization - * Creates an organization. - * @param organizationInput Organization to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Organization> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createOrganizationWithHttpInfo(OrganizationInput organizationInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createOrganizationValidateBeforeCall(organizationInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an organization (asynchronously) - * Creates an organization. - * @param organizationInput Organization to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createOrganizationAsync(OrganizationInput organizationInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createOrganizationValidateBeforeCall(organizationInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createOrganizationInvitation - * @param id Organization UUID (required) - * @param invitationInput Invitation to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createOrganizationInvitationCall(UUID id, InvitationInput invitationInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = invitationInput; - - // create path and map variables - String localVarPath = "/organizations/{id}/invitations" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createOrganizationInvitationValidateBeforeCall(UUID id, InvitationInput invitationInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createOrganizationInvitation(Async)"); - } - - // verify the required parameter 'invitationInput' is set - if (invitationInput == null) { - throw new ApiException("Missing the required parameter 'invitationInput' when calling createOrganizationInvitation(Async)"); - } - - return createOrganizationInvitationCall(id, invitationInput, include, _callback); - - } - - /** - * Create an invitation for an organization - * In order to add a user to an organization, they must first be invited. To invite to several projects the parameter `projects_ids:[a,b,c]` can be used - * @param id Organization UUID (required) - * @param invitationInput Invitation to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Invitation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Invitation createOrganizationInvitation(UUID id, InvitationInput invitationInput, List include) throws ApiException { - ApiResponse localVarResp = createOrganizationInvitationWithHttpInfo(id, invitationInput, include); - return localVarResp.getData(); - } - - /** - * Create an invitation for an organization - * In order to add a user to an organization, they must first be invited. To invite to several projects the parameter `projects_ids:[a,b,c]` can be used - * @param id Organization UUID (required) - * @param invitationInput Invitation to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Invitation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createOrganizationInvitationWithHttpInfo(UUID id, InvitationInput invitationInput, List include) throws ApiException { - okhttp3.Call localVarCall = createOrganizationInvitationValidateBeforeCall(id, invitationInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an invitation for an organization (asynchronously) - * In order to add a user to an organization, they must first be invited. To invite to several projects the parameter `projects_ids:[a,b,c]` can be used - * @param id Organization UUID (required) - * @param invitationInput Invitation to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createOrganizationInvitationAsync(UUID id, InvitationInput invitationInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createOrganizationInvitationValidateBeforeCall(id, invitationInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createOrganizationProject - * @param id Organization UUID (required) - * @param projectCreateInput Project to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createOrganizationProjectCall(UUID id, ProjectCreateInput projectCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = projectCreateInput; - - // create path and map variables - String localVarPath = "/organizations/{id}/projects" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createOrganizationProjectValidateBeforeCall(UUID id, ProjectCreateInput projectCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createOrganizationProject(Async)"); - } - - // verify the required parameter 'projectCreateInput' is set - if (projectCreateInput == null) { - throw new ApiException("Missing the required parameter 'projectCreateInput' when calling createOrganizationProject(Async)"); - } - - return createOrganizationProjectCall(id, projectCreateInput, include, exclude, _callback); - - } - - /** - * Create a project for the organization - * Creates a new project for the organization - * @param id Organization UUID (required) - * @param projectCreateInput Project to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Project - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public Project createOrganizationProject(UUID id, ProjectCreateInput projectCreateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createOrganizationProjectWithHttpInfo(id, projectCreateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a project for the organization - * Creates a new project for the organization - * @param id Organization UUID (required) - * @param projectCreateInput Project to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Project> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createOrganizationProjectWithHttpInfo(UUID id, ProjectCreateInput projectCreateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createOrganizationProjectValidateBeforeCall(id, projectCreateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a project for the organization (asynchronously) - * Creates a new project for the organization - * @param id Organization UUID (required) - * @param projectCreateInput Project to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createOrganizationProjectAsync(UUID id, ProjectCreateInput projectCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createOrganizationProjectValidateBeforeCall(id, projectCreateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createPaymentMethod - * @param id Organization UUID (required) - * @param paymentMethodCreateInput Payment Method to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createPaymentMethodCall(UUID id, PaymentMethodCreateInput paymentMethodCreateInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = paymentMethodCreateInput; - - // create path and map variables - String localVarPath = "/organizations/{id}/payment-methods" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createPaymentMethodValidateBeforeCall(UUID id, PaymentMethodCreateInput paymentMethodCreateInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createPaymentMethod(Async)"); - } - - // verify the required parameter 'paymentMethodCreateInput' is set - if (paymentMethodCreateInput == null) { - throw new ApiException("Missing the required parameter 'paymentMethodCreateInput' when calling createPaymentMethod(Async)"); - } - - return createPaymentMethodCall(id, paymentMethodCreateInput, include, _callback); - - } - - /** - * Create a payment method for the given organization - * Creates a payment method. - * @param id Organization UUID (required) - * @param paymentMethodCreateInput Payment Method to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return PaymentMethod - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public PaymentMethod createPaymentMethod(UUID id, PaymentMethodCreateInput paymentMethodCreateInput, List include) throws ApiException { - ApiResponse localVarResp = createPaymentMethodWithHttpInfo(id, paymentMethodCreateInput, include); - return localVarResp.getData(); - } - - /** - * Create a payment method for the given organization - * Creates a payment method. - * @param id Organization UUID (required) - * @param paymentMethodCreateInput Payment Method to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<PaymentMethod> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createPaymentMethodWithHttpInfo(UUID id, PaymentMethodCreateInput paymentMethodCreateInput, List include) throws ApiException { - okhttp3.Call localVarCall = createPaymentMethodValidateBeforeCall(id, paymentMethodCreateInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a payment method for the given organization (asynchronously) - * Creates a payment method. - * @param id Organization UUID (required) - * @param paymentMethodCreateInput Payment Method to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createPaymentMethodAsync(UUID id, PaymentMethodCreateInput paymentMethodCreateInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createPaymentMethodValidateBeforeCall(id, paymentMethodCreateInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteOrganization - * @param id Organization UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deleteOrganizationCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOrganizationValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteOrganization(Async)"); - } - - return deleteOrganizationCall(id, _callback); - - } - - /** - * Delete the organization - * Deletes the organization. - * @param id Organization UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public void deleteOrganization(UUID id) throws ApiException { - deleteOrganizationWithHttpInfo(id); - } - - /** - * Delete the organization - * Deletes the organization. - * @param id Organization UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public ApiResponse deleteOrganizationWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteOrganizationValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the organization (asynchronously) - * Deletes the organization. - * @param id Organization UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deleteOrganizationAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteOrganizationValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findOperatingSystemsByOrganization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOperatingSystemsByOrganizationCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/operating-systems" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOperatingSystemsByOrganizationValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOperatingSystemsByOrganization(Async)"); - } - - return findOperatingSystemsByOrganizationCall(id, include, _callback); - - } - - /** - * Retrieve all operating systems visible by the organization - * Returns a listing of available operating systems for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return OperatingSystemList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public OperatingSystemList findOperatingSystemsByOrganization(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findOperatingSystemsByOrganizationWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve all operating systems visible by the organization - * Returns a listing of available operating systems for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<OperatingSystemList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findOperatingSystemsByOrganizationWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findOperatingSystemsByOrganizationValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all operating systems visible by the organization (asynchronously) - * Returns a listing of available operating systems for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOperatingSystemsByOrganizationAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOperatingSystemsByOrganizationValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationById - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationById(Async)"); - } - - return findOrganizationByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve an organization's details - * Returns a single organization's details, if the user is authorized to view it. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Organization - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Organization findOrganizationById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findOrganizationByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve an organization's details - * Returns a single organization's details, if the user is authorized to view it. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Organization> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findOrganizationByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findOrganizationByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve an organization's details (asynchronously) - * Returns a single organization's details, if the user is authorized to view it. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationCustomdata - * @param id Organization UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationCustomdataCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/customdata" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationCustomdata(Async)"); - } - - return findOrganizationCustomdataCall(id, _callback); - - } - - /** - * Retrieve the custom metadata of an organization - * Provides the custom metadata stored for this organization in json format - * @param id Organization UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void findOrganizationCustomdata(UUID id) throws ApiException { - findOrganizationCustomdataWithHttpInfo(id); - } - - /** - * Retrieve the custom metadata of an organization - * Provides the custom metadata stored for this organization in json format - * @param id Organization UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findOrganizationCustomdataWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findOrganizationCustomdataValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve the custom metadata of an organization (asynchronously) - * Provides the custom metadata stored for this organization in json format - * @param id Organization UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationCustomdataAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationCustomdataValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationInvitations - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationInvitationsCall(UUID id, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/invitations" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationInvitationsValidateBeforeCall(UUID id, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationInvitations(Async)"); - } - - return findOrganizationInvitationsCall(id, include, page, perPage, _callback); - - } - - /** - * Retrieve organization invitations - * Returns all invitations in an organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return InvitationList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public InvitationList findOrganizationInvitations(UUID id, List include, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findOrganizationInvitationsWithHttpInfo(id, include, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve organization invitations - * Returns all invitations in an organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<InvitationList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findOrganizationInvitationsWithHttpInfo(UUID id, List include, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findOrganizationInvitationsValidateBeforeCall(id, include, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve organization invitations (asynchronously) - * Returns all invitations in an organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findOrganizationInvitationsAsync(UUID id, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationInvitationsValidateBeforeCall(id, include, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationPaymentMethods - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findOrganizationPaymentMethodsCall(UUID id, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/payment-methods" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationPaymentMethodsValidateBeforeCall(UUID id, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationPaymentMethods(Async)"); - } - - return findOrganizationPaymentMethodsCall(id, include, page, perPage, _callback); - - } - - /** - * Retrieve all payment methods of an organization - * Returns all payment methods of an organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return PaymentMethodList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public PaymentMethodList findOrganizationPaymentMethods(UUID id, List include, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findOrganizationPaymentMethodsWithHttpInfo(id, include, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all payment methods of an organization - * Returns all payment methods of an organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<PaymentMethodList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findOrganizationPaymentMethodsWithHttpInfo(UUID id, List include, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findOrganizationPaymentMethodsValidateBeforeCall(id, include, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all payment methods of an organization (asynchronously) - * Returns all payment methods of an organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findOrganizationPaymentMethodsAsync(UUID id, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationPaymentMethodsValidateBeforeCall(id, include, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationProjects - * @param id Organization UUID (required) - * @param name Filter results by name. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findOrganizationProjectsCall(UUID id, String name, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/projects" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (name != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationProjectsValidateBeforeCall(UUID id, String name, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationProjects(Async)"); - } - - return findOrganizationProjectsCall(id, name, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve all projects of an organization - * Returns a collection of projects that belong to the organization. - * @param id Organization UUID (required) - * @param name Filter results by name. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ProjectList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ProjectList findOrganizationProjects(UUID id, String name, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findOrganizationProjectsWithHttpInfo(id, name, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all projects of an organization - * Returns a collection of projects that belong to the organization. - * @param id Organization UUID (required) - * @param name Filter results by name. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<ProjectList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findOrganizationProjectsWithHttpInfo(UUID id, String name, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findOrganizationProjectsValidateBeforeCall(id, name, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all projects of an organization (asynchronously) - * Returns a collection of projects that belong to the organization. - * @param id Organization UUID (required) - * @param name Filter results by name. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findOrganizationProjectsAsync(UUID id, String name, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationProjectsValidateBeforeCall(id, name, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizationTransfers - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public okhttp3.Call findOrganizationTransfersCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/transfers" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationTransfersValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findOrganizationTransfers(Async)"); - } - - return findOrganizationTransfersCall(id, include, _callback); - - } - - /** - * Retrieve all project transfer requests from or to an organization - * Provides a collection of project transfer requests from or to the organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return TransferRequestList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public TransferRequestList findOrganizationTransfers(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findOrganizationTransfersWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve all project transfer requests from or to an organization - * Provides a collection of project transfer requests from or to the organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<TransferRequestList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public ApiResponse findOrganizationTransfersWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findOrganizationTransfersValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all project transfer requests from or to an organization (asynchronously) - * Provides a collection of project transfer requests from or to the organization. - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
- */ - public okhttp3.Call findOrganizationTransfersAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationTransfersValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findOrganizations - * @param personal Include, exclude or show only personal organizations. (optional) - * @param withoutProjects Include, exclude or show only organizations that have no projects. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findOrganizationsCall(String personal, String withoutProjects, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (personal != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("personal", personal)); - } - - if (withoutProjects != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("without_projects", withoutProjects)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findOrganizationsValidateBeforeCall(String personal, String withoutProjects, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - return findOrganizationsCall(personal, withoutProjects, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve all organizations - * Returns a list of organizations that are accessible to the current user. - * @param personal Include, exclude or show only personal organizations. (optional) - * @param withoutProjects Include, exclude or show only organizations that have no projects. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return OrganizationList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public OrganizationList findOrganizations(String personal, String withoutProjects, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findOrganizationsWithHttpInfo(personal, withoutProjects, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all organizations - * Returns a list of organizations that are accessible to the current user. - * @param personal Include, exclude or show only personal organizations. (optional) - * @param withoutProjects Include, exclude or show only organizations that have no projects. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<OrganizationList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findOrganizationsWithHttpInfo(String personal, String withoutProjects, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findOrganizationsValidateBeforeCall(personal, withoutProjects, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all organizations (asynchronously) - * Returns a list of organizations that are accessible to the current user. - * @param personal Include, exclude or show only personal organizations. (optional) - * @param withoutProjects Include, exclude or show only organizations that have no projects. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findOrganizationsAsync(String personal, String withoutProjects, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findOrganizationsValidateBeforeCall(personal, withoutProjects, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPlansByOrganization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPlansByOrganizationCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/organizations/{id}/plans" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPlansByOrganizationValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findPlansByOrganization(Async)"); - } - - return findPlansByOrganizationCall(id, include, exclude, _callback); - - } - - /** - * Retrieve all plans visible by the organization - * Returns a listing of available plans for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return PlanList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public PlanList findPlansByOrganization(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findPlansByOrganizationWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all plans visible by the organization - * Returns a listing of available plans for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<PlanList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findPlansByOrganizationWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findPlansByOrganizationValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all plans visible by the organization (asynchronously) - * Returns a listing of available plans for the given organization - * @param id Organization UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPlansByOrganizationAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPlansByOrganizationValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateOrganization - * @param id Organization UUID (required) - * @param organizationInput Organization to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateOrganizationCall(UUID id, OrganizationInput organizationInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = organizationInput; - - // create path and map variables - String localVarPath = "/organizations/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateOrganizationValidateBeforeCall(UUID id, OrganizationInput organizationInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateOrganization(Async)"); - } - - // verify the required parameter 'organizationInput' is set - if (organizationInput == null) { - throw new ApiException("Missing the required parameter 'organizationInput' when calling updateOrganization(Async)"); - } - - return updateOrganizationCall(id, organizationInput, include, exclude, _callback); - - } - - /** - * Update the organization - * Updates the organization. - * @param id Organization UUID (required) - * @param organizationInput Organization to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Organization - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Organization updateOrganization(UUID id, OrganizationInput organizationInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateOrganizationWithHttpInfo(id, organizationInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update the organization - * Updates the organization. - * @param id Organization UUID (required) - * @param organizationInput Organization to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Organization> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateOrganizationWithHttpInfo(UUID id, OrganizationInput organizationInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateOrganizationValidateBeforeCall(id, organizationInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the organization (asynchronously) - * Updates the organization. - * @param id Organization UUID (required) - * @param organizationInput Organization to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateOrganizationAsync(UUID id, OrganizationInput organizationInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateOrganizationValidateBeforeCall(id, organizationInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OtpsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OtpsApi.java deleted file mode 100644 index 3fc7f0c5e..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/OtpsApi.java +++ /dev/null @@ -1,578 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.RecoveryCodeList; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class OtpsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public OtpsApi() { - this(Configuration.getDefaultApiClient()); - } - - public OtpsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findEnsureOtp - * @param otp OTP (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
400 bad request -
401 unauthorized -
- */ - public okhttp3.Call findEnsureOtpCall(String otp, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/otp/verify/{otp}" - .replace("{" + "otp" + "}", localVarApiClient.escapeString(otp.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findEnsureOtpValidateBeforeCall(String otp, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'otp' is set - if (otp == null) { - throw new ApiException("Missing the required parameter 'otp' when calling findEnsureOtp(Async)"); - } - - return findEnsureOtpCall(otp, _callback); - - } - - /** - * Verify user by providing an OTP - * It verifies the user once a valid OTP is provided. It gives back a session token, essentially logging in the user. - * @param otp OTP (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
400 bad request -
401 unauthorized -
- */ - public void findEnsureOtp(String otp) throws ApiException { - findEnsureOtpWithHttpInfo(otp); - } - - /** - * Verify user by providing an OTP - * It verifies the user once a valid OTP is provided. It gives back a session token, essentially logging in the user. - * @param otp OTP (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
400 bad request -
401 unauthorized -
- */ - public ApiResponse findEnsureOtpWithHttpInfo(String otp) throws ApiException { - okhttp3.Call localVarCall = findEnsureOtpValidateBeforeCall(otp, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Verify user by providing an OTP (asynchronously) - * It verifies the user once a valid OTP is provided. It gives back a session token, essentially logging in the user. - * @param otp OTP (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
400 bad request -
401 unauthorized -
- */ - public okhttp3.Call findEnsureOtpAsync(String otp, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findEnsureOtpValidateBeforeCall(otp, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findRecoveryCodes - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call findRecoveryCodesCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/otp/recovery-codes"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findRecoveryCodesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return findRecoveryCodesCall(_callback); - - } - - /** - * Retrieve my recovery codes - * Returns my recovery codes. - * @return RecoveryCodeList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public RecoveryCodeList findRecoveryCodes() throws ApiException { - ApiResponse localVarResp = findRecoveryCodesWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Retrieve my recovery codes - * Returns my recovery codes. - * @return ApiResponse<RecoveryCodeList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse findRecoveryCodesWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = findRecoveryCodesValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve my recovery codes (asynchronously) - * Returns my recovery codes. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call findRecoveryCodesAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findRecoveryCodesValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for receiveCodes - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
400 bad request -
401 unauthorized -
422 unprocessable entity -
500 internal server error -
- */ - public okhttp3.Call receiveCodesCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/otp/sms/receive"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call receiveCodesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return receiveCodesCall(_callback); - - } - - /** - * Receive an OTP per sms - * Sends an OTP to the user's mobile phone. - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
400 bad request -
401 unauthorized -
422 unprocessable entity -
500 internal server error -
- */ - public void receiveCodes() throws ApiException { - receiveCodesWithHttpInfo(); - } - - /** - * Receive an OTP per sms - * Sends an OTP to the user's mobile phone. - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
400 bad request -
401 unauthorized -
422 unprocessable entity -
500 internal server error -
- */ - public ApiResponse receiveCodesWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = receiveCodesValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Receive an OTP per sms (asynchronously) - * Sends an OTP to the user's mobile phone. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
400 bad request -
401 unauthorized -
422 unprocessable entity -
500 internal server error -
- */ - public okhttp3.Call receiveCodesAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = receiveCodesValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for regenerateCodes - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call regenerateCodesCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/otp/recovery-codes"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call regenerateCodesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return regenerateCodesCall(_callback); - - } - - /** - * Generate new recovery codes - * Generate a new set of recovery codes. - * @return RecoveryCodeList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public RecoveryCodeList regenerateCodes() throws ApiException { - ApiResponse localVarResp = regenerateCodesWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Generate new recovery codes - * Generate a new set of recovery codes. - * @return ApiResponse<RecoveryCodeList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse regenerateCodesWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = regenerateCodesValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Generate new recovery codes (asynchronously) - * Generate a new set of recovery codes. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call regenerateCodesAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = regenerateCodesValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApi.java deleted file mode 100644 index 5feb91385..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApi.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.NewPassword; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PasswordResetTokensApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PasswordResetTokensApi() { - this(Configuration.getDefaultApiClient()); - } - - public PasswordResetTokensApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createPasswordResetToken - * @param email Email of user to create password reset token (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createPasswordResetTokenCall(String email, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/reset-password"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (email != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("email", email)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createPasswordResetTokenValidateBeforeCall(String email, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'email' is set - if (email == null) { - throw new ApiException("Missing the required parameter 'email' when calling createPasswordResetToken(Async)"); - } - - return createPasswordResetTokenCall(email, _callback); - - } - - /** - * Create a password reset token - * Creates a password reset token - * @param email Email of user to create password reset token (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public void createPasswordResetToken(String email) throws ApiException { - createPasswordResetTokenWithHttpInfo(email); - } - - /** - * Create a password reset token - * Creates a password reset token - * @param email Email of user to create password reset token (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createPasswordResetTokenWithHttpInfo(String email) throws ApiException { - okhttp3.Call localVarCall = createPasswordResetTokenValidateBeforeCall(email, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Create a password reset token (asynchronously) - * Creates a password reset token - * @param email Email of user to create password reset token (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createPasswordResetTokenAsync(String email, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createPasswordResetTokenValidateBeforeCall(email, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for resetPassword - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call resetPasswordCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/reset-password"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call resetPasswordValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return resetPasswordCall(_callback); - - } - - /** - * Reset current user password - * Resets current user password. - * @return NewPassword - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public NewPassword resetPassword() throws ApiException { - ApiResponse localVarResp = resetPasswordWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Reset current user password - * Resets current user password. - * @return ApiResponse<NewPassword> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse resetPasswordWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = resetPasswordValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Reset current user password (asynchronously) - * Resets current user password. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call resetPasswordAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = resetPasswordValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApi.java deleted file mode 100644 index 8c33ea6b2..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApi.java +++ /dev/null @@ -1,497 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.PaymentMethod; -import com.equinix.openapi.metal.v1.model.PaymentMethodUpdateInput; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PaymentMethodsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PaymentMethodsApi() { - this(Configuration.getDefaultApiClient()); - } - - public PaymentMethodsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for deletePaymentMethod - * @param id Payment Method UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deletePaymentMethodCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePaymentMethodValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deletePaymentMethod(Async)"); - } - - return deletePaymentMethodCall(id, _callback); - - } - - /** - * Delete the payment method - * Deletes the payment method. - * @param id Payment Method UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public void deletePaymentMethod(UUID id) throws ApiException { - deletePaymentMethodWithHttpInfo(id); - } - - /** - * Delete the payment method - * Deletes the payment method. - * @param id Payment Method UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public ApiResponse deletePaymentMethodWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deletePaymentMethodValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the payment method (asynchronously) - * Deletes the payment method. - * @param id Payment Method UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call deletePaymentMethodAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deletePaymentMethodValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findPaymentMethodById - * @param id Payment Method UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findPaymentMethodByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/payment-methods/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPaymentMethodByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findPaymentMethodById(Async)"); - } - - return findPaymentMethodByIdCall(id, include, _callback); - - } - - /** - * Retrieve a payment method - * Returns a payment method - * @param id Payment Method UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return PaymentMethod - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public PaymentMethod findPaymentMethodById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findPaymentMethodByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve a payment method - * Returns a payment method - * @param id Payment Method UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<PaymentMethod> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findPaymentMethodByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findPaymentMethodByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a payment method (asynchronously) - * Returns a payment method - * @param id Payment Method UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findPaymentMethodByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPaymentMethodByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updatePaymentMethod - * @param id Payment Method UUID (required) - * @param paymentMethodUpdateInput Payment Method to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updatePaymentMethodCall(UUID id, PaymentMethodUpdateInput paymentMethodUpdateInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = paymentMethodUpdateInput; - - // create path and map variables - String localVarPath = "/payment-methods/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updatePaymentMethodValidateBeforeCall(UUID id, PaymentMethodUpdateInput paymentMethodUpdateInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updatePaymentMethod(Async)"); - } - - // verify the required parameter 'paymentMethodUpdateInput' is set - if (paymentMethodUpdateInput == null) { - throw new ApiException("Missing the required parameter 'paymentMethodUpdateInput' when calling updatePaymentMethod(Async)"); - } - - return updatePaymentMethodCall(id, paymentMethodUpdateInput, include, _callback); - - } - - /** - * Update the payment method - * Updates the payment method. - * @param id Payment Method UUID (required) - * @param paymentMethodUpdateInput Payment Method to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return PaymentMethod - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public PaymentMethod updatePaymentMethod(UUID id, PaymentMethodUpdateInput paymentMethodUpdateInput, List include) throws ApiException { - ApiResponse localVarResp = updatePaymentMethodWithHttpInfo(id, paymentMethodUpdateInput, include); - return localVarResp.getData(); - } - - /** - * Update the payment method - * Updates the payment method. - * @param id Payment Method UUID (required) - * @param paymentMethodUpdateInput Payment Method to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<PaymentMethod> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updatePaymentMethodWithHttpInfo(UUID id, PaymentMethodUpdateInput paymentMethodUpdateInput, List include) throws ApiException { - okhttp3.Call localVarCall = updatePaymentMethodValidateBeforeCall(id, paymentMethodUpdateInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the payment method (asynchronously) - * Updates the payment method. - * @param id Payment Method UUID (required) - * @param paymentMethodUpdateInput Payment Method to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updatePaymentMethodAsync(UUID id, PaymentMethodUpdateInput paymentMethodUpdateInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updatePaymentMethodValidateBeforeCall(id, paymentMethodUpdateInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PlansApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PlansApi.java deleted file mode 100644 index 9d33348c2..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PlansApi.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.PlanList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PlansApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PlansApi() { - this(Configuration.getDefaultApiClient()); - } - - public PlansApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findPlans - * @param categories Filter plans by its category (optional) - * @param type Filter plans by its plan type (optional) - * @param slug Filter plans by slug (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findPlansCall(List categories, String type, String slug, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/plans"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (categories != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "categories", categories)); - } - - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); - } - - if (slug != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("slug", slug)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPlansValidateBeforeCall(List categories, String type, String slug, List include, List exclude, final ApiCallback _callback) throws ApiException { - return findPlansCall(categories, type, slug, include, exclude, _callback); - - } - - /** - * Retrieve all plans - * Provides a listing of available plans to provision your device on. - * @param categories Filter plans by its category (optional) - * @param type Filter plans by its plan type (optional) - * @param slug Filter plans by slug (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return PlanList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public PlanList findPlans(List categories, String type, String slug, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findPlansWithHttpInfo(categories, type, slug, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all plans - * Provides a listing of available plans to provision your device on. - * @param categories Filter plans by its category (optional) - * @param type Filter plans by its plan type (optional) - * @param slug Filter plans by slug (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<PlanList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findPlansWithHttpInfo(List categories, String type, String slug, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findPlansValidateBeforeCall(categories, type, slug, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all plans (asynchronously) - * Provides a listing of available plans to provision your device on. - * @param categories Filter plans by its category (optional) - * @param type Filter plans by its plan type (optional) - * @param slug Filter plans by slug (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findPlansAsync(List categories, String type, String slug, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPlansValidateBeforeCall(categories, type, slug, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPlansByProject - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPlansByProjectCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/plans" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPlansByProjectValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findPlansByProject(Async)"); - } - - return findPlansByProjectCall(id, include, exclude, _callback); - - } - - /** - * Retrieve all plans visible by the project - * Returns a listing of available plans for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return PlanList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public PlanList findPlansByProject(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findPlansByProjectWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all plans visible by the project - * Returns a listing of available plans for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<PlanList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findPlansByProjectWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findPlansByProjectValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all plans visible by the project (asynchronously) - * Returns a listing of available plans for the given project - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPlansByProjectAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPlansByProjectValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PortsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PortsApi.java deleted file mode 100644 index cf4f2fdbb..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/PortsApi.java +++ /dev/null @@ -1,2196 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Port; -import com.equinix.openapi.metal.v1.model.PortAssignInput; -import com.equinix.openapi.metal.v1.model.PortConvertLayer3Input; -import com.equinix.openapi.metal.v1.model.PortVlanAssignment; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatch; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchCreateInput; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchList; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PortsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PortsApi() { - this(Configuration.getDefaultApiClient()); - } - - public PortsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for assignNativeVlan - * @param id Port UUID (required) - * @param vnid Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call assignNativeVlanCall(UUID id, String vnid, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}/native-vlan" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (vnid != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("vnid", vnid)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call assignNativeVlanValidateBeforeCall(UUID id, String vnid, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling assignNativeVlan(Async)"); - } - - // verify the required parameter 'vnid' is set - if (vnid == null) { - throw new ApiException("Missing the required parameter 'vnid' when calling assignNativeVlan(Async)"); - } - - return assignNativeVlanCall(id, vnid, include, _callback); - - } - - /** - * Assign a native VLAN - * Sets a virtual network on this port as a \"native VLAN\". The VLAN must have already been assigned using the using the \"Assign a port to a virtual network\" operation. - * @param id Port UUID (required) - * @param vnid Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public Port assignNativeVlan(UUID id, String vnid, List include) throws ApiException { - ApiResponse localVarResp = assignNativeVlanWithHttpInfo(id, vnid, include); - return localVarResp.getData(); - } - - /** - * Assign a native VLAN - * Sets a virtual network on this port as a \"native VLAN\". The VLAN must have already been assigned using the using the \"Assign a port to a virtual network\" operation. - * @param id Port UUID (required) - * @param vnid Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse assignNativeVlanWithHttpInfo(UUID id, String vnid, List include) throws ApiException { - okhttp3.Call localVarCall = assignNativeVlanValidateBeforeCall(id, vnid, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Assign a native VLAN (asynchronously) - * Sets a virtual network on this port as a \"native VLAN\". The VLAN must have already been assigned using the using the \"Assign a port to a virtual network\" operation. - * @param id Port UUID (required) - * @param vnid Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call assignNativeVlanAsync(UUID id, String vnid, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = assignNativeVlanValidateBeforeCall(id, vnid, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for assignPort - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call assignPortCall(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = portAssignInput; - - // create path and map variables - String localVarPath = "/ports/{id}/assign" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call assignPortValidateBeforeCall(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling assignPort(Async)"); - } - - // verify the required parameter 'portAssignInput' is set - if (portAssignInput == null) { - throw new ApiException("Missing the required parameter 'portAssignInput' when calling assignPort(Async)"); - } - - return assignPortCall(id, portAssignInput, include, _callback); - - } - - /** - * Assign a port to virtual network - * Assign a hardware port to a virtual network. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Port assignPort(UUID id, PortAssignInput portAssignInput, List include) throws ApiException { - ApiResponse localVarResp = assignPortWithHttpInfo(id, portAssignInput, include); - return localVarResp.getData(); - } - - /** - * Assign a port to virtual network - * Assign a hardware port to a virtual network. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse assignPortWithHttpInfo(UUID id, PortAssignInput portAssignInput, List include) throws ApiException { - okhttp3.Call localVarCall = assignPortValidateBeforeCall(id, portAssignInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Assign a port to virtual network (asynchronously) - * Assign a hardware port to a virtual network. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call assignPortAsync(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = assignPortValidateBeforeCall(id, portAssignInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for bondPort - * @param id Port UUID (required) - * @param bulkEnable enable both ports (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call bondPortCall(UUID id, Boolean bulkEnable, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}/bond" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (bulkEnable != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("bulk_enable", bulkEnable)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call bondPortValidateBeforeCall(UUID id, Boolean bulkEnable, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling bondPort(Async)"); - } - - return bondPortCall(id, bulkEnable, include, _callback); - - } - - /** - * Enabling bonding - * Enabling bonding for one or all ports - * @param id Port UUID (required) - * @param bulkEnable enable both ports (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Port bondPort(UUID id, Boolean bulkEnable, List include) throws ApiException { - ApiResponse localVarResp = bondPortWithHttpInfo(id, bulkEnable, include); - return localVarResp.getData(); - } - - /** - * Enabling bonding - * Enabling bonding for one or all ports - * @param id Port UUID (required) - * @param bulkEnable enable both ports (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse bondPortWithHttpInfo(UUID id, Boolean bulkEnable, List include) throws ApiException { - okhttp3.Call localVarCall = bondPortValidateBeforeCall(id, bulkEnable, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Enabling bonding (asynchronously) - * Enabling bonding for one or all ports - * @param id Port UUID (required) - * @param bulkEnable enable both ports (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call bondPortAsync(UUID id, Boolean bulkEnable, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = bondPortValidateBeforeCall(id, bulkEnable, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for convertLayer2 - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call convertLayer2Call(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = portAssignInput; - - // create path and map variables - String localVarPath = "/ports/{id}/convert/layer-2" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call convertLayer2ValidateBeforeCall(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling convertLayer2(Async)"); - } - - // verify the required parameter 'portAssignInput' is set - if (portAssignInput == null) { - throw new ApiException("Missing the required parameter 'portAssignInput' when calling convertLayer2(Async)"); - } - - return convertLayer2Call(id, portAssignInput, include, _callback); - - } - - /** - * Convert to Layer 2 - * Converts a bond port to Layer 2. IP assignments of the port will be removed. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Port convertLayer2(UUID id, PortAssignInput portAssignInput, List include) throws ApiException { - ApiResponse localVarResp = convertLayer2WithHttpInfo(id, portAssignInput, include); - return localVarResp.getData(); - } - - /** - * Convert to Layer 2 - * Converts a bond port to Layer 2. IP assignments of the port will be removed. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse convertLayer2WithHttpInfo(UUID id, PortAssignInput portAssignInput, List include) throws ApiException { - okhttp3.Call localVarCall = convertLayer2ValidateBeforeCall(id, portAssignInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Convert to Layer 2 (asynchronously) - * Converts a bond port to Layer 2. IP assignments of the port will be removed. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call convertLayer2Async(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = convertLayer2ValidateBeforeCall(id, portAssignInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for convertLayer3 - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param portConvertLayer3Input IPs to request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call convertLayer3Call(UUID id, List include, PortConvertLayer3Input portConvertLayer3Input, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = portConvertLayer3Input; - - // create path and map variables - String localVarPath = "/ports/{id}/convert/layer-3" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call convertLayer3ValidateBeforeCall(UUID id, List include, PortConvertLayer3Input portConvertLayer3Input, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling convertLayer3(Async)"); - } - - return convertLayer3Call(id, include, portConvertLayer3Input, _callback); - - } - - /** - * Convert to Layer 3 - * Converts a bond port to Layer 3. VLANs must first be unassigned. - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param portConvertLayer3Input IPs to request (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Port convertLayer3(UUID id, List include, PortConvertLayer3Input portConvertLayer3Input) throws ApiException { - ApiResponse localVarResp = convertLayer3WithHttpInfo(id, include, portConvertLayer3Input); - return localVarResp.getData(); - } - - /** - * Convert to Layer 3 - * Converts a bond port to Layer 3. VLANs must first be unassigned. - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param portConvertLayer3Input IPs to request (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse convertLayer3WithHttpInfo(UUID id, List include, PortConvertLayer3Input portConvertLayer3Input) throws ApiException { - okhttp3.Call localVarCall = convertLayer3ValidateBeforeCall(id, include, portConvertLayer3Input, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Convert to Layer 3 (asynchronously) - * Converts a bond port to Layer 3. VLANs must first be unassigned. - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param portConvertLayer3Input IPs to request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call convertLayer3Async(UUID id, List include, PortConvertLayer3Input portConvertLayer3Input, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = convertLayer3ValidateBeforeCall(id, include, portConvertLayer3Input, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createPortVlanAssignmentBatch - * @param id Port UUID (required) - * @param portVlanAssignmentBatchCreateInput VLAN Assignment batch details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createPortVlanAssignmentBatchCall(UUID id, PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = portVlanAssignmentBatchCreateInput; - - // create path and map variables - String localVarPath = "/ports/{id}/vlan-assignments/batches" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createPortVlanAssignmentBatchValidateBeforeCall(UUID id, PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createPortVlanAssignmentBatch(Async)"); - } - - // verify the required parameter 'portVlanAssignmentBatchCreateInput' is set - if (portVlanAssignmentBatchCreateInput == null) { - throw new ApiException("Missing the required parameter 'portVlanAssignmentBatchCreateInput' when calling createPortVlanAssignmentBatch(Async)"); - } - - return createPortVlanAssignmentBatchCall(id, portVlanAssignmentBatchCreateInput, include, _callback); - - } - - /** - * Create a new Port-VLAN Assignment management batch - * Create a new asynchronous batch request which handles adding and/or removing the VLANs to which the port is assigned. - * @param id Port UUID (required) - * @param portVlanAssignmentBatchCreateInput VLAN Assignment batch details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return PortVlanAssignmentBatch - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public PortVlanAssignmentBatch createPortVlanAssignmentBatch(UUID id, PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput, List include) throws ApiException { - ApiResponse localVarResp = createPortVlanAssignmentBatchWithHttpInfo(id, portVlanAssignmentBatchCreateInput, include); - return localVarResp.getData(); - } - - /** - * Create a new Port-VLAN Assignment management batch - * Create a new asynchronous batch request which handles adding and/or removing the VLANs to which the port is assigned. - * @param id Port UUID (required) - * @param portVlanAssignmentBatchCreateInput VLAN Assignment batch details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<PortVlanAssignmentBatch> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createPortVlanAssignmentBatchWithHttpInfo(UUID id, PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput, List include) throws ApiException { - okhttp3.Call localVarCall = createPortVlanAssignmentBatchValidateBeforeCall(id, portVlanAssignmentBatchCreateInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a new Port-VLAN Assignment management batch (asynchronously) - * Create a new asynchronous batch request which handles adding and/or removing the VLANs to which the port is assigned. - * @param id Port UUID (required) - * @param portVlanAssignmentBatchCreateInput VLAN Assignment batch details (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createPortVlanAssignmentBatchAsync(UUID id, PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createPortVlanAssignmentBatchValidateBeforeCall(id, portVlanAssignmentBatchCreateInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteNativeVlan - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call deleteNativeVlanCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}/native-vlan" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNativeVlanValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteNativeVlan(Async)"); - } - - return deleteNativeVlanCall(id, include, _callback); - - } - - /** - * Remove native VLAN - * Removes the native VLAN from this port - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public Port deleteNativeVlan(UUID id, List include) throws ApiException { - ApiResponse localVarResp = deleteNativeVlanWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Remove native VLAN - * Removes the native VLAN from this port - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse deleteNativeVlanWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = deleteNativeVlanValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Remove native VLAN (asynchronously) - * Removes the native VLAN from this port - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call deleteNativeVlanAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteNativeVlanValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for disbondPort - * @param id Port UUID (required) - * @param bulkDisable disable both ports (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call disbondPortCall(UUID id, Boolean bulkDisable, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}/disbond" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (bulkDisable != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("bulk_disable", bulkDisable)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call disbondPortValidateBeforeCall(UUID id, Boolean bulkDisable, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling disbondPort(Async)"); - } - - return disbondPortCall(id, bulkDisable, include, _callback); - - } - - /** - * Disabling bonding - * Disabling bonding for one or all ports - * @param id Port UUID (required) - * @param bulkDisable disable both ports (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Port disbondPort(UUID id, Boolean bulkDisable, List include) throws ApiException { - ApiResponse localVarResp = disbondPortWithHttpInfo(id, bulkDisable, include); - return localVarResp.getData(); - } - - /** - * Disabling bonding - * Disabling bonding for one or all ports - * @param id Port UUID (required) - * @param bulkDisable disable both ports (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse disbondPortWithHttpInfo(UUID id, Boolean bulkDisable, List include) throws ApiException { - okhttp3.Call localVarCall = disbondPortValidateBeforeCall(id, bulkDisable, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Disabling bonding (asynchronously) - * Disabling bonding for one or all ports - * @param id Port UUID (required) - * @param bulkDisable disable both ports (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call disbondPortAsync(UUID id, Boolean bulkDisable, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = disbondPortValidateBeforeCall(id, bulkDisable, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPortById - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findPortByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPortByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findPortById(Async)"); - } - - return findPortByIdCall(id, include, _callback); - - } - - /** - * Retrieve a port - * Returns a port - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public Port findPortById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findPortByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve a port - * Returns a port - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findPortByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findPortByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a port (asynchronously) - * Returns a port - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findPortByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPortByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPortVlanAssignmentBatchByPortIdAndBatchId - * @param id Port UUID (required) - * @param batchId Batch ID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPortVlanAssignmentBatchByPortIdAndBatchIdCall(UUID id, UUID batchId, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}/vlan-assignments/batches/{batch_id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) - .replace("{" + "batch_id" + "}", localVarApiClient.escapeString(batchId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPortVlanAssignmentBatchByPortIdAndBatchIdValidateBeforeCall(UUID id, UUID batchId, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findPortVlanAssignmentBatchByPortIdAndBatchId(Async)"); - } - - // verify the required parameter 'batchId' is set - if (batchId == null) { - throw new ApiException("Missing the required parameter 'batchId' when calling findPortVlanAssignmentBatchByPortIdAndBatchId(Async)"); - } - - return findPortVlanAssignmentBatchByPortIdAndBatchIdCall(id, batchId, include, _callback); - - } - - /** - * Retrieve a VLAN Assignment Batch's details - * Returns the details of an existing Port-VLAN Assignment batch, including the list of VLANs to assign or unassign, and the current state of the batch. - * @param id Port UUID (required) - * @param batchId Batch ID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return PortVlanAssignmentBatch - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public PortVlanAssignmentBatch findPortVlanAssignmentBatchByPortIdAndBatchId(UUID id, UUID batchId, List include) throws ApiException { - ApiResponse localVarResp = findPortVlanAssignmentBatchByPortIdAndBatchIdWithHttpInfo(id, batchId, include); - return localVarResp.getData(); - } - - /** - * Retrieve a VLAN Assignment Batch's details - * Returns the details of an existing Port-VLAN Assignment batch, including the list of VLANs to assign or unassign, and the current state of the batch. - * @param id Port UUID (required) - * @param batchId Batch ID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<PortVlanAssignmentBatch> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findPortVlanAssignmentBatchByPortIdAndBatchIdWithHttpInfo(UUID id, UUID batchId, List include) throws ApiException { - okhttp3.Call localVarCall = findPortVlanAssignmentBatchByPortIdAndBatchIdValidateBeforeCall(id, batchId, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a VLAN Assignment Batch's details (asynchronously) - * Returns the details of an existing Port-VLAN Assignment batch, including the list of VLANs to assign or unassign, and the current state of the batch. - * @param id Port UUID (required) - * @param batchId Batch ID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPortVlanAssignmentBatchByPortIdAndBatchIdAsync(UUID id, UUID batchId, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPortVlanAssignmentBatchByPortIdAndBatchIdValidateBeforeCall(id, batchId, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPortVlanAssignmentBatches - * @param id Port UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPortVlanAssignmentBatchesCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}/vlan-assignments/batches" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPortVlanAssignmentBatchesValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findPortVlanAssignmentBatches(Async)"); - } - - return findPortVlanAssignmentBatchesCall(id, _callback); - - } - - /** - * List the VLAN Assignment Batches for a port - * Show all the VLAN assignment batches that have been created for managing this port's VLAN assignments - * @param id Port UUID (required) - * @return PortVlanAssignmentBatchList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public PortVlanAssignmentBatchList findPortVlanAssignmentBatches(UUID id) throws ApiException { - ApiResponse localVarResp = findPortVlanAssignmentBatchesWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * List the VLAN Assignment Batches for a port - * Show all the VLAN assignment batches that have been created for managing this port's VLAN assignments - * @param id Port UUID (required) - * @return ApiResponse<PortVlanAssignmentBatchList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findPortVlanAssignmentBatchesWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findPortVlanAssignmentBatchesValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List the VLAN Assignment Batches for a port (asynchronously) - * Show all the VLAN assignment batches that have been created for managing this port's VLAN assignments - * @param id Port UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPortVlanAssignmentBatchesAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPortVlanAssignmentBatchesValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPortVlanAssignmentByPortIdAndAssignmentId - * @param id Port UUID (required) - * @param assignmentId Assignment ID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPortVlanAssignmentByPortIdAndAssignmentIdCall(UUID id, UUID assignmentId, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}/vlan-assignments/{assignment_id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) - .replace("{" + "assignment_id" + "}", localVarApiClient.escapeString(assignmentId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPortVlanAssignmentByPortIdAndAssignmentIdValidateBeforeCall(UUID id, UUID assignmentId, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findPortVlanAssignmentByPortIdAndAssignmentId(Async)"); - } - - // verify the required parameter 'assignmentId' is set - if (assignmentId == null) { - throw new ApiException("Missing the required parameter 'assignmentId' when calling findPortVlanAssignmentByPortIdAndAssignmentId(Async)"); - } - - return findPortVlanAssignmentByPortIdAndAssignmentIdCall(id, assignmentId, include, _callback); - - } - - /** - * Show a particular Port VLAN assignment's details - * Show the details of a specific Port-VLAN assignment, including the current state and if the VLAN is set as native. - * @param id Port UUID (required) - * @param assignmentId Assignment ID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return PortVlanAssignment - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public PortVlanAssignment findPortVlanAssignmentByPortIdAndAssignmentId(UUID id, UUID assignmentId, List include) throws ApiException { - ApiResponse localVarResp = findPortVlanAssignmentByPortIdAndAssignmentIdWithHttpInfo(id, assignmentId, include); - return localVarResp.getData(); - } - - /** - * Show a particular Port VLAN assignment's details - * Show the details of a specific Port-VLAN assignment, including the current state and if the VLAN is set as native. - * @param id Port UUID (required) - * @param assignmentId Assignment ID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<PortVlanAssignment> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findPortVlanAssignmentByPortIdAndAssignmentIdWithHttpInfo(UUID id, UUID assignmentId, List include) throws ApiException { - okhttp3.Call localVarCall = findPortVlanAssignmentByPortIdAndAssignmentIdValidateBeforeCall(id, assignmentId, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Show a particular Port VLAN assignment's details (asynchronously) - * Show the details of a specific Port-VLAN assignment, including the current state and if the VLAN is set as native. - * @param id Port UUID (required) - * @param assignmentId Assignment ID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPortVlanAssignmentByPortIdAndAssignmentIdAsync(UUID id, UUID assignmentId, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPortVlanAssignmentByPortIdAndAssignmentIdValidateBeforeCall(id, assignmentId, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPortVlanAssignments - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPortVlanAssignmentsCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ports/{id}/vlan-assignments" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPortVlanAssignmentsValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findPortVlanAssignments(Async)"); - } - - return findPortVlanAssignmentsCall(id, include, _callback); - - } - - /** - * List Current VLAN assignments for a port - * Show the port's current VLAN assignments, including if this VLAN is set as native, and the current state of the assignment (ex. 'assigned' or 'unassigning') - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return PortVlanAssignmentList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public PortVlanAssignmentList findPortVlanAssignments(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findPortVlanAssignmentsWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * List Current VLAN assignments for a port - * Show the port's current VLAN assignments, including if this VLAN is set as native, and the current state of the assignment (ex. 'assigned' or 'unassigning') - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<PortVlanAssignmentList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findPortVlanAssignmentsWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findPortVlanAssignmentsValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List Current VLAN assignments for a port (asynchronously) - * Show the port's current VLAN assignments, including if this VLAN is set as native, and the current state of the assignment (ex. 'assigned' or 'unassigning') - * @param id Port UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findPortVlanAssignmentsAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPortVlanAssignmentsValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unassignPort - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call unassignPortCall(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = portAssignInput; - - // create path and map variables - String localVarPath = "/ports/{id}/unassign" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unassignPortValidateBeforeCall(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling unassignPort(Async)"); - } - - // verify the required parameter 'portAssignInput' is set - if (portAssignInput == null) { - throw new ApiException("Missing the required parameter 'portAssignInput' when calling unassignPort(Async)"); - } - - return unassignPortCall(id, portAssignInput, include, _callback); - - } - - /** - * Unassign a port - * Unassign a port for a hardware. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Port - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Port unassignPort(UUID id, PortAssignInput portAssignInput, List include) throws ApiException { - ApiResponse localVarResp = unassignPortWithHttpInfo(id, portAssignInput, include); - return localVarResp.getData(); - } - - /** - * Unassign a port - * Unassign a port for a hardware. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Port> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse unassignPortWithHttpInfo(UUID id, PortAssignInput portAssignInput, List include) throws ApiException { - okhttp3.Call localVarCall = unassignPortValidateBeforeCall(id, portAssignInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Unassign a port (asynchronously) - * Unassign a port for a hardware. - * @param id Port UUID (required) - * @param portAssignInput Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself (ex: '1001'). (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call unassignPortAsync(UUID id, PortAssignInput portAssignInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = unassignPortValidateBeforeCall(id, portAssignInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ProjectsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ProjectsApi.java deleted file mode 100644 index c9efd361e..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/ProjectsApi.java +++ /dev/null @@ -1,1758 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Invitation; -import com.equinix.openapi.metal.v1.model.InvitationInput; -import com.equinix.openapi.metal.v1.model.InvitationList; -import com.equinix.openapi.metal.v1.model.MembershipList; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.ProjectCreateFromRootInput; -import com.equinix.openapi.metal.v1.model.ProjectList; -import com.equinix.openapi.metal.v1.model.ProjectUpdateInput; -import com.equinix.openapi.metal.v1.model.TransferRequest; -import com.equinix.openapi.metal.v1.model.TransferRequestInput; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ProjectsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ProjectsApi() { - this(Configuration.getDefaultApiClient()); - } - - public ProjectsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createProject - * @param projectCreateFromRootInput Project to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectCall(ProjectCreateFromRootInput projectCreateFromRootInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = projectCreateFromRootInput; - - // create path and map variables - String localVarPath = "/projects"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createProjectValidateBeforeCall(ProjectCreateFromRootInput projectCreateFromRootInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectCreateFromRootInput' is set - if (projectCreateFromRootInput == null) { - throw new ApiException("Missing the required parameter 'projectCreateFromRootInput' when calling createProject(Async)"); - } - - return createProjectCall(projectCreateFromRootInput, include, exclude, _callback); - - } - - /** - * Create a project - * Creates a new project for the user default organization. If the user don't have an organization, a new one will be created. - * @param projectCreateFromRootInput Project to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Project - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public Project createProject(ProjectCreateFromRootInput projectCreateFromRootInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createProjectWithHttpInfo(projectCreateFromRootInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a project - * Creates a new project for the user default organization. If the user don't have an organization, a new one will be created. - * @param projectCreateFromRootInput Project to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Project> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createProjectWithHttpInfo(ProjectCreateFromRootInput projectCreateFromRootInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createProjectValidateBeforeCall(projectCreateFromRootInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a project (asynchronously) - * Creates a new project for the user default organization. If the user don't have an organization, a new one will be created. - * @param projectCreateFromRootInput Project to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectAsync(ProjectCreateFromRootInput projectCreateFromRootInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createProjectValidateBeforeCall(projectCreateFromRootInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createProjectInvitation - * @param projectId Project UUID (required) - * @param invitationInput Invitation to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectInvitationCall(UUID projectId, InvitationInput invitationInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = invitationInput; - - // create path and map variables - String localVarPath = "/projects/{project_id}/invitations" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createProjectInvitationValidateBeforeCall(UUID projectId, InvitationInput invitationInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling createProjectInvitation(Async)"); - } - - // verify the required parameter 'invitationInput' is set - if (invitationInput == null) { - throw new ApiException("Missing the required parameter 'invitationInput' when calling createProjectInvitation(Async)"); - } - - return createProjectInvitationCall(projectId, invitationInput, include, _callback); - - } - - /** - * Create an invitation for a project - * In order to add a user to a project, they must first be invited. - * @param projectId Project UUID (required) - * @param invitationInput Invitation to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return Invitation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Invitation createProjectInvitation(UUID projectId, InvitationInput invitationInput, List include) throws ApiException { - ApiResponse localVarResp = createProjectInvitationWithHttpInfo(projectId, invitationInput, include); - return localVarResp.getData(); - } - - /** - * Create an invitation for a project - * In order to add a user to a project, they must first be invited. - * @param projectId Project UUID (required) - * @param invitationInput Invitation to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Invitation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createProjectInvitationWithHttpInfo(UUID projectId, InvitationInput invitationInput, List include) throws ApiException { - okhttp3.Call localVarCall = createProjectInvitationValidateBeforeCall(projectId, invitationInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an invitation for a project (asynchronously) - * In order to add a user to a project, they must first be invited. - * @param projectId Project UUID (required) - * @param invitationInput Invitation to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectInvitationAsync(UUID projectId, InvitationInput invitationInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createProjectInvitationValidateBeforeCall(projectId, invitationInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createTransferRequest - * @param id UUID of the project to be transferred (required) - * @param transferRequestInput Transfer Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- * @deprecated - */ - @Deprecated - public okhttp3.Call createTransferRequestCall(UUID id, TransferRequestInput transferRequestInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = transferRequestInput; - - // create path and map variables - String localVarPath = "/projects/{id}/transfers" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @Deprecated - @SuppressWarnings("rawtypes") - private okhttp3.Call createTransferRequestValidateBeforeCall(UUID id, TransferRequestInput transferRequestInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createTransferRequest(Async)"); - } - - // verify the required parameter 'transferRequestInput' is set - if (transferRequestInput == null) { - throw new ApiException("Missing the required parameter 'transferRequestInput' when calling createTransferRequest(Async)"); - } - - return createTransferRequestCall(id, transferRequestInput, include, _callback); - - } - - /** - * Create a transfer request - * Organization owners can transfer their projects to other organizations. - * @param id UUID of the project to be transferred (required) - * @param transferRequestInput Transfer Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return TransferRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- * @deprecated - */ - @Deprecated - public TransferRequest createTransferRequest(UUID id, TransferRequestInput transferRequestInput, List include) throws ApiException { - ApiResponse localVarResp = createTransferRequestWithHttpInfo(id, transferRequestInput, include); - return localVarResp.getData(); - } - - /** - * Create a transfer request - * Organization owners can transfer their projects to other organizations. - * @param id UUID of the project to be transferred (required) - * @param transferRequestInput Transfer Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<TransferRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- * @deprecated - */ - @Deprecated - public ApiResponse createTransferRequestWithHttpInfo(UUID id, TransferRequestInput transferRequestInput, List include) throws ApiException { - okhttp3.Call localVarCall = createTransferRequestValidateBeforeCall(id, transferRequestInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a transfer request (asynchronously) - * Organization owners can transfer their projects to other organizations. - * @param id UUID of the project to be transferred (required) - * @param transferRequestInput Transfer Request to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- * @deprecated - */ - @Deprecated - public okhttp3.Call createTransferRequestAsync(UUID id, TransferRequestInput transferRequestInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createTransferRequestValidateBeforeCall(id, transferRequestInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteProject - * @param id Project UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteProjectCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteProjectValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteProject(Async)"); - } - - return deleteProjectCall(id, _callback); - - } - - /** - * Delete the project - * Deletes the project. - * @param id Project UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteProject(UUID id) throws ApiException { - deleteProjectWithHttpInfo(id); - } - - /** - * Delete the project - * Deletes the project. - * @param id Project UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteProjectWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteProjectValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the project (asynchronously) - * Deletes the project. - * @param id Project UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteProjectAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteProjectValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findIPReservationCustomdata - * @param projectId Project UUID (required) - * @param id Ip Reservation UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPReservationCustomdataCall(UUID projectId, UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{project_id}/ips/{id}/customdata" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())) - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findIPReservationCustomdataValidateBeforeCall(UUID projectId, UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling findIPReservationCustomdata(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findIPReservationCustomdata(Async)"); - } - - return findIPReservationCustomdataCall(projectId, id, _callback); - - } - - /** - * Retrieve the custom metadata of an IP Reservation - * Provides the custom metadata stored for this IP Reservation in json format - * @param projectId Project UUID (required) - * @param id Ip Reservation UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void findIPReservationCustomdata(UUID projectId, UUID id) throws ApiException { - findIPReservationCustomdataWithHttpInfo(projectId, id); - } - - /** - * Retrieve the custom metadata of an IP Reservation - * Provides the custom metadata stored for this IP Reservation in json format - * @param projectId Project UUID (required) - * @param id Ip Reservation UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findIPReservationCustomdataWithHttpInfo(UUID projectId, UUID id) throws ApiException { - okhttp3.Call localVarCall = findIPReservationCustomdataValidateBeforeCall(projectId, id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve the custom metadata of an IP Reservation (asynchronously) - * Provides the custom metadata stored for this IP Reservation in json format - * @param projectId Project UUID (required) - * @param id Ip Reservation UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findIPReservationCustomdataAsync(UUID projectId, UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findIPReservationCustomdataValidateBeforeCall(projectId, id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findProjectById - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectById(Async)"); - } - - return findProjectByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve a project - * Returns a single project if the user has access - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Project - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Project findProjectById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findProjectByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve a project - * Returns a single project if the user has access - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Project> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findProjectByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findProjectByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a project (asynchronously) - * Returns a single project if the user has access - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectCustomdata - * @param id Project UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectCustomdataCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/customdata" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectCustomdata(Async)"); - } - - return findProjectCustomdataCall(id, _callback); - - } - - /** - * Retrieve the custom metadata of a project - * Provides the custom metadata stored for this project in json format - * @param id Project UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void findProjectCustomdata(UUID id) throws ApiException { - findProjectCustomdataWithHttpInfo(id); - } - - /** - * Retrieve the custom metadata of a project - * Provides the custom metadata stored for this project in json format - * @param id Project UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findProjectCustomdataWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findProjectCustomdataValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve the custom metadata of a project (asynchronously) - * Provides the custom metadata stored for this project in json format - * @param id Project UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectCustomdataAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectCustomdataValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findProjectInvitations - * @param projectId Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectInvitationsCall(UUID projectId, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{project_id}/invitations" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectInvitationsValidateBeforeCall(UUID projectId, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling findProjectInvitations(Async)"); - } - - return findProjectInvitationsCall(projectId, include, page, perPage, _callback); - - } - - /** - * Retrieve project invitations - * Returns all invitations in a project. - * @param projectId Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return InvitationList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public InvitationList findProjectInvitations(UUID projectId, List include, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findProjectInvitationsWithHttpInfo(projectId, include, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve project invitations - * Returns all invitations in a project. - * @param projectId Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<InvitationList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findProjectInvitationsWithHttpInfo(UUID projectId, List include, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findProjectInvitationsValidateBeforeCall(projectId, include, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve project invitations (asynchronously) - * Returns all invitations in a project. - * @param projectId Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectInvitationsAsync(UUID projectId, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectInvitationsValidateBeforeCall(projectId, include, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectMemberships - * @param projectId Project UUID (required) - * @param search Search by member full name, id and email. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectMembershipsCall(UUID projectId, String search, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{project_id}/memberships" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectMembershipsValidateBeforeCall(UUID projectId, String search, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling findProjectMemberships(Async)"); - } - - return findProjectMembershipsCall(projectId, search, include, page, perPage, _callback); - - } - - /** - * Retrieve project memberships - * Returns all memberships in a project. - * @param projectId Project UUID (required) - * @param search Search by member full name, id and email. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return MembershipList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public MembershipList findProjectMemberships(UUID projectId, String search, List include, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findProjectMembershipsWithHttpInfo(projectId, search, include, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve project memberships - * Returns all memberships in a project. - * @param projectId Project UUID (required) - * @param search Search by member full name, id and email. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<MembershipList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findProjectMembershipsWithHttpInfo(UUID projectId, String search, List include, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findProjectMembershipsValidateBeforeCall(projectId, search, include, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve project memberships (asynchronously) - * Returns all memberships in a project. - * @param projectId Project UUID (required) - * @param search Search by member full name, id and email. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findProjectMembershipsAsync(UUID projectId, String search, List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectMembershipsValidateBeforeCall(projectId, search, include, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjects - * @param name Filter results by name. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findProjectsCall(String name, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (name != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectsValidateBeforeCall(String name, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - return findProjectsCall(name, include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve all projects - * Returns a collection of projects that the current user is a member of. - * @param name Filter results by name. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ProjectList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ProjectList findProjects(String name, List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findProjectsWithHttpInfo(name, include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all projects - * Returns a collection of projects that the current user is a member of. - * @param name Filter results by name. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<ProjectList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findProjectsWithHttpInfo(String name, List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findProjectsValidateBeforeCall(name, include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all projects (asynchronously) - * Returns a collection of projects that the current user is a member of. - * @param name Filter results by name. (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findProjectsAsync(String name, List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectsValidateBeforeCall(name, include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateProject - * @param id Project UUID (required) - * @param projectUpdateInput Project to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateProjectCall(UUID id, ProjectUpdateInput projectUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = projectUpdateInput; - - // create path and map variables - String localVarPath = "/projects/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateProjectValidateBeforeCall(UUID id, ProjectUpdateInput projectUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateProject(Async)"); - } - - // verify the required parameter 'projectUpdateInput' is set - if (projectUpdateInput == null) { - throw new ApiException("Missing the required parameter 'projectUpdateInput' when calling updateProject(Async)"); - } - - return updateProjectCall(id, projectUpdateInput, include, exclude, _callback); - - } - - /** - * Update the project - * Updates the project. - * @param id Project UUID (required) - * @param projectUpdateInput Project to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Project - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Project updateProject(UUID id, ProjectUpdateInput projectUpdateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateProjectWithHttpInfo(id, projectUpdateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update the project - * Updates the project. - * @param id Project UUID (required) - * @param projectUpdateInput Project to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Project> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateProjectWithHttpInfo(UUID id, ProjectUpdateInput projectUpdateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateProjectValidateBeforeCall(id, projectUpdateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the project (asynchronously) - * Updates the project. - * @param id Project UUID (required) - * @param projectUpdateInput Project to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateProjectAsync(UUID id, ProjectUpdateInput projectUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateProjectValidateBeforeCall(id, projectUpdateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApi.java deleted file mode 100644 index 0d4c4c1b3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApi.java +++ /dev/null @@ -1,512 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.CreateSelfServiceReservationRequest; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationList; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationResponse; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SelfServiceReservationsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SelfServiceReservationsApi() { - this(Configuration.getDefaultApiClient()); - } - - public SelfServiceReservationsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createSelfServiceReservation - * @param projectId Project UUID (required) - * @param createSelfServiceReservationRequest reservation to create (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createSelfServiceReservationCall(UUID projectId, CreateSelfServiceReservationRequest createSelfServiceReservationRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = createSelfServiceReservationRequest; - - // create path and map variables - String localVarPath = "/projects/{project_id}/self-service/reservations" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createSelfServiceReservationValidateBeforeCall(UUID projectId, CreateSelfServiceReservationRequest createSelfServiceReservationRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling createSelfServiceReservation(Async)"); - } - - // verify the required parameter 'createSelfServiceReservationRequest' is set - if (createSelfServiceReservationRequest == null) { - throw new ApiException("Missing the required parameter 'createSelfServiceReservationRequest' when calling createSelfServiceReservation(Async)"); - } - - return createSelfServiceReservationCall(projectId, createSelfServiceReservationRequest, _callback); - - } - - /** - * Create a reservation - * Creates a reservation. - * @param projectId Project UUID (required) - * @param createSelfServiceReservationRequest reservation to create (required) - * @return SelfServiceReservationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public SelfServiceReservationResponse createSelfServiceReservation(UUID projectId, CreateSelfServiceReservationRequest createSelfServiceReservationRequest) throws ApiException { - ApiResponse localVarResp = createSelfServiceReservationWithHttpInfo(projectId, createSelfServiceReservationRequest); - return localVarResp.getData(); - } - - /** - * Create a reservation - * Creates a reservation. - * @param projectId Project UUID (required) - * @param createSelfServiceReservationRequest reservation to create (required) - * @return ApiResponse<SelfServiceReservationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createSelfServiceReservationWithHttpInfo(UUID projectId, CreateSelfServiceReservationRequest createSelfServiceReservationRequest) throws ApiException { - okhttp3.Call localVarCall = createSelfServiceReservationValidateBeforeCall(projectId, createSelfServiceReservationRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a reservation (asynchronously) - * Creates a reservation. - * @param projectId Project UUID (required) - * @param createSelfServiceReservationRequest reservation to create (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createSelfServiceReservationAsync(UUID projectId, CreateSelfServiceReservationRequest createSelfServiceReservationRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createSelfServiceReservationValidateBeforeCall(projectId, createSelfServiceReservationRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findSelfServiceReservation - * @param id Reservation short_id (required) - * @param projectId Project UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findSelfServiceReservationCall(UUID id, UUID projectId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{project_id}/self-service/reservations/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())) - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findSelfServiceReservationValidateBeforeCall(UUID id, UUID projectId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findSelfServiceReservation(Async)"); - } - - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling findSelfServiceReservation(Async)"); - } - - return findSelfServiceReservationCall(id, projectId, _callback); - - } - - /** - * Retrieve a reservation - * Returns a reservation - * @param id Reservation short_id (required) - * @param projectId Project UUID (required) - * @return SelfServiceReservationResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public SelfServiceReservationResponse findSelfServiceReservation(UUID id, UUID projectId) throws ApiException { - ApiResponse localVarResp = findSelfServiceReservationWithHttpInfo(id, projectId); - return localVarResp.getData(); - } - - /** - * Retrieve a reservation - * Returns a reservation - * @param id Reservation short_id (required) - * @param projectId Project UUID (required) - * @return ApiResponse<SelfServiceReservationResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findSelfServiceReservationWithHttpInfo(UUID id, UUID projectId) throws ApiException { - okhttp3.Call localVarCall = findSelfServiceReservationValidateBeforeCall(id, projectId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a reservation (asynchronously) - * Returns a reservation - * @param id Reservation short_id (required) - * @param projectId Project UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findSelfServiceReservationAsync(UUID id, UUID projectId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findSelfServiceReservationValidateBeforeCall(id, projectId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findSelfServiceReservations - * @param projectId Project UUID (required) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param categories Filter reservations by items category (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findSelfServiceReservationsCall(UUID projectId, Integer page, Integer perPage, List categories, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{project_id}/self-service/reservations" - .replace("{" + "project_id" + "}", localVarApiClient.escapeString(projectId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - if (categories != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "categories", categories)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findSelfServiceReservationsValidateBeforeCall(UUID projectId, Integer page, Integer perPage, List categories, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException("Missing the required parameter 'projectId' when calling findSelfServiceReservations(Async)"); - } - - return findSelfServiceReservationsCall(projectId, page, perPage, categories, _callback); - - } - - /** - * Retrieve all reservations - * Returns all reservations. - * @param projectId Project UUID (required) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param categories Filter reservations by items category (optional) - * @return SelfServiceReservationList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public SelfServiceReservationList findSelfServiceReservations(UUID projectId, Integer page, Integer perPage, List categories) throws ApiException { - ApiResponse localVarResp = findSelfServiceReservationsWithHttpInfo(projectId, page, perPage, categories); - return localVarResp.getData(); - } - - /** - * Retrieve all reservations - * Returns all reservations. - * @param projectId Project UUID (required) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param categories Filter reservations by items category (optional) - * @return ApiResponse<SelfServiceReservationList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findSelfServiceReservationsWithHttpInfo(UUID projectId, Integer page, Integer perPage, List categories) throws ApiException { - okhttp3.Call localVarCall = findSelfServiceReservationsValidateBeforeCall(projectId, page, perPage, categories, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all reservations (asynchronously) - * Returns all reservations. - * @param projectId Project UUID (required) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param categories Filter reservations by items category (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findSelfServiceReservationsAsync(UUID projectId, Integer page, Integer perPage, List categories, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findSelfServiceReservationsValidateBeforeCall(projectId, page, perPage, categories, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SpotMarketApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SpotMarketApi.java deleted file mode 100644 index d4b0f58a8..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SpotMarketApi.java +++ /dev/null @@ -1,1095 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.SpotMarketPricesList; -import com.equinix.openapi.metal.v1.model.SpotMarketPricesPerMetroList; -import com.equinix.openapi.metal.v1.model.SpotMarketRequest; -import com.equinix.openapi.metal.v1.model.SpotMarketRequestCreateInput; -import com.equinix.openapi.metal.v1.model.SpotMarketRequestList; -import com.equinix.openapi.metal.v1.model.SpotPricesHistoryReport; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SpotMarketApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SpotMarketApi() { - this(Configuration.getDefaultApiClient()); - } - - public SpotMarketApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createSpotMarketRequest - * @param id Project UUID (required) - * @param spotMarketRequestCreateInput Spot Market Request to create (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createSpotMarketRequestCall(UUID id, SpotMarketRequestCreateInput spotMarketRequestCreateInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = spotMarketRequestCreateInput; - - // create path and map variables - String localVarPath = "/projects/{id}/spot-market-requests" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createSpotMarketRequestValidateBeforeCall(UUID id, SpotMarketRequestCreateInput spotMarketRequestCreateInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createSpotMarketRequest(Async)"); - } - - // verify the required parameter 'spotMarketRequestCreateInput' is set - if (spotMarketRequestCreateInput == null) { - throw new ApiException("Missing the required parameter 'spotMarketRequestCreateInput' when calling createSpotMarketRequest(Async)"); - } - - return createSpotMarketRequestCall(id, spotMarketRequestCreateInput, _callback); - - } - - /** - * Create a spot market request - * Creates a new spot market request. Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan. The features attribute allows you to optionally specify what features your server should have. For example, if you require a server with a TPM chip, you may specify `{ \"features\": { \"tpm\": \"required\" } }` (or `{ \"features\": [\"tpm\"] }` in shorthand). The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below). The request will not fail if we have no servers with that feature in our inventory. - * @param id Project UUID (required) - * @param spotMarketRequestCreateInput Spot Market Request to create (required) - * @return SpotMarketRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public SpotMarketRequest createSpotMarketRequest(UUID id, SpotMarketRequestCreateInput spotMarketRequestCreateInput) throws ApiException { - ApiResponse localVarResp = createSpotMarketRequestWithHttpInfo(id, spotMarketRequestCreateInput); - return localVarResp.getData(); - } - - /** - * Create a spot market request - * Creates a new spot market request. Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan. The features attribute allows you to optionally specify what features your server should have. For example, if you require a server with a TPM chip, you may specify `{ \"features\": { \"tpm\": \"required\" } }` (or `{ \"features\": [\"tpm\"] }` in shorthand). The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below). The request will not fail if we have no servers with that feature in our inventory. - * @param id Project UUID (required) - * @param spotMarketRequestCreateInput Spot Market Request to create (required) - * @return ApiResponse<SpotMarketRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createSpotMarketRequestWithHttpInfo(UUID id, SpotMarketRequestCreateInput spotMarketRequestCreateInput) throws ApiException { - okhttp3.Call localVarCall = createSpotMarketRequestValidateBeforeCall(id, spotMarketRequestCreateInput, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a spot market request (asynchronously) - * Creates a new spot market request. Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan. The features attribute allows you to optionally specify what features your server should have. For example, if you require a server with a TPM chip, you may specify `{ \"features\": { \"tpm\": \"required\" } }` (or `{ \"features\": [\"tpm\"] }` in shorthand). The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below). The request will not fail if we have no servers with that feature in our inventory. - * @param id Project UUID (required) - * @param spotMarketRequestCreateInput Spot Market Request to create (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createSpotMarketRequestAsync(UUID id, SpotMarketRequestCreateInput spotMarketRequestCreateInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createSpotMarketRequestValidateBeforeCall(id, spotMarketRequestCreateInput, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteSpotMarketRequest - * @param id SpotMarketRequest UUID (required) - * @param forceTermination Terminate associated spot instances (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteSpotMarketRequestCall(UUID id, Boolean forceTermination, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/spot-market-requests/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (forceTermination != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("force_termination", forceTermination)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSpotMarketRequestValidateBeforeCall(UUID id, Boolean forceTermination, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteSpotMarketRequest(Async)"); - } - - return deleteSpotMarketRequestCall(id, forceTermination, _callback); - - } - - /** - * Delete the spot market request - * Deletes the spot market request. - * @param id SpotMarketRequest UUID (required) - * @param forceTermination Terminate associated spot instances (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteSpotMarketRequest(UUID id, Boolean forceTermination) throws ApiException { - deleteSpotMarketRequestWithHttpInfo(id, forceTermination); - } - - /** - * Delete the spot market request - * Deletes the spot market request. - * @param id SpotMarketRequest UUID (required) - * @param forceTermination Terminate associated spot instances (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteSpotMarketRequestWithHttpInfo(UUID id, Boolean forceTermination) throws ApiException { - okhttp3.Call localVarCall = deleteSpotMarketRequestValidateBeforeCall(id, forceTermination, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the spot market request (asynchronously) - * Deletes the spot market request. - * @param id SpotMarketRequest UUID (required) - * @param forceTermination Terminate associated spot instances (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteSpotMarketRequestAsync(UUID id, Boolean forceTermination, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteSpotMarketRequestValidateBeforeCall(id, forceTermination, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findMetroSpotMarketPrices - * @param metro Metro to filter spot market prices (optional) - * @param plan Plan to filter spot market prices (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call findMetroSpotMarketPricesCall(String metro, String plan, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/market/spot/prices/metros"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (metro != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("metro", metro)); - } - - if (plan != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("plan", plan)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findMetroSpotMarketPricesValidateBeforeCall(String metro, String plan, final ApiCallback _callback) throws ApiException { - return findMetroSpotMarketPricesCall(metro, plan, _callback); - - } - - /** - * Get current spot market prices for metros - * Get Equinix Metal current spot market prices for all metros. - * @param metro Metro to filter spot market prices (optional) - * @param plan Plan to filter spot market prices (optional) - * @return SpotMarketPricesPerMetroList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public SpotMarketPricesPerMetroList findMetroSpotMarketPrices(String metro, String plan) throws ApiException { - ApiResponse localVarResp = findMetroSpotMarketPricesWithHttpInfo(metro, plan); - return localVarResp.getData(); - } - - /** - * Get current spot market prices for metros - * Get Equinix Metal current spot market prices for all metros. - * @param metro Metro to filter spot market prices (optional) - * @param plan Plan to filter spot market prices (optional) - * @return ApiResponse<SpotMarketPricesPerMetroList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse findMetroSpotMarketPricesWithHttpInfo(String metro, String plan) throws ApiException { - okhttp3.Call localVarCall = findMetroSpotMarketPricesValidateBeforeCall(metro, plan, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get current spot market prices for metros (asynchronously) - * Get Equinix Metal current spot market prices for all metros. - * @param metro Metro to filter spot market prices (optional) - * @param plan Plan to filter spot market prices (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call findMetroSpotMarketPricesAsync(String metro, String plan, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findMetroSpotMarketPricesValidateBeforeCall(metro, plan, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findSpotMarketPrices - * @param facility Facility to check spot market prices (optional) - * @param plan Plan to check spot market prices (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call findSpotMarketPricesCall(String facility, String plan, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/market/spot/prices"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (facility != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("facility", facility)); - } - - if (plan != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("plan", plan)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findSpotMarketPricesValidateBeforeCall(String facility, String plan, final ApiCallback _callback) throws ApiException { - return findSpotMarketPricesCall(facility, plan, _callback); - - } - - /** - * Get current spot market prices - * Get Equinix Metal current spot market prices. - * @param facility Facility to check spot market prices (optional) - * @param plan Plan to check spot market prices (optional) - * @return SpotMarketPricesList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public SpotMarketPricesList findSpotMarketPrices(String facility, String plan) throws ApiException { - ApiResponse localVarResp = findSpotMarketPricesWithHttpInfo(facility, plan); - return localVarResp.getData(); - } - - /** - * Get current spot market prices - * Get Equinix Metal current spot market prices. - * @param facility Facility to check spot market prices (optional) - * @param plan Plan to check spot market prices (optional) - * @return ApiResponse<SpotMarketPricesList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse findSpotMarketPricesWithHttpInfo(String facility, String plan) throws ApiException { - okhttp3.Call localVarCall = findSpotMarketPricesValidateBeforeCall(facility, plan, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get current spot market prices (asynchronously) - * Get Equinix Metal current spot market prices. - * @param facility Facility to check spot market prices (optional) - * @param plan Plan to check spot market prices (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call findSpotMarketPricesAsync(String facility, String plan, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findSpotMarketPricesValidateBeforeCall(facility, plan, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findSpotMarketPricesHistory - * @param facility Facility to check spot market prices (required) - * @param plan Plan to check spot market prices (required) - * @param from Timestamp from range (required) - * @param until Timestamp to range (required) - * @param metro Metro to check spot market price history (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call findSpotMarketPricesHistoryCall(String facility, String plan, String from, String until, String metro, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/market/spot/prices/history"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (facility != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("facility", facility)); - } - - if (plan != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("plan", plan)); - } - - if (metro != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("metro", metro)); - } - - if (from != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("from", from)); - } - - if (until != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("until", until)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findSpotMarketPricesHistoryValidateBeforeCall(String facility, String plan, String from, String until, String metro, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'facility' is set - if (facility == null) { - throw new ApiException("Missing the required parameter 'facility' when calling findSpotMarketPricesHistory(Async)"); - } - - // verify the required parameter 'plan' is set - if (plan == null) { - throw new ApiException("Missing the required parameter 'plan' when calling findSpotMarketPricesHistory(Async)"); - } - - // verify the required parameter 'from' is set - if (from == null) { - throw new ApiException("Missing the required parameter 'from' when calling findSpotMarketPricesHistory(Async)"); - } - - // verify the required parameter 'until' is set - if (until == null) { - throw new ApiException("Missing the required parameter 'until' when calling findSpotMarketPricesHistory(Async)"); - } - - return findSpotMarketPricesHistoryCall(facility, plan, from, until, metro, _callback); - - } - - /** - * Get spot market prices for a given period of time - * Get spot market prices for a given plan and facility in a fixed period of time *Note: In the `200` response, the property `datapoints` contains arrays of `[float, integer]`.* - * @param facility Facility to check spot market prices (required) - * @param plan Plan to check spot market prices (required) - * @param from Timestamp from range (required) - * @param until Timestamp to range (required) - * @param metro Metro to check spot market price history (optional) - * @return SpotPricesHistoryReport - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public SpotPricesHistoryReport findSpotMarketPricesHistory(String facility, String plan, String from, String until, String metro) throws ApiException { - ApiResponse localVarResp = findSpotMarketPricesHistoryWithHttpInfo(facility, plan, from, until, metro); - return localVarResp.getData(); - } - - /** - * Get spot market prices for a given period of time - * Get spot market prices for a given plan and facility in a fixed period of time *Note: In the `200` response, the property `datapoints` contains arrays of `[float, integer]`.* - * @param facility Facility to check spot market prices (required) - * @param plan Plan to check spot market prices (required) - * @param from Timestamp from range (required) - * @param until Timestamp to range (required) - * @param metro Metro to check spot market price history (optional) - * @return ApiResponse<SpotPricesHistoryReport> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse findSpotMarketPricesHistoryWithHttpInfo(String facility, String plan, String from, String until, String metro) throws ApiException { - okhttp3.Call localVarCall = findSpotMarketPricesHistoryValidateBeforeCall(facility, plan, from, until, metro, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get spot market prices for a given period of time (asynchronously) - * Get spot market prices for a given plan and facility in a fixed period of time *Note: In the `200` response, the property `datapoints` contains arrays of `[float, integer]`.* - * @param facility Facility to check spot market prices (required) - * @param plan Plan to check spot market prices (required) - * @param from Timestamp from range (required) - * @param until Timestamp to range (required) - * @param metro Metro to check spot market price history (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call findSpotMarketPricesHistoryAsync(String facility, String plan, String from, String until, String metro, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findSpotMarketPricesHistoryValidateBeforeCall(facility, plan, from, until, metro, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findSpotMarketRequestById - * @param id SpotMarketRequest UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findSpotMarketRequestByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/spot-market-requests/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findSpotMarketRequestByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findSpotMarketRequestById(Async)"); - } - - return findSpotMarketRequestByIdCall(id, include, _callback); - - } - - /** - * Retrieve a spot market request - * Returns a single spot market request - * @param id SpotMarketRequest UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return SpotMarketRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public SpotMarketRequest findSpotMarketRequestById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findSpotMarketRequestByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve a spot market request - * Returns a single spot market request - * @param id SpotMarketRequest UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<SpotMarketRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findSpotMarketRequestByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findSpotMarketRequestByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a spot market request (asynchronously) - * Returns a single spot market request - * @param id SpotMarketRequest UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findSpotMarketRequestByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findSpotMarketRequestByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listSpotMarketRequests - * @param id Project UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call listSpotMarketRequestsCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/spot-market-requests" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listSpotMarketRequestsValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling listSpotMarketRequests(Async)"); - } - - return listSpotMarketRequestsCall(id, _callback); - - } - - /** - * List spot market requests - * View all spot market requests for a given project. - * @param id Project UUID (required) - * @return SpotMarketRequestList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public SpotMarketRequestList listSpotMarketRequests(UUID id) throws ApiException { - ApiResponse localVarResp = listSpotMarketRequestsWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * List spot market requests - * View all spot market requests for a given project. - * @param id Project UUID (required) - * @return ApiResponse<SpotMarketRequestList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse listSpotMarketRequestsWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = listSpotMarketRequestsValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List spot market requests (asynchronously) - * View all spot market requests for a given project. - * @param id Project UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call listSpotMarketRequestsAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listSpotMarketRequestsValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SshKeysApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SshKeysApi.java deleted file mode 100644 index 0ae6f1742..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SshKeysApi.java +++ /dev/null @@ -1,1218 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.SSHKey; -import com.equinix.openapi.metal.v1.model.SSHKeyCreateInput; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.SSHKeyList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SshKeysApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SshKeysApi() { - this(Configuration.getDefaultApiClient()); - } - - public SshKeysApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createProjectSSHKey - * @param id Project UUID (required) - * @param ssHKeyCreateInput ssh key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectSSHKeyCall(UUID id, SSHKeyCreateInput ssHKeyCreateInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = ssHKeyCreateInput; - - // create path and map variables - String localVarPath = "/projects/{id}/ssh-keys" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createProjectSSHKeyValidateBeforeCall(UUID id, SSHKeyCreateInput ssHKeyCreateInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createProjectSSHKey(Async)"); - } - - // verify the required parameter 'ssHKeyCreateInput' is set - if (ssHKeyCreateInput == null) { - throw new ApiException("Missing the required parameter 'ssHKeyCreateInput' when calling createProjectSSHKey(Async)"); - } - - return createProjectSSHKeyCall(id, ssHKeyCreateInput, include, _callback); - - } - - /** - * Create a ssh key for the given project - * Creates a ssh key. - * @param id Project UUID (required) - * @param ssHKeyCreateInput ssh key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return SSHKey - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public SSHKey createProjectSSHKey(UUID id, SSHKeyCreateInput ssHKeyCreateInput, List include) throws ApiException { - ApiResponse localVarResp = createProjectSSHKeyWithHttpInfo(id, ssHKeyCreateInput, include); - return localVarResp.getData(); - } - - /** - * Create a ssh key for the given project - * Creates a ssh key. - * @param id Project UUID (required) - * @param ssHKeyCreateInput ssh key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<SSHKey> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createProjectSSHKeyWithHttpInfo(UUID id, SSHKeyCreateInput ssHKeyCreateInput, List include) throws ApiException { - okhttp3.Call localVarCall = createProjectSSHKeyValidateBeforeCall(id, ssHKeyCreateInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a ssh key for the given project (asynchronously) - * Creates a ssh key. - * @param id Project UUID (required) - * @param ssHKeyCreateInput ssh key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createProjectSSHKeyAsync(UUID id, SSHKeyCreateInput ssHKeyCreateInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createProjectSSHKeyValidateBeforeCall(id, ssHKeyCreateInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createSSHKey - * @param ssHKeyCreateInput ssh key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createSSHKeyCall(SSHKeyCreateInput ssHKeyCreateInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = ssHKeyCreateInput; - - // create path and map variables - String localVarPath = "/ssh-keys"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createSSHKeyValidateBeforeCall(SSHKeyCreateInput ssHKeyCreateInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'ssHKeyCreateInput' is set - if (ssHKeyCreateInput == null) { - throw new ApiException("Missing the required parameter 'ssHKeyCreateInput' when calling createSSHKey(Async)"); - } - - return createSSHKeyCall(ssHKeyCreateInput, include, _callback); - - } - - /** - * Create a ssh key for the current user - * Creates a ssh key. - * @param ssHKeyCreateInput ssh key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return SSHKey - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public SSHKey createSSHKey(SSHKeyCreateInput ssHKeyCreateInput, List include) throws ApiException { - ApiResponse localVarResp = createSSHKeyWithHttpInfo(ssHKeyCreateInput, include); - return localVarResp.getData(); - } - - /** - * Create a ssh key for the current user - * Creates a ssh key. - * @param ssHKeyCreateInput ssh key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<SSHKey> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createSSHKeyWithHttpInfo(SSHKeyCreateInput ssHKeyCreateInput, List include) throws ApiException { - okhttp3.Call localVarCall = createSSHKeyValidateBeforeCall(ssHKeyCreateInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a ssh key for the current user (asynchronously) - * Creates a ssh key. - * @param ssHKeyCreateInput ssh key to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createSSHKeyAsync(SSHKeyCreateInput ssHKeyCreateInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createSSHKeyValidateBeforeCall(ssHKeyCreateInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteSSHKey - * @param id ssh key UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteSSHKeyCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ssh-keys/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteSSHKeyValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteSSHKey(Async)"); - } - - return deleteSSHKeyCall(id, _callback); - - } - - /** - * Delete the ssh key - * Deletes the ssh key. - * @param id ssh key UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteSSHKey(UUID id) throws ApiException { - deleteSSHKeyWithHttpInfo(id); - } - - /** - * Delete the ssh key - * Deletes the ssh key. - * @param id ssh key UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteSSHKeyWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteSSHKeyValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the ssh key (asynchronously) - * Deletes the ssh key. - * @param id ssh key UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteSSHKeyAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteSSHKeyValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findDeviceSSHKeys - * @param id Project UUID (required) - * @param searchString Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findDeviceSSHKeysCall(UUID id, String searchString, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/ssh-keys" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (searchString != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("Search string", searchString)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findDeviceSSHKeysValidateBeforeCall(UUID id, String searchString, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findDeviceSSHKeys(Async)"); - } - - return findDeviceSSHKeysCall(id, searchString, include, _callback); - - } - - /** - * Retrieve a device's ssh keys - * Returns a collection of the device's ssh keys. - * @param id Project UUID (required) - * @param searchString Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return SSHKeyList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public SSHKeyList findDeviceSSHKeys(UUID id, String searchString, List include) throws ApiException { - ApiResponse localVarResp = findDeviceSSHKeysWithHttpInfo(id, searchString, include); - return localVarResp.getData(); - } - - /** - * Retrieve a device's ssh keys - * Returns a collection of the device's ssh keys. - * @param id Project UUID (required) - * @param searchString Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<SSHKeyList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findDeviceSSHKeysWithHttpInfo(UUID id, String searchString, List include) throws ApiException { - okhttp3.Call localVarCall = findDeviceSSHKeysValidateBeforeCall(id, searchString, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a device's ssh keys (asynchronously) - * Returns a collection of the device's ssh keys. - * @param id Project UUID (required) - * @param searchString Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findDeviceSSHKeysAsync(UUID id, String searchString, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findDeviceSSHKeysValidateBeforeCall(id, searchString, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectSSHKeys - * @param id Project UUID (required) - * @param query Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findProjectSSHKeysCall(UUID id, String query, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/ssh-keys" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (query != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectSSHKeysValidateBeforeCall(UUID id, String query, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectSSHKeys(Async)"); - } - - return findProjectSSHKeysCall(id, query, include, _callback); - - } - - /** - * Retrieve a project's ssh keys - * Returns a collection of the project's ssh keys. - * @param id Project UUID (required) - * @param query Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return SSHKeyList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public SSHKeyList findProjectSSHKeys(UUID id, String query, List include) throws ApiException { - ApiResponse localVarResp = findProjectSSHKeysWithHttpInfo(id, query, include); - return localVarResp.getData(); - } - - /** - * Retrieve a project's ssh keys - * Returns a collection of the project's ssh keys. - * @param id Project UUID (required) - * @param query Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<SSHKeyList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findProjectSSHKeysWithHttpInfo(UUID id, String query, List include) throws ApiException { - okhttp3.Call localVarCall = findProjectSSHKeysValidateBeforeCall(id, query, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a project's ssh keys (asynchronously) - * Returns a collection of the project's ssh keys. - * @param id Project UUID (required) - * @param query Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findProjectSSHKeysAsync(UUID id, String query, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectSSHKeysValidateBeforeCall(id, query, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findSSHKeyById - * @param id SSH Key UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findSSHKeyByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ssh-keys/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findSSHKeyByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findSSHKeyById(Async)"); - } - - return findSSHKeyByIdCall(id, include, _callback); - - } - - /** - * Retrieve a ssh key - * Returns a single ssh key if the user has access - * @param id SSH Key UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return SSHKey - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public SSHKey findSSHKeyById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findSSHKeyByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * Retrieve a ssh key - * Returns a single ssh key if the user has access - * @param id SSH Key UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<SSHKey> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findSSHKeyByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findSSHKeyByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a ssh key (asynchronously) - * Returns a single ssh key if the user has access - * @param id SSH Key UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findSSHKeyByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findSSHKeyByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findSSHKeys - * @param search Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findSSHKeysCall(String search, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/ssh-keys"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (search != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("search", search)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findSSHKeysValidateBeforeCall(String search, List include, final ApiCallback _callback) throws ApiException { - return findSSHKeysCall(search, include, _callback); - - } - - /** - * Retrieve all ssh keys - * Returns a collection of the user’s ssh keys. - * @param search Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return SSHKeyList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public SSHKeyList findSSHKeys(String search, List include) throws ApiException { - ApiResponse localVarResp = findSSHKeysWithHttpInfo(search, include); - return localVarResp.getData(); - } - - /** - * Retrieve all ssh keys - * Returns a collection of the user’s ssh keys. - * @param search Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<SSHKeyList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findSSHKeysWithHttpInfo(String search, List include) throws ApiException { - okhttp3.Call localVarCall = findSSHKeysValidateBeforeCall(search, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all ssh keys (asynchronously) - * Returns a collection of the user’s ssh keys. - * @param search Search by key, label, or fingerprint (optional) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findSSHKeysAsync(String search, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findSSHKeysValidateBeforeCall(search, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateSSHKey - * @param id SSH Key UUID (required) - * @param ssHKeyInput ssh key to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateSSHKeyCall(UUID id, SSHKeyInput ssHKeyInput, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = ssHKeyInput; - - // create path and map variables - String localVarPath = "/ssh-keys/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateSSHKeyValidateBeforeCall(UUID id, SSHKeyInput ssHKeyInput, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateSSHKey(Async)"); - } - - // verify the required parameter 'ssHKeyInput' is set - if (ssHKeyInput == null) { - throw new ApiException("Missing the required parameter 'ssHKeyInput' when calling updateSSHKey(Async)"); - } - - return updateSSHKeyCall(id, ssHKeyInput, include, _callback); - - } - - /** - * Update the ssh key - * Updates the ssh key. - * @param id SSH Key UUID (required) - * @param ssHKeyInput ssh key to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return SSHKey - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public SSHKey updateSSHKey(UUID id, SSHKeyInput ssHKeyInput, List include) throws ApiException { - ApiResponse localVarResp = updateSSHKeyWithHttpInfo(id, ssHKeyInput, include); - return localVarResp.getData(); - } - - /** - * Update the ssh key - * Updates the ssh key. - * @param id SSH Key UUID (required) - * @param ssHKeyInput ssh key to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<SSHKey> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateSSHKeyWithHttpInfo(UUID id, SSHKeyInput ssHKeyInput, List include) throws ApiException { - okhttp3.Call localVarCall = updateSSHKeyValidateBeforeCall(id, ssHKeyInput, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the ssh key (asynchronously) - * Updates the ssh key. - * @param id SSH Key UUID (required) - * @param ssHKeyInput ssh key to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateSSHKeyAsync(UUID id, SSHKeyInput ssHKeyInput, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateSSHKeyValidateBeforeCall(id, ssHKeyInput, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SupportRequestApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SupportRequestApi.java deleted file mode 100644 index 80c535b47..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/SupportRequestApi.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.SupportRequestInput; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SupportRequestApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SupportRequestApi() { - this(Configuration.getDefaultApiClient()); - } - - public SupportRequestApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for requestSuppert - * @param supportRequestInput Support Request to create (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call requestSuppertCall(SupportRequestInput supportRequestInput, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = supportRequestInput; - - // create path and map variables - String localVarPath = "/support-requests"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call requestSuppertValidateBeforeCall(SupportRequestInput supportRequestInput, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'supportRequestInput' is set - if (supportRequestInput == null) { - throw new ApiException("Missing the required parameter 'supportRequestInput' when calling requestSuppert(Async)"); - } - - return requestSuppertCall(supportRequestInput, _callback); - - } - - /** - * Create a support ticket - * Support Ticket. - * @param supportRequestInput Support Request to create (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public void requestSuppert(SupportRequestInput supportRequestInput) throws ApiException { - requestSuppertWithHttpInfo(supportRequestInput); - } - - /** - * Create a support ticket - * Support Ticket. - * @param supportRequestInput Support Request to create (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse requestSuppertWithHttpInfo(SupportRequestInput supportRequestInput) throws ApiException { - okhttp3.Call localVarCall = requestSuppertValidateBeforeCall(supportRequestInput, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Create a support ticket (asynchronously) - * Support Ticket. - * @param supportRequestInput Support Request to create (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call requestSuppertAsync(SupportRequestInput supportRequestInput, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = requestSuppertValidateBeforeCall(supportRequestInput, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TransferRequestsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TransferRequestsApi.java deleted file mode 100644 index ecd20038d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TransferRequestsApi.java +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.TransferRequest; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class TransferRequestsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public TransferRequestsApi() { - this(Configuration.getDefaultApiClient()); - } - - public TransferRequestsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for acceptTransferRequest - * @param id Transfer request UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call acceptTransferRequestCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/transfers/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call acceptTransferRequestValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling acceptTransferRequest(Async)"); - } - - return acceptTransferRequestCall(id, _callback); - - } - - /** - * Accept a transfer request - * Accept a transfer request. - * @param id Transfer request UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void acceptTransferRequest(UUID id) throws ApiException { - acceptTransferRequestWithHttpInfo(id); - } - - /** - * Accept a transfer request - * Accept a transfer request. - * @param id Transfer request UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse acceptTransferRequestWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = acceptTransferRequestValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Accept a transfer request (asynchronously) - * Accept a transfer request. - * @param id Transfer request UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call acceptTransferRequestAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = acceptTransferRequestValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for declineTransferRequest - * @param id Transfer request UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call declineTransferRequestCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/transfers/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call declineTransferRequestValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling declineTransferRequest(Async)"); - } - - return declineTransferRequestCall(id, _callback); - - } - - /** - * Decline a transfer request - * Decline a transfer request. - * @param id Transfer request UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void declineTransferRequest(UUID id) throws ApiException { - declineTransferRequestWithHttpInfo(id); - } - - /** - * Decline a transfer request - * Decline a transfer request. - * @param id Transfer request UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse declineTransferRequestWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = declineTransferRequestValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Decline a transfer request (asynchronously) - * Decline a transfer request. - * @param id Transfer request UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call declineTransferRequestAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = declineTransferRequestValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findTransferRequestById - * @param id Transfer request UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findTransferRequestByIdCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/transfers/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findTransferRequestByIdValidateBeforeCall(UUID id, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findTransferRequestById(Async)"); - } - - return findTransferRequestByIdCall(id, include, _callback); - - } - - /** - * View a transfer request - * Returns a single transfer request. - * @param id Transfer request UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return TransferRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public TransferRequest findTransferRequestById(UUID id, List include) throws ApiException { - ApiResponse localVarResp = findTransferRequestByIdWithHttpInfo(id, include); - return localVarResp.getData(); - } - - /** - * View a transfer request - * Returns a single transfer request. - * @param id Transfer request UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<TransferRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findTransferRequestByIdWithHttpInfo(UUID id, List include) throws ApiException { - okhttp3.Call localVarCall = findTransferRequestByIdValidateBeforeCall(id, include, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * View a transfer request (asynchronously) - * Returns a single transfer request. - * @param id Transfer request UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findTransferRequestByIdAsync(UUID id, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findTransferRequestByIdValidateBeforeCall(id, include, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApi.java deleted file mode 100644 index 293439b52..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApi.java +++ /dev/null @@ -1,535 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class TwoFactorAuthApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public TwoFactorAuthApi() { - this(Configuration.getDefaultApiClient()); - } - - public TwoFactorAuthApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for disableTfaApp - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call disableTfaAppCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/otp/app"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call disableTfaAppValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return disableTfaAppCall(_callback); - - } - - /** - * Disable two factor authentication - * Disables two factor authentication. - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public void disableTfaApp() throws ApiException { - disableTfaAppWithHttpInfo(); - } - - /** - * Disable two factor authentication - * Disables two factor authentication. - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public ApiResponse disableTfaAppWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = disableTfaAppValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Disable two factor authentication (asynchronously) - * Disables two factor authentication. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call disableTfaAppAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = disableTfaAppValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for disableTfaSms - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call disableTfaSmsCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/otp/sms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call disableTfaSmsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return disableTfaSmsCall(_callback); - - } - - /** - * Disable two factor authentication - * Disables two factor authentication. - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public void disableTfaSms() throws ApiException { - disableTfaSmsWithHttpInfo(); - } - - /** - * Disable two factor authentication - * Disables two factor authentication. - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public ApiResponse disableTfaSmsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = disableTfaSmsValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Disable two factor authentication (asynchronously) - * Disables two factor authentication. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call disableTfaSmsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = disableTfaSmsValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for enableTfaApp - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call enableTfaAppCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/otp/app"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call enableTfaAppValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return enableTfaAppCall(_callback); - - } - - /** - * Enable two factor auth using app - * Enables two factor authentication using authenticator app. - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public void enableTfaApp() throws ApiException { - enableTfaAppWithHttpInfo(); - } - - /** - * Enable two factor auth using app - * Enables two factor authentication using authenticator app. - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse enableTfaAppWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = enableTfaAppValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Enable two factor auth using app (asynchronously) - * Enables two factor authentication using authenticator app. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call enableTfaAppAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = enableTfaAppValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for enableTfaSms - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call enableTfaSmsCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user/otp/sms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call enableTfaSmsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return enableTfaSmsCall(_callback); - - } - - /** - * Enable two factor auth using sms - * Enables two factor authentication with sms. - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public void enableTfaSms() throws ApiException { - enableTfaSmsWithHttpInfo(); - } - - /** - * Enable two factor auth using sms - * Enables two factor authentication with sms. - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse enableTfaSmsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = enableTfaSmsValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Enable two factor auth using sms (asynchronously) - * Enables two factor authentication with sms. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call enableTfaSmsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = enableTfaSmsValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsagesApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsagesApi.java deleted file mode 100644 index 64c96baa7..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsagesApi.java +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.DeviceUsageList; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.ProjectUsageList; -import java.util.UUID; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UsagesApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UsagesApi() { - this(Configuration.getDefaultApiClient()); - } - - public UsagesApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for findDeviceUsages - * @param id Device UUID (required) - * @param createdAfter Filter usages created after this date (optional) - * @param createdBefore Filter usages created before this date (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findDeviceUsagesCall(UUID id, String createdAfter, String createdBefore, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/devices/{id}/usages" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (createdAfter != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("created[after]", createdAfter)); - } - - if (createdBefore != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("created[before]", createdBefore)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findDeviceUsagesValidateBeforeCall(UUID id, String createdAfter, String createdBefore, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findDeviceUsages(Async)"); - } - - return findDeviceUsagesCall(id, createdAfter, createdBefore, _callback); - - } - - /** - * Retrieve all usages for device - * Returns all usages for a device. - * @param id Device UUID (required) - * @param createdAfter Filter usages created after this date (optional) - * @param createdBefore Filter usages created before this date (optional) - * @return DeviceUsageList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public DeviceUsageList findDeviceUsages(UUID id, String createdAfter, String createdBefore) throws ApiException { - ApiResponse localVarResp = findDeviceUsagesWithHttpInfo(id, createdAfter, createdBefore); - return localVarResp.getData(); - } - - /** - * Retrieve all usages for device - * Returns all usages for a device. - * @param id Device UUID (required) - * @param createdAfter Filter usages created after this date (optional) - * @param createdBefore Filter usages created before this date (optional) - * @return ApiResponse<DeviceUsageList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findDeviceUsagesWithHttpInfo(UUID id, String createdAfter, String createdBefore) throws ApiException { - okhttp3.Call localVarCall = findDeviceUsagesValidateBeforeCall(id, createdAfter, createdBefore, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all usages for device (asynchronously) - * Returns all usages for a device. - * @param id Device UUID (required) - * @param createdAfter Filter usages created after this date (optional) - * @param createdBefore Filter usages created before this date (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findDeviceUsagesAsync(UUID id, String createdAfter, String createdBefore, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findDeviceUsagesValidateBeforeCall(id, createdAfter, createdBefore, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findProjectUsage - * @param id Project UUID (required) - * @param createdAfter Filter usages created after this date (optional) - * @param createdBefore Filter usages created before this date (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findProjectUsageCall(UUID id, String createdAfter, String createdBefore, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/usages" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (createdAfter != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("created[after]", createdAfter)); - } - - if (createdBefore != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("created[before]", createdBefore)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findProjectUsageValidateBeforeCall(UUID id, String createdAfter, String createdBefore, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findProjectUsage(Async)"); - } - - return findProjectUsageCall(id, createdAfter, createdBefore, _callback); - - } - - /** - * Retrieve all usages for project - * Returns all usages for a project. - * @param id Project UUID (required) - * @param createdAfter Filter usages created after this date (optional) - * @param createdBefore Filter usages created before this date (optional) - * @return ProjectUsageList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ProjectUsageList findProjectUsage(UUID id, String createdAfter, String createdBefore) throws ApiException { - ApiResponse localVarResp = findProjectUsageWithHttpInfo(id, createdAfter, createdBefore); - return localVarResp.getData(); - } - - /** - * Retrieve all usages for project - * Returns all usages for a project. - * @param id Project UUID (required) - * @param createdAfter Filter usages created after this date (optional) - * @param createdBefore Filter usages created before this date (optional) - * @return ApiResponse<ProjectUsageList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public ApiResponse findProjectUsageWithHttpInfo(UUID id, String createdAfter, String createdBefore) throws ApiException { - okhttp3.Call localVarCall = findProjectUsageValidateBeforeCall(id, createdAfter, createdBefore, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all usages for project (asynchronously) - * Returns all usages for a project. - * @param id Project UUID (required) - * @param createdAfter Filter usages created after this date (optional) - * @param createdBefore Filter usages created before this date (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
404 not found -
- */ - public okhttp3.Call findProjectUsageAsync(UUID id, String createdAfter, String createdBefore, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findProjectUsageValidateBeforeCall(id, createdAfter, createdBefore, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApi.java deleted file mode 100644 index 071a9d395..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApi.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.VerifyEmail; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UserVerificationTokensApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UserVerificationTokensApi() { - this(Configuration.getDefaultApiClient()); - } - - public UserVerificationTokensApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for consumeVerificationRequest - * @param verifyEmail Email to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call consumeVerificationRequestCall(VerifyEmail verifyEmail, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = verifyEmail; - - // create path and map variables - String localVarPath = "/verify-email"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call consumeVerificationRequestValidateBeforeCall(VerifyEmail verifyEmail, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'verifyEmail' is set - if (verifyEmail == null) { - throw new ApiException("Missing the required parameter 'verifyEmail' when calling consumeVerificationRequest(Async)"); - } - - return consumeVerificationRequestCall(verifyEmail, include, _callback); - - } - - /** - * Verify a user using an email verification token - * Consumes an email verification token and verifies the user associated with it. - * @param verifyEmail Email to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public void consumeVerificationRequest(VerifyEmail verifyEmail, List include) throws ApiException { - consumeVerificationRequestWithHttpInfo(verifyEmail, include); - } - - /** - * Verify a user using an email verification token - * Consumes an email verification token and verifies the user associated with it. - * @param verifyEmail Email to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse consumeVerificationRequestWithHttpInfo(VerifyEmail verifyEmail, List include) throws ApiException { - okhttp3.Call localVarCall = consumeVerificationRequestValidateBeforeCall(verifyEmail, include, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Verify a user using an email verification token (asynchronously) - * Consumes an email verification token and verifies the user associated with it. - * @param verifyEmail Email to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call consumeVerificationRequestAsync(VerifyEmail verifyEmail, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = consumeVerificationRequestValidateBeforeCall(verifyEmail, include, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for createValidationRequest - * @param login Email for verification request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createValidationRequestCall(String login, List include, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/verify-email"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (login != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("login", login)); - } - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createValidationRequestValidateBeforeCall(String login, List include, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'login' is set - if (login == null) { - throw new ApiException("Missing the required parameter 'login' when calling createValidationRequest(Async)"); - } - - return createValidationRequestCall(login, include, _callback); - - } - - /** - * Create an email verification request - * Creates an email verification request - * @param login Email for verification request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public void createValidationRequest(String login, List include) throws ApiException { - createValidationRequestWithHttpInfo(login, include); - } - - /** - * Create an email verification request - * Creates an email verification request - * @param login Email for verification request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createValidationRequestWithHttpInfo(String login, List include) throws ApiException { - okhttp3.Call localVarCall = createValidationRequestValidateBeforeCall(login, include, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Create an email verification request (asynchronously) - * Creates an email verification request - * @param login Email for verification request (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createValidationRequestAsync(String login, List include, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createValidationRequestValidateBeforeCall(login, include, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserdataApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserdataApi.java deleted file mode 100644 index e94c5999c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UserdataApi.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UserdataApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UserdataApi() { - this(Configuration.getDefaultApiClient()); - } - - public UserdataApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for validateUserdata - * @param userdata Userdata to validate (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call validateUserdataCall(String userdata, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/userdata/validate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (userdata != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userdata", userdata)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call validateUserdataValidateBeforeCall(String userdata, final ApiCallback _callback) throws ApiException { - return validateUserdataCall(userdata, _callback); - - } - - /** - * Validate user data - * Validates user data (Userdata) - * @param userdata Userdata to validate (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
422 unprocessable entity -
- */ - public void validateUserdata(String userdata) throws ApiException { - validateUserdataWithHttpInfo(userdata); - } - - /** - * Validate user data - * Validates user data (Userdata) - * @param userdata Userdata to validate (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse validateUserdataWithHttpInfo(String userdata) throws ApiException { - okhttp3.Call localVarCall = validateUserdataValidateBeforeCall(userdata, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Validate user data (asynchronously) - * Validates user data (Userdata) - * @param userdata Userdata to validate (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call validateUserdataAsync(String userdata, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = validateUserdataValidateBeforeCall(userdata, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsersApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsersApi.java deleted file mode 100644 index ea6deda3d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/UsersApi.java +++ /dev/null @@ -1,1088 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.InvitationList; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.User; -import com.equinix.openapi.metal.v1.model.UserCreateInput; -import com.equinix.openapi.metal.v1.model.UserList; -import com.equinix.openapi.metal.v1.model.UserUpdateInput; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class UsersApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UsersApi() { - this(Configuration.getDefaultApiClient()); - } - - public UsersApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createUser - * @param userCreateInput User to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createUserCall(UserCreateInput userCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = userCreateInput; - - // create path and map variables - String localVarPath = "/users"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createUserValidateBeforeCall(UserCreateInput userCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userCreateInput' is set - if (userCreateInput == null) { - throw new ApiException("Missing the required parameter 'userCreateInput' when calling createUser(Async)"); - } - - return createUserCall(userCreateInput, include, exclude, _callback); - - } - - /** - * Create a user - * Creates a user. - * @param userCreateInput User to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public User createUser(UserCreateInput userCreateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createUserWithHttpInfo(userCreateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a user - * Creates a user. - * @param userCreateInput User to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse createUserWithHttpInfo(UserCreateInput userCreateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createUserValidateBeforeCall(userCreateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a user (asynchronously) - * Creates a user. - * @param userCreateInput User to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call createUserAsync(UserCreateInput userCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createUserValidateBeforeCall(userCreateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findCurrentUser - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findCurrentUserCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/user"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findCurrentUserValidateBeforeCall(List include, List exclude, final ApiCallback _callback) throws ApiException { - return findCurrentUserCall(include, exclude, _callback); - - } - - /** - * Retrieve the current user - * Returns the user object for the currently logged-in user. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public User findCurrentUser(List include, List exclude) throws ApiException { - ApiResponse localVarResp = findCurrentUserWithHttpInfo(include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve the current user - * Returns the user object for the currently logged-in user. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findCurrentUserWithHttpInfo(List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findCurrentUserValidateBeforeCall(include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve the current user (asynchronously) - * Returns the user object for the currently logged-in user. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findCurrentUserAsync(List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findCurrentUserValidateBeforeCall(include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findInvitations - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInvitationsCall(List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/invitations"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findInvitationsValidateBeforeCall(List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - return findInvitationsCall(include, page, perPage, _callback); - - } - - /** - * Retrieve current user invitations - * Returns all invitations in current user. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return InvitationList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public InvitationList findInvitations(List include, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findInvitationsWithHttpInfo(include, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve current user invitations - * Returns all invitations in current user. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<InvitationList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findInvitationsWithHttpInfo(List include, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findInvitationsValidateBeforeCall(include, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve current user invitations (asynchronously) - * Returns all invitations in current user. - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findInvitationsAsync(List include, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findInvitationsValidateBeforeCall(include, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findUserById - * @param id User UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findUserByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/users/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findUserByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findUserById(Async)"); - } - - return findUserByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve a user - * Returns a single user if the user has access - * @param id User UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public User findUserById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findUserByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve a user - * Returns a single user if the user has access - * @param id User UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findUserByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findUserByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a user (asynchronously) - * Returns a single user if the user has access - * @param id User UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findUserByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findUserByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findUserCustomdata - * @param id User UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findUserCustomdataCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/users/{id}/customdata" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findUserCustomdataValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findUserCustomdata(Async)"); - } - - return findUserCustomdataCall(id, _callback); - - } - - /** - * Retrieve the custom metadata of a user - * Provides the custom metadata stored for this user in json format - * @param id User UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void findUserCustomdata(UUID id) throws ApiException { - findUserCustomdataWithHttpInfo(id); - } - - /** - * Retrieve the custom metadata of a user - * Provides the custom metadata stored for this user in json format - * @param id User UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findUserCustomdataWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = findUserCustomdataValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve the custom metadata of a user (asynchronously) - * Provides the custom metadata stored for this user in json format - * @param id User UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findUserCustomdataAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findUserCustomdataValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findUsers - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findUsersCall(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/users"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (perPage != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("per_page", perPage)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findUsersValidateBeforeCall(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - return findUsersCall(include, exclude, page, perPage, _callback); - - } - - /** - * Retrieve all users - * Returns a list of users that the are accessible to the current user (all users in the current user’s projects, essentially). - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return UserList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public UserList findUsers(List include, List exclude, Integer page, Integer perPage) throws ApiException { - ApiResponse localVarResp = findUsersWithHttpInfo(include, exclude, page, perPage); - return localVarResp.getData(); - } - - /** - * Retrieve all users - * Returns a list of users that the are accessible to the current user (all users in the current user’s projects, essentially). - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @return ApiResponse<UserList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public ApiResponse findUsersWithHttpInfo(List include, List exclude, Integer page, Integer perPage) throws ApiException { - okhttp3.Call localVarCall = findUsersValidateBeforeCall(include, exclude, page, perPage, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all users (asynchronously) - * Returns a list of users that the are accessible to the current user (all users in the current user’s projects, essentially). - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param page Page to return (optional, default to 1) - * @param perPage Items returned per page (optional, default to 10) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
- */ - public okhttp3.Call findUsersAsync(List include, List exclude, Integer page, Integer perPage, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findUsersValidateBeforeCall(include, exclude, page, perPage, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateCurrentUser - * @param userUpdateInput User to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call updateCurrentUserCall(UserUpdateInput userUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = userUpdateInput; - - // create path and map variables - String localVarPath = "/user"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateCurrentUserValidateBeforeCall(UserUpdateInput userUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userUpdateInput' is set - if (userUpdateInput == null) { - throw new ApiException("Missing the required parameter 'userUpdateInput' when calling updateCurrentUser(Async)"); - } - - return updateCurrentUserCall(userUpdateInput, include, exclude, _callback); - - } - - /** - * Update the current user - * Updates the currently logged-in user. - * @param userUpdateInput User to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return User - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public User updateCurrentUser(UserUpdateInput userUpdateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateCurrentUserWithHttpInfo(userUpdateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update the current user - * Updates the currently logged-in user. - * @param userUpdateInput User to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<User> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public ApiResponse updateCurrentUserWithHttpInfo(UserUpdateInput userUpdateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateCurrentUserValidateBeforeCall(userUpdateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the current user (asynchronously) - * Updates the currently logged-in user. - * @param userUpdateInput User to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
422 unprocessable entity -
- */ - public okhttp3.Call updateCurrentUserAsync(UserUpdateInput userUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateCurrentUserValidateBeforeCall(userUpdateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VlansApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VlansApi.java deleted file mode 100644 index c0640ca43..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VlansApi.java +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.VirtualNetworkCreateInput; -import com.equinix.openapi.metal.v1.model.VirtualNetworkList; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VlansApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VlansApi() { - this(Configuration.getDefaultApiClient()); - } - - public VlansApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createVirtualNetwork - * @param id Project UUID (required) - * @param virtualNetworkCreateInput Virtual Network to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createVirtualNetworkCall(UUID id, VirtualNetworkCreateInput virtualNetworkCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = virtualNetworkCreateInput; - - // create path and map variables - String localVarPath = "/projects/{id}/virtual-networks" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVirtualNetworkValidateBeforeCall(UUID id, VirtualNetworkCreateInput virtualNetworkCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createVirtualNetwork(Async)"); - } - - // verify the required parameter 'virtualNetworkCreateInput' is set - if (virtualNetworkCreateInput == null) { - throw new ApiException("Missing the required parameter 'virtualNetworkCreateInput' when calling createVirtualNetwork(Async)"); - } - - return createVirtualNetworkCall(id, virtualNetworkCreateInput, include, exclude, _callback); - - } - - /** - * Create a virtual network - * Creates an virtual network. - * @param id Project UUID (required) - * @param virtualNetworkCreateInput Virtual Network to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VirtualNetwork - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public VirtualNetwork createVirtualNetwork(UUID id, VirtualNetworkCreateInput virtualNetworkCreateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createVirtualNetworkWithHttpInfo(id, virtualNetworkCreateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a virtual network - * Creates an virtual network. - * @param id Project UUID (required) - * @param virtualNetworkCreateInput Virtual Network to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VirtualNetwork> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createVirtualNetworkWithHttpInfo(UUID id, VirtualNetworkCreateInput virtualNetworkCreateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createVirtualNetworkValidateBeforeCall(id, virtualNetworkCreateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a virtual network (asynchronously) - * Creates an virtual network. - * @param id Project UUID (required) - * @param virtualNetworkCreateInput Virtual Network to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 created -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createVirtualNetworkAsync(UUID id, VirtualNetworkCreateInput virtualNetworkCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createVirtualNetworkValidateBeforeCall(id, virtualNetworkCreateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVirtualNetwork - * @param id Virtual Network UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call deleteVirtualNetworkCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/virtual-networks/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVirtualNetworkValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteVirtualNetwork(Async)"); - } - - return deleteVirtualNetworkCall(id, include, exclude, _callback); - - } - - /** - * Delete a virtual network - * Deletes a virtual network. - * @param id Virtual Network UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VirtualNetwork - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public VirtualNetwork deleteVirtualNetwork(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = deleteVirtualNetworkWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Delete a virtual network - * Deletes a virtual network. - * @param id Virtual Network UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VirtualNetwork> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse deleteVirtualNetworkWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = deleteVirtualNetworkValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Delete a virtual network (asynchronously) - * Deletes a virtual network. - * @param id Virtual Network UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call deleteVirtualNetworkAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteVirtualNetworkValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findVirtualNetworks - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param facility Filter by Facility ID (uuid) or Facility Code (optional) - * @param metro Filter by Metro ID (uuid) or Metro Code (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVirtualNetworksCall(UUID id, List include, List exclude, String facility, String metro, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/virtual-networks" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (facility != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("facility", facility)); - } - - if (metro != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("metro", metro)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findVirtualNetworksValidateBeforeCall(UUID id, List include, List exclude, String facility, String metro, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findVirtualNetworks(Async)"); - } - - return findVirtualNetworksCall(id, include, exclude, facility, metro, _callback); - - } - - /** - * Retrieve all virtual networks - * Provides a list of virtual networks for a single project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param facility Filter by Facility ID (uuid) or Facility Code (optional) - * @param metro Filter by Metro ID (uuid) or Metro Code (optional) - * @return VirtualNetworkList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public VirtualNetworkList findVirtualNetworks(UUID id, List include, List exclude, String facility, String metro) throws ApiException { - ApiResponse localVarResp = findVirtualNetworksWithHttpInfo(id, include, exclude, facility, metro); - return localVarResp.getData(); - } - - /** - * Retrieve all virtual networks - * Provides a list of virtual networks for a single project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param facility Filter by Facility ID (uuid) or Facility Code (optional) - * @param metro Filter by Metro ID (uuid) or Metro Code (optional) - * @return ApiResponse<VirtualNetworkList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findVirtualNetworksWithHttpInfo(UUID id, List include, List exclude, String facility, String metro) throws ApiException { - okhttp3.Call localVarCall = findVirtualNetworksValidateBeforeCall(id, include, exclude, facility, metro, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all virtual networks (asynchronously) - * Provides a list of virtual networks for a single project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param facility Filter by Facility ID (uuid) or Facility Code (optional) - * @param metro Filter by Metro ID (uuid) or Metro Code (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVirtualNetworksAsync(UUID id, List include, List exclude, String facility, String metro, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findVirtualNetworksValidateBeforeCall(id, include, exclude, facility, metro, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getVirtualNetwork - * @param id Virtual Network UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call getVirtualNetworkCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/virtual-networks/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getVirtualNetworkValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getVirtualNetwork(Async)"); - } - - return getVirtualNetworkCall(id, include, exclude, _callback); - - } - - /** - * Get a virtual network - * Get a virtual network. - * @param id Virtual Network UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VirtualNetwork - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public VirtualNetwork getVirtualNetwork(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = getVirtualNetworkWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Get a virtual network - * Get a virtual network. - * @param id Virtual Network UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VirtualNetwork> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse getVirtualNetworkWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = getVirtualNetworkValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a virtual network (asynchronously) - * Get a virtual network. - * @param id Virtual Network UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call getVirtualNetworkAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getVirtualNetworkValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VrfsApi.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VrfsApi.java deleted file mode 100644 index d20aae8c3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/api/VrfsApi.java +++ /dev/null @@ -1,2545 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiCallback; -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.ApiResponse; -import com.equinix.openapi.Configuration; -import com.equinix.openapi.Pair; -import com.equinix.openapi.ProgressRequestBody; -import com.equinix.openapi.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.equinix.openapi.metal.v1.model.BgpDynamicNeighbor; -import com.equinix.openapi.metal.v1.model.BgpDynamicNeighborCreateInput; -import com.equinix.openapi.metal.v1.model.BgpDynamicNeighborList; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfCreateInput; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.equinix.openapi.metal.v1.model.VrfIpReservationList; -import com.equinix.openapi.metal.v1.model.VrfList; -import com.equinix.openapi.metal.v1.model.VrfRoute; -import com.equinix.openapi.metal.v1.model.VrfRouteCreateInput; -import com.equinix.openapi.metal.v1.model.VrfRouteList; -import com.equinix.openapi.metal.v1.model.VrfRouteUpdateInput; -import com.equinix.openapi.metal.v1.model.VrfUpdateInput; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class VrfsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public VrfsApi() { - this(Configuration.getDefaultApiClient()); - } - - public VrfsApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for bgpDynamicNeighborsIdGet - * @param id BGP Dynamic Neighbor UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call bgpDynamicNeighborsIdGetCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/bgp-dynamic-neighbors/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call bgpDynamicNeighborsIdGetValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling bgpDynamicNeighborsIdGet(Async)"); - } - - return bgpDynamicNeighborsIdGetCall(id, include, exclude, _callback); - - } - - /** - * Retrieve a BGP Dynamic Neighbor - * Return a single BGP Dynamic Neighbor resource - * @param id BGP Dynamic Neighbor UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return BgpDynamicNeighbor - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public BgpDynamicNeighbor bgpDynamicNeighborsIdGet(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = bgpDynamicNeighborsIdGetWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve a BGP Dynamic Neighbor - * Return a single BGP Dynamic Neighbor resource - * @param id BGP Dynamic Neighbor UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<BgpDynamicNeighbor> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public ApiResponse bgpDynamicNeighborsIdGetWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = bgpDynamicNeighborsIdGetValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a BGP Dynamic Neighbor (asynchronously) - * Return a single BGP Dynamic Neighbor resource - * @param id BGP Dynamic Neighbor UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call bgpDynamicNeighborsIdGetAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = bgpDynamicNeighborsIdGetValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createBgpDynamicNeighbor - * @param id Metal Gateway UUID (required) - * @param bgpDynamicNeighborCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public okhttp3.Call createBgpDynamicNeighborCall(UUID id, BgpDynamicNeighborCreateInput bgpDynamicNeighborCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = bgpDynamicNeighborCreateInput; - - // create path and map variables - String localVarPath = "/metal-gateways/{id}/bgp-dynamic-neighbors" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createBgpDynamicNeighborValidateBeforeCall(UUID id, BgpDynamicNeighborCreateInput bgpDynamicNeighborCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createBgpDynamicNeighbor(Async)"); - } - - // verify the required parameter 'bgpDynamicNeighborCreateInput' is set - if (bgpDynamicNeighborCreateInput == null) { - throw new ApiException("Missing the required parameter 'bgpDynamicNeighborCreateInput' when calling createBgpDynamicNeighbor(Async)"); - } - - return createBgpDynamicNeighborCall(id, bgpDynamicNeighborCreateInput, include, exclude, _callback); - - } - - /** - * Create a VRF BGP Dynamic Neighbor range - * Create a VRF BGP Dynamic Neighbor range. BGP Dynamic Neighbor records are limited to 2 per Virtual Network. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id Metal Gateway UUID (required) - * @param bgpDynamicNeighborCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return BgpDynamicNeighbor - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public BgpDynamicNeighbor createBgpDynamicNeighbor(UUID id, BgpDynamicNeighborCreateInput bgpDynamicNeighborCreateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createBgpDynamicNeighborWithHttpInfo(id, bgpDynamicNeighborCreateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a VRF BGP Dynamic Neighbor range - * Create a VRF BGP Dynamic Neighbor range. BGP Dynamic Neighbor records are limited to 2 per Virtual Network. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id Metal Gateway UUID (required) - * @param bgpDynamicNeighborCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<BgpDynamicNeighbor> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public ApiResponse createBgpDynamicNeighborWithHttpInfo(UUID id, BgpDynamicNeighborCreateInput bgpDynamicNeighborCreateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createBgpDynamicNeighborValidateBeforeCall(id, bgpDynamicNeighborCreateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a VRF BGP Dynamic Neighbor range (asynchronously) - * Create a VRF BGP Dynamic Neighbor range. BGP Dynamic Neighbor records are limited to 2 per Virtual Network. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id Metal Gateway UUID (required) - * @param bgpDynamicNeighborCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public okhttp3.Call createBgpDynamicNeighborAsync(UUID id, BgpDynamicNeighborCreateInput bgpDynamicNeighborCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createBgpDynamicNeighborValidateBeforeCall(id, bgpDynamicNeighborCreateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createVrf - * @param id Project UUID (required) - * @param vrfCreateInput VRF to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createVrfCall(UUID id, VrfCreateInput vrfCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = vrfCreateInput; - - // create path and map variables - String localVarPath = "/projects/{id}/vrfs" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVrfValidateBeforeCall(UUID id, VrfCreateInput vrfCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createVrf(Async)"); - } - - // verify the required parameter 'vrfCreateInput' is set - if (vrfCreateInput == null) { - throw new ApiException("Missing the required parameter 'vrfCreateInput' when calling createVrf(Async)"); - } - - return createVrfCall(id, vrfCreateInput, include, exclude, _callback); - - } - - /** - * Create a new VRF in the specified project - * Creates a new VRF in the specified project - * @param id Project UUID (required) - * @param vrfCreateInput VRF to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Vrf - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Vrf createVrf(UUID id, VrfCreateInput vrfCreateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createVrfWithHttpInfo(id, vrfCreateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a new VRF in the specified project - * Creates a new VRF in the specified project - * @param id Project UUID (required) - * @param vrfCreateInput VRF to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Vrf> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse createVrfWithHttpInfo(UUID id, VrfCreateInput vrfCreateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createVrfValidateBeforeCall(id, vrfCreateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a new VRF in the specified project (asynchronously) - * Creates a new VRF in the specified project - * @param id Project UUID (required) - * @param vrfCreateInput VRF to create (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 created -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call createVrfAsync(UUID id, VrfCreateInput vrfCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createVrfValidateBeforeCall(id, vrfCreateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createVrfRoute - * @param id VRF UUID (required) - * @param vrfRouteCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public okhttp3.Call createVrfRouteCall(UUID id, VrfRouteCreateInput vrfRouteCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = vrfRouteCreateInput; - - // create path and map variables - String localVarPath = "/vrfs/{id}/routes" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createVrfRouteValidateBeforeCall(UUID id, VrfRouteCreateInput vrfRouteCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling createVrfRoute(Async)"); - } - - // verify the required parameter 'vrfRouteCreateInput' is set - if (vrfRouteCreateInput == null) { - throw new ApiException("Missing the required parameter 'vrfRouteCreateInput' when calling createVrfRoute(Async)"); - } - - return createVrfRouteCall(id, vrfRouteCreateInput, include, exclude, _callback); - - } - - /** - * Create a VRF route - * Create a route in a VRF. Currently only static default routes are supported. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id VRF UUID (required) - * @param vrfRouteCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VrfRoute - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public VrfRoute createVrfRoute(UUID id, VrfRouteCreateInput vrfRouteCreateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = createVrfRouteWithHttpInfo(id, vrfRouteCreateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Create a VRF route - * Create a route in a VRF. Currently only static default routes are supported. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id VRF UUID (required) - * @param vrfRouteCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VrfRoute> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public ApiResponse createVrfRouteWithHttpInfo(UUID id, VrfRouteCreateInput vrfRouteCreateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = createVrfRouteValidateBeforeCall(id, vrfRouteCreateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a VRF route (asynchronously) - * Create a route in a VRF. Currently only static default routes are supported. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * @param id VRF UUID (required) - * @param vrfRouteCreateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable entity -
- */ - public okhttp3.Call createVrfRouteAsync(UUID id, VrfRouteCreateInput vrfRouteCreateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createVrfRouteValidateBeforeCall(id, vrfRouteCreateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteBgpDynamicNeighborById - * @param id BGP Dynamic Neighbor UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
- */ - public okhttp3.Call deleteBgpDynamicNeighborByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/bgp-dynamic-neighbors/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteBgpDynamicNeighborByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteBgpDynamicNeighborById(Async)"); - } - - return deleteBgpDynamicNeighborByIdCall(id, include, exclude, _callback); - - } - - /** - * Delete a VRF BGP Dynamic Neighbor - * Trigger the removal of a BGP Neighbor range from a VRF - * @param id BGP Dynamic Neighbor UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return BgpDynamicNeighbor - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
- */ - public BgpDynamicNeighbor deleteBgpDynamicNeighborById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = deleteBgpDynamicNeighborByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Delete a VRF BGP Dynamic Neighbor - * Trigger the removal of a BGP Neighbor range from a VRF - * @param id BGP Dynamic Neighbor UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<BgpDynamicNeighbor> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
- */ - public ApiResponse deleteBgpDynamicNeighborByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = deleteBgpDynamicNeighborByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Delete a VRF BGP Dynamic Neighbor (asynchronously) - * Trigger the removal of a BGP Neighbor range from a VRF - * @param id BGP Dynamic Neighbor UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
- */ - public okhttp3.Call deleteBgpDynamicNeighborByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteBgpDynamicNeighborByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteVrf - * @param id VRF UUID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteVrfCall(UUID id, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/vrfs/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVrfValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteVrf(Async)"); - } - - return deleteVrfCall(id, _callback); - - } - - /** - * Delete the VRF - * Deletes the VRF - * @param id VRF UUID (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public void deleteVrf(UUID id) throws ApiException { - deleteVrfWithHttpInfo(id); - } - - /** - * Delete the VRF - * Deletes the VRF - * @param id VRF UUID (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse deleteVrfWithHttpInfo(UUID id) throws ApiException { - okhttp3.Call localVarCall = deleteVrfValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete the VRF (asynchronously) - * Deletes the VRF - * @param id VRF UUID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 no content -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call deleteVrfAsync(UUID id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteVrfValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteVrfRouteById - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
- */ - public okhttp3.Call deleteVrfRouteByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/routes/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVrfRouteByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteVrfRouteById(Async)"); - } - - return deleteVrfRouteByIdCall(id, include, exclude, _callback); - - } - - /** - * Delete a VRF Route - * Trigger the deletion of a VRF Route resource. The status of the route will update to 'deleting', and the route resource will remain accessible while background operations remove the route from the network. Once the route has been removed from the network, the resource will be fully deleted. - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VrfRoute - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
- */ - public VrfRoute deleteVrfRouteById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = deleteVrfRouteByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Delete a VRF Route - * Trigger the deletion of a VRF Route resource. The status of the route will update to 'deleting', and the route resource will remain accessible while background operations remove the route from the network. Once the route has been removed from the network, the resource will be fully deleted. - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VrfRoute> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
- */ - public ApiResponse deleteVrfRouteByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = deleteVrfRouteByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Delete a VRF Route (asynchronously) - * Trigger the deletion of a VRF Route resource. The status of the route will update to 'deleting', and the route resource will remain accessible while background operations remove the route from the network. Once the route has been removed from the network, the resource will be fully deleted. - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
- */ - public okhttp3.Call deleteVrfRouteByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteVrfRouteByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findVrfById - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/vrfs/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findVrfByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findVrfById(Async)"); - } - - return findVrfByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve a VRF - * Returns a single VRF resource - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Vrf - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public Vrf findVrfById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findVrfByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve a VRF - * Returns a single VRF resource - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Vrf> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public ApiResponse findVrfByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findVrfByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a VRF (asynchronously) - * Returns a single VRF resource - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findVrfByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findVrfIpReservation - * @param vrfId VRF UUID (required) - * @param id IP UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfIpReservationCall(UUID vrfId, UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/vrfs/{vrf_id}/ips/{id}" - .replace("{" + "vrf_id" + "}", localVarApiClient.escapeString(vrfId.toString())) - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findVrfIpReservationValidateBeforeCall(UUID vrfId, UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'vrfId' is set - if (vrfId == null) { - throw new ApiException("Missing the required parameter 'vrfId' when calling findVrfIpReservation(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findVrfIpReservation(Async)"); - } - - return findVrfIpReservationCall(vrfId, id, include, exclude, _callback); - - } - - /** - * Retrieve all VRF IP Reservations in the VRF - * Returns the IP Reservation for the VRF. - * @param vrfId VRF UUID (required) - * @param id IP UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VrfIpReservation - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public VrfIpReservation findVrfIpReservation(UUID vrfId, UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findVrfIpReservationWithHttpInfo(vrfId, id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all VRF IP Reservations in the VRF - * Returns the IP Reservation for the VRF. - * @param vrfId VRF UUID (required) - * @param id IP UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VrfIpReservation> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse findVrfIpReservationWithHttpInfo(UUID vrfId, UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findVrfIpReservationValidateBeforeCall(vrfId, id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all VRF IP Reservations in the VRF (asynchronously) - * Returns the IP Reservation for the VRF. - * @param vrfId VRF UUID (required) - * @param id IP UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfIpReservationAsync(UUID vrfId, UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findVrfIpReservationValidateBeforeCall(vrfId, id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findVrfIpReservations - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfIpReservationsCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/vrfs/{id}/ips" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findVrfIpReservationsValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findVrfIpReservations(Async)"); - } - - return findVrfIpReservationsCall(id, include, exclude, _callback); - - } - - /** - * Retrieve all VRF IP Reservations in the VRF - * Returns the list of VRF IP Reservations for the VRF. - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VrfIpReservationList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public VrfIpReservationList findVrfIpReservations(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findVrfIpReservationsWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all VRF IP Reservations in the VRF - * Returns the list of VRF IP Reservations for the VRF. - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VrfIpReservationList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse findVrfIpReservationsWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findVrfIpReservationsValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all VRF IP Reservations in the VRF (asynchronously) - * Returns the list of VRF IP Reservations for the VRF. - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfIpReservationsAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findVrfIpReservationsValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findVrfRouteById - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call findVrfRouteByIdCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/routes/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findVrfRouteByIdValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findVrfRouteById(Async)"); - } - - return findVrfRouteByIdCall(id, include, exclude, _callback); - - } - - /** - * Retrieve a VRF Route - * Returns a single VRF Route resource - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VrfRoute - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public VrfRoute findVrfRouteById(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = findVrfRouteByIdWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve a VRF Route - * Returns a single VRF Route resource - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VrfRoute> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public ApiResponse findVrfRouteByIdWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = findVrfRouteByIdValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a VRF Route (asynchronously) - * Returns a single VRF Route resource - * @param id VRF Route UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call findVrfRouteByIdAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findVrfRouteByIdValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findVrfs - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param metro Filter by Metro ID (uuid) or Metro Code (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfsCall(UUID id, List include, List exclude, String metro, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/vrfs" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - if (metro != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("metro", metro)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findVrfsValidateBeforeCall(UUID id, List include, List exclude, String metro, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling findVrfs(Async)"); - } - - return findVrfsCall(id, include, exclude, metro, _callback); - - } - - /** - * Retrieve all VRFs in the project - * Returns the list of VRFs for a single project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param metro Filter by Metro ID (uuid) or Metro Code (optional) - * @return VrfList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public VrfList findVrfs(UUID id, List include, List exclude, String metro) throws ApiException { - ApiResponse localVarResp = findVrfsWithHttpInfo(id, include, exclude, metro); - return localVarResp.getData(); - } - - /** - * Retrieve all VRFs in the project - * Returns the list of VRFs for a single project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param metro Filter by Metro ID (uuid) or Metro Code (optional) - * @return ApiResponse<VrfList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public ApiResponse findVrfsWithHttpInfo(UUID id, List include, List exclude, String metro) throws ApiException { - okhttp3.Call localVarCall = findVrfsValidateBeforeCall(id, include, exclude, metro, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all VRFs in the project (asynchronously) - * Returns the list of VRFs for a single project. - * @param id Project UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param metro Filter by Metro ID (uuid) or Metro Code (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 ok -
403 forbidden -
404 not found -
- */ - public okhttp3.Call findVrfsAsync(UUID id, List include, List exclude, String metro, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findVrfsValidateBeforeCall(id, include, exclude, metro, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getBgpDynamicNeighbors - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call getBgpDynamicNeighborsCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/metal-gateways/{id}/bgp-dynamic-neighbors" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getBgpDynamicNeighborsValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getBgpDynamicNeighbors(Async)"); - } - - return getBgpDynamicNeighborsCall(id, include, exclude, _callback); - - } - - /** - * List BGP Dynamic Neighbors - * Returns the list of VRF BGP Dynamic Neighbors for this Metal Gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return BgpDynamicNeighborList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public BgpDynamicNeighborList getBgpDynamicNeighbors(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = getBgpDynamicNeighborsWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * List BGP Dynamic Neighbors - * Returns the list of VRF BGP Dynamic Neighbors for this Metal Gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<BgpDynamicNeighborList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public ApiResponse getBgpDynamicNeighborsWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = getBgpDynamicNeighborsValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List BGP Dynamic Neighbors (asynchronously) - * Returns the list of VRF BGP Dynamic Neighbors for this Metal Gateway - * @param id Metal Gateway UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call getBgpDynamicNeighborsAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getBgpDynamicNeighborsValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getVrfRoutes - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call getVrfRoutesCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/vrfs/{id}/routes" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getVrfRoutesValidateBeforeCall(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getVrfRoutes(Async)"); - } - - return getVrfRoutesCall(id, include, exclude, _callback); - - } - - /** - * Retrieve all routes in the VRF - * Returns the list of routes for the VRF - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VrfRouteList - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public VrfRouteList getVrfRoutes(UUID id, List include, List exclude) throws ApiException { - ApiResponse localVarResp = getVrfRoutesWithHttpInfo(id, include, exclude); - return localVarResp.getData(); - } - - /** - * Retrieve all routes in the VRF - * Returns the list of routes for the VRF - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VrfRouteList> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public ApiResponse getVrfRoutesWithHttpInfo(UUID id, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = getVrfRoutesValidateBeforeCall(id, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve all routes in the VRF (asynchronously) - * Returns the list of routes for the VRF - * @param id VRF UUID (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call getVrfRoutesAsync(UUID id, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getVrfRoutesValidateBeforeCall(id, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateVrf - * @param id VRF UUID (required) - * @param vrfUpdateInput VRF to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateVrfCall(UUID id, VrfUpdateInput vrfUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = vrfUpdateInput; - - // create path and map variables - String localVarPath = "/vrfs/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateVrfValidateBeforeCall(UUID id, VrfUpdateInput vrfUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateVrf(Async)"); - } - - // verify the required parameter 'vrfUpdateInput' is set - if (vrfUpdateInput == null) { - throw new ApiException("Missing the required parameter 'vrfUpdateInput' when calling updateVrf(Async)"); - } - - return updateVrfCall(id, vrfUpdateInput, include, exclude, _callback); - - } - - /** - * Update the VRF - * Updates the VRF. - * @param id VRF UUID (required) - * @param vrfUpdateInput VRF to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return Vrf - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public Vrf updateVrf(UUID id, VrfUpdateInput vrfUpdateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateVrfWithHttpInfo(id, vrfUpdateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update the VRF - * Updates the VRF. - * @param id VRF UUID (required) - * @param vrfUpdateInput VRF to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<Vrf> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public ApiResponse updateVrfWithHttpInfo(UUID id, VrfUpdateInput vrfUpdateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateVrfValidateBeforeCall(id, vrfUpdateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update the VRF (asynchronously) - * Updates the VRF. - * @param id VRF UUID (required) - * @param vrfUpdateInput VRF to update (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 ok -
401 unauthorized -
403 forbidden -
404 not found -
422 unprocessable entity -
- */ - public okhttp3.Call updateVrfAsync(UUID id, VrfUpdateInput vrfUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateVrfValidateBeforeCall(id, vrfUpdateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateVrfRouteById - * @param id VRF Route UUID (required) - * @param vrfRouteUpdateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too Many Requests -
- */ - public okhttp3.Call updateVrfRouteByIdCall(UUID id, VrfRouteUpdateInput vrfRouteUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = vrfRouteUpdateInput; - - // create path and map variables - String localVarPath = "/routes/{id}" - .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (include != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "include", include)); - } - - if (exclude != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "exclude", exclude)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "x_auth_token" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateVrfRouteByIdValidateBeforeCall(UUID id, VrfRouteUpdateInput vrfRouteUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateVrfRouteById(Async)"); - } - - // verify the required parameter 'vrfRouteUpdateInput' is set - if (vrfRouteUpdateInput == null) { - throw new ApiException("Missing the required parameter 'vrfRouteUpdateInput' when calling updateVrfRouteById(Async)"); - } - - return updateVrfRouteByIdCall(id, vrfRouteUpdateInput, include, exclude, _callback); - - } - - /** - * Update a VRF Route - * Requests a VRF Route be redeployed across the network. Updating the prefix or next-hop address on a route is not currently supported. - * @param id VRF Route UUID (required) - * @param vrfRouteUpdateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return VrfRoute - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too Many Requests -
- */ - public VrfRoute updateVrfRouteById(UUID id, VrfRouteUpdateInput vrfRouteUpdateInput, List include, List exclude) throws ApiException { - ApiResponse localVarResp = updateVrfRouteByIdWithHttpInfo(id, vrfRouteUpdateInput, include, exclude); - return localVarResp.getData(); - } - - /** - * Update a VRF Route - * Requests a VRF Route be redeployed across the network. Updating the prefix or next-hop address on a route is not currently supported. - * @param id VRF Route UUID (required) - * @param vrfRouteUpdateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @return ApiResponse<VrfRoute> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too Many Requests -
- */ - public ApiResponse updateVrfRouteByIdWithHttpInfo(UUID id, VrfRouteUpdateInput vrfRouteUpdateInput, List include, List exclude) throws ApiException { - okhttp3.Call localVarCall = updateVrfRouteByIdValidateBeforeCall(id, vrfRouteUpdateInput, include, exclude, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a VRF Route (asynchronously) - * Requests a VRF Route be redeployed across the network. Updating the prefix or next-hop address on a route is not currently supported. - * @param id VRF Route UUID (required) - * @param vrfRouteUpdateInput (required) - * @param include Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional) - * @param exclude Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
202 Accepted -
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too Many Requests -
- */ - public okhttp3.Call updateVrfRouteByIdAsync(UUID id, VrfRouteUpdateInput vrfRouteUpdateInput, List include, List exclude, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateVrfRouteByIdValidateBeforeCall(id, vrfRouteUpdateInput, include, exclude, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AbstractOpenApiSchema.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AbstractOpenApiSchema.java deleted file mode 100644 index 702cb879a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AbstractOpenApiSchema.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.ApiException; -import java.util.Objects; -import java.lang.reflect.Type; -import java.util.Map; - -//import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public abstract class AbstractOpenApiSchema { - - // store the actual instance of the schema/object - private Object instance; - - // is nullable - private Boolean isNullable; - - // schema type (e.g. oneOf, anyOf) - private final String schemaType; - - public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { - this.schemaType = schemaType; - this.isNullable = isNullable; - } - - /** - * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map> getSchemas(); - - /** - * Get the actual instance - * - * @return an instance of the actual schema/object - */ - //@JsonValue - public Object getActualInstance() {return instance;} - - /** - * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) {this.instance = instance;} - - /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well - * - * @return an instance of the actual schema/object - */ - public Object getActualInstanceRecursively() { - return getActualInstanceRecursively(this); - } - - private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { - if (object.getActualInstance() == null) { - return null; - } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); - } else { - return object.getActualInstance(); - } - } - - /** - * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ").append(getClass()).append(" {\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); - sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) && - Objects.equals(this.isNullable, a.isNullable) && - Objects.equals(this.schemaType, a.schemaType); - } - - @Override - public int hashCode() { - return Objects.hash(instance, isNullable, schemaType); - } - - /** - * Is nullable - * - * @return true if it's nullable - */ - public Boolean isNullable() { - if (Boolean.TRUE.equals(isNullable)) { - return Boolean.TRUE; - } else { - return Boolean.FALSE; - } - } - - - -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ActivateHardwareReservationRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ActivateHardwareReservationRequest.java deleted file mode 100644 index 72d74362e..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ActivateHardwareReservationRequest.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ActivateHardwareReservationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ActivateHardwareReservationRequest { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public ActivateHardwareReservationRequest() { - } - - public ActivateHardwareReservationRequest description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ActivateHardwareReservationRequest instance itself - */ - public ActivateHardwareReservationRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ActivateHardwareReservationRequest activateHardwareReservationRequest = (ActivateHardwareReservationRequest) o; - return Objects.equals(this.description, activateHardwareReservationRequest.description)&& - Objects.equals(this.additionalProperties, activateHardwareReservationRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ActivateHardwareReservationRequest {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ActivateHardwareReservationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ActivateHardwareReservationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ActivateHardwareReservationRequest is not found in the empty JSON string", ActivateHardwareReservationRequest.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ActivateHardwareReservationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ActivateHardwareReservationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ActivateHardwareReservationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ActivateHardwareReservationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ActivateHardwareReservationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ActivateHardwareReservationRequest instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ActivateHardwareReservationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of ActivateHardwareReservationRequest - * @throws IOException if the JSON string is invalid with respect to ActivateHardwareReservationRequest - */ - public static ActivateHardwareReservationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ActivateHardwareReservationRequest.class); - } - - /** - * Convert an instance of ActivateHardwareReservationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java deleted file mode 100644 index 7ece446dc..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Address.java +++ /dev/null @@ -1,483 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Coordinates; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Address - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Address { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_COORDINATES = "coordinates"; - @SerializedName(SERIALIZED_NAME_COORDINATES) - private Coordinates coordinates; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP_CODE = "zip_code"; - @SerializedName(SERIALIZED_NAME_ZIP_CODE) - private String zipCode; - - public Address() { - } - - public Address address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public Address address2(String address2) { - - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - **/ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Address city(String city) { - - this.city = city; - return this; - } - - /** - * Get city - * @return city - **/ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - - public void setCity(String city) { - this.city = city; - } - - - public Address coordinates(Coordinates coordinates) { - - this.coordinates = coordinates; - return this; - } - - /** - * Get coordinates - * @return coordinates - **/ - @javax.annotation.Nullable - public Coordinates getCoordinates() { - return coordinates; - } - - - public void setCoordinates(Coordinates coordinates) { - this.coordinates = coordinates; - } - - - public Address country(String country) { - - this.country = country; - return this; - } - - /** - * Get country - * @return country - **/ - @javax.annotation.Nonnull - public String getCountry() { - return country; - } - - - public void setCountry(String country) { - this.country = country; - } - - - public Address state(String state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public String getState() { - return state; - } - - - public void setState(String state) { - this.state = state; - } - - - public Address zipCode(String zipCode) { - - this.zipCode = zipCode; - return this; - } - - /** - * Get zipCode - * @return zipCode - **/ - @javax.annotation.Nonnull - public String getZipCode() { - return zipCode; - } - - - public void setZipCode(String zipCode) { - this.zipCode = zipCode; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Address instance itself - */ - public Address putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Address address = (Address) o; - return Objects.equals(this.address, address.address) && - Objects.equals(this.address2, address.address2) && - Objects.equals(this.city, address.city) && - Objects.equals(this.coordinates, address.coordinates) && - Objects.equals(this.country, address.country) && - Objects.equals(this.state, address.state) && - Objects.equals(this.zipCode, address.zipCode)&& - Objects.equals(this.additionalProperties, address.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, address2, city, coordinates, country, state, zipCode, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Address {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zipCode: ").append(toIndentedString(zipCode)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("coordinates"); - openapiFields.add("country"); - openapiFields.add("state"); - openapiFields.add("zip_code"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("country"); - openapiRequiredFields.add("zip_code"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Address - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Address.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Address.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - // validate the optional field `coordinates` - if (jsonObj.get("coordinates") != null && !jsonObj.get("coordinates").isJsonNull()) { - Coordinates.validateJsonElement(jsonObj.get("coordinates")); - } - if (!jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if (!jsonObj.get("zip_code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip_code").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Address.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Address' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter
thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Address.class)); - - return (TypeAdapter) new TypeAdapter
() { - @Override - public void write(JsonWriter out, Address value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Address read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Address instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Address given an JSON string - * - * @param jsonString JSON string - * @return An instance of Address - * @throws IOException if the JSON string is invalid with respect to Address - */ - public static Address fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Address.class); - } - - /** - * Convert an instance of Address to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Attribute.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Attribute.java deleted file mode 100644 index 5f53ba41c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Attribute.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.AttributeData; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Attribute - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Attribute { - public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; - @SerializedName(SERIALIZED_NAME_NAMESPACE) - private String namespace; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private AttributeData data; - - public Attribute() { - } - - - public Attribute( - String namespace, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.namespace = namespace; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - /** - * Attribute namespace - * @return namespace - **/ - @javax.annotation.Nullable - public String getNamespace() { - return namespace; - } - - - - - /** - * Datetime when the block was created. - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - - /** - * Datetime when the block was updated. - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - - public Attribute data(AttributeData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public AttributeData getData() { - return data; - } - - - public void setData(AttributeData data) { - this.data = data; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Attribute instance itself - */ - public Attribute putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Attribute attribute = (Attribute) o; - return Objects.equals(this.namespace, attribute.namespace) && - Objects.equals(this.createdAt, attribute.createdAt) && - Objects.equals(this.updatedAt, attribute.updatedAt) && - Objects.equals(this.data, attribute.data)&& - Objects.equals(this.additionalProperties, attribute.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(namespace, createdAt, updatedAt, data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Attribute {\n"); - sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("namespace"); - openapiFields.add("created_at"); - openapiFields.add("updated_at"); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Attribute - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Attribute.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Attribute is not found in the empty JSON string", Attribute.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) && !jsonObj.get("namespace").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespace` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespace").toString())); - } - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - AttributeData.validateJsonElement(jsonObj.get("data")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Attribute.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Attribute' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Attribute.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Attribute value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Attribute read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Attribute instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Attribute given an JSON string - * - * @param jsonString JSON string - * @return An instance of Attribute - * @throws IOException if the JSON string is invalid with respect to Attribute - */ - public static Attribute fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Attribute.class); - } - - /** - * Convert an instance of Attribute to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AttributeData.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AttributeData.java deleted file mode 100644 index 72db2dedd..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AttributeData.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * AttributeData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AttributeData { - public static final String SERIALIZED_NAME_LATEST = "latest"; - @SerializedName(SERIALIZED_NAME_LATEST) - private Boolean latest; - - public static final String SERIALIZED_NAME_MODEL = "model"; - @SerializedName(SERIALIZED_NAME_MODEL) - private String model; - - public static final String SERIALIZED_NAME_VENDOR = "vendor"; - @SerializedName(SERIALIZED_NAME_VENDOR) - private String vendor; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public AttributeData() { - } - - - public AttributeData( - Boolean latest, - String model, - String vendor, - String plan - ) { - this(); - this.latest = latest; - this.model = model; - this.vendor = vendor; - this.plan = plan; - } - - /** - * Boolean flag to know if the firmware set is the latest for the model and vendor - * @return latest - **/ - @javax.annotation.Nullable - public Boolean getLatest() { - return latest; - } - - - - - /** - * Model on which this firmware set can be applied - * @return model - **/ - @javax.annotation.Nullable - public String getModel() { - return model; - } - - - - - /** - * Vendor on which this firmware set can be applied - * @return vendor - **/ - @javax.annotation.Nullable - public String getVendor() { - return vendor; - } - - - - - /** - * Plan where the firmware set can be applied - * @return plan - **/ - @javax.annotation.Nullable - public String getPlan() { - return plan; - } - - - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the AttributeData instance itself - */ - public AttributeData putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AttributeData attributeData = (AttributeData) o; - return Objects.equals(this.latest, attributeData.latest) && - Objects.equals(this.model, attributeData.model) && - Objects.equals(this.vendor, attributeData.vendor) && - Objects.equals(this.plan, attributeData.plan)&& - Objects.equals(this.additionalProperties, attributeData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(latest, model, vendor, plan, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AttributeData {\n"); - sb.append(" latest: ").append(toIndentedString(latest)).append("\n"); - sb.append(" model: ").append(toIndentedString(model)).append("\n"); - sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("latest"); - openapiFields.add("model"); - openapiFields.add("vendor"); - openapiFields.add("plan"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AttributeData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AttributeData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AttributeData is not found in the empty JSON string", AttributeData.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("model") != null && !jsonObj.get("model").isJsonNull()) && !jsonObj.get("model").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `model` to be a primitive type in the JSON string but got `%s`", jsonObj.get("model").toString())); - } - if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); - } - if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AttributeData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AttributeData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AttributeData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AttributeData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public AttributeData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AttributeData instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AttributeData given an JSON string - * - * @param jsonString JSON string - * @return An instance of AttributeData - * @throws IOException if the JSON string is invalid with respect to AttributeData - */ - public static AttributeData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AttributeData.class); - } - - /** - * Convert an instance of AttributeData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java deleted file mode 100644 index 8700df8d0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthToken.java +++ /dev/null @@ -1,499 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.AuthTokenProject; -import com.equinix.openapi.metal.v1.model.AuthTokenUser; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * AuthToken - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthToken { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private AuthTokenProject project; - - public static final String SERIALIZED_NAME_READ_ONLY = "read_only"; - @SerializedName(SERIALIZED_NAME_READ_ONLY) - private Boolean readOnly; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - @SerializedName(SERIALIZED_NAME_TOKEN) - private String token; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_USER = "user"; - @SerializedName(SERIALIZED_NAME_USER) - private AuthTokenUser user; - - public AuthToken() { - } - - public AuthToken createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AuthToken description(String description) { - - this.description = description; - return this; - } - - /** - * Available only for API keys - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public AuthToken id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public AuthToken project(AuthTokenProject project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public AuthTokenProject getProject() { - return project; - } - - - public void setProject(AuthTokenProject project) { - this.project = project; - } - - - public AuthToken readOnly(Boolean readOnly) { - - this.readOnly = readOnly; - return this; - } - - /** - * Get readOnly - * @return readOnly - **/ - @javax.annotation.Nullable - public Boolean getReadOnly() { - return readOnly; - } - - - public void setReadOnly(Boolean readOnly) { - this.readOnly = readOnly; - } - - - public AuthToken token(String token) { - - this.token = token; - return this; - } - - /** - * Get token - * @return token - **/ - @javax.annotation.Nullable - public String getToken() { - return token; - } - - - public void setToken(String token) { - this.token = token; - } - - - public AuthToken updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public AuthToken user(AuthTokenUser user) { - - this.user = user; - return this; - } - - /** - * Get user - * @return user - **/ - @javax.annotation.Nullable - public AuthTokenUser getUser() { - return user; - } - - - public void setUser(AuthTokenUser user) { - this.user = user; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the AuthToken instance itself - */ - public AuthToken putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthToken authToken = (AuthToken) o; - return Objects.equals(this.createdAt, authToken.createdAt) && - Objects.equals(this.description, authToken.description) && - Objects.equals(this.id, authToken.id) && - Objects.equals(this.project, authToken.project) && - Objects.equals(this.readOnly, authToken.readOnly) && - Objects.equals(this.token, authToken.token) && - Objects.equals(this.updatedAt, authToken.updatedAt) && - Objects.equals(this.user, authToken.user)&& - Objects.equals(this.additionalProperties, authToken.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, description, id, project, readOnly, token, updatedAt, user, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthToken {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("project"); - openapiFields.add("read_only"); - openapiFields.add("token"); - openapiFields.add("updated_at"); - openapiFields.add("user"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthToken - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthToken is not found in the empty JSON string", AuthToken.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - AuthTokenProject.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); - } - // validate the optional field `user` - if (jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) { - AuthTokenUser.validateJsonElement(jsonObj.get("user")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthToken.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public AuthToken read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AuthToken instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthToken - * @throws IOException if the JSON string is invalid with respect to AuthToken - */ - public static AuthToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthToken.class); - } - - /** - * Convert an instance of AuthToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java deleted file mode 100644 index 4eb9638a8..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenInput.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * AuthTokenInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthTokenInput { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_READ_ONLY = "read_only"; - @SerializedName(SERIALIZED_NAME_READ_ONLY) - private Boolean readOnly; - - public AuthTokenInput() { - } - - public AuthTokenInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public AuthTokenInput readOnly(Boolean readOnly) { - - this.readOnly = readOnly; - return this; - } - - /** - * Get readOnly - * @return readOnly - **/ - @javax.annotation.Nullable - public Boolean getReadOnly() { - return readOnly; - } - - - public void setReadOnly(Boolean readOnly) { - this.readOnly = readOnly; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the AuthTokenInput instance itself - */ - public AuthTokenInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthTokenInput authTokenInput = (AuthTokenInput) o; - return Objects.equals(this.description, authTokenInput.description) && - Objects.equals(this.readOnly, authTokenInput.readOnly)&& - Objects.equals(this.additionalProperties, authTokenInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, readOnly, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthTokenInput {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("read_only"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthTokenInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthTokenInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthTokenInput is not found in the empty JSON string", AuthTokenInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthTokenInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthTokenInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthTokenInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthTokenInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public AuthTokenInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AuthTokenInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthTokenInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthTokenInput - * @throws IOException if the JSON string is invalid with respect to AuthTokenInput - */ - public static AuthTokenInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthTokenInput.class); - } - - /** - * Convert an instance of AuthTokenInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java deleted file mode 100644 index 4de4550fb..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.AuthToken; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * AuthTokenList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthTokenList { - public static final String SERIALIZED_NAME_API_KEYS = "api_keys"; - @SerializedName(SERIALIZED_NAME_API_KEYS) - private List apiKeys; - - public AuthTokenList() { - } - - public AuthTokenList apiKeys(List apiKeys) { - - this.apiKeys = apiKeys; - return this; - } - - public AuthTokenList addApiKeysItem(AuthToken apiKeysItem) { - if (this.apiKeys == null) { - this.apiKeys = new ArrayList<>(); - } - this.apiKeys.add(apiKeysItem); - return this; - } - - /** - * Get apiKeys - * @return apiKeys - **/ - @javax.annotation.Nullable - public List getApiKeys() { - return apiKeys; - } - - - public void setApiKeys(List apiKeys) { - this.apiKeys = apiKeys; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the AuthTokenList instance itself - */ - public AuthTokenList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthTokenList authTokenList = (AuthTokenList) o; - return Objects.equals(this.apiKeys, authTokenList.apiKeys)&& - Objects.equals(this.additionalProperties, authTokenList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(apiKeys, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthTokenList {\n"); - sb.append(" apiKeys: ").append(toIndentedString(apiKeys)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("api_keys"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthTokenList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthTokenList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthTokenList is not found in the empty JSON string", AuthTokenList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("api_keys") != null && !jsonObj.get("api_keys").isJsonNull()) { - JsonArray jsonArrayapiKeys = jsonObj.getAsJsonArray("api_keys"); - if (jsonArrayapiKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("api_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `api_keys` to be an array in the JSON string but got `%s`", jsonObj.get("api_keys").toString())); - } - - // validate the optional field `api_keys` (array) - for (int i = 0; i < jsonArrayapiKeys.size(); i++) { - AuthToken.validateJsonElement(jsonArrayapiKeys.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthTokenList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthTokenList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthTokenList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthTokenList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public AuthTokenList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AuthTokenList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthTokenList given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthTokenList - * @throws IOException if the JSON string is invalid with respect to AuthTokenList - */ - public static AuthTokenList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthTokenList.class); - } - - /** - * Convert an instance of AuthTokenList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java deleted file mode 100644 index ef567a745..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenProject.java +++ /dev/null @@ -1,985 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Organization; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * AuthTokenProject - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthTokenProject { - public static final String SERIALIZED_NAME_BGP_CONFIG = "bgp_config"; - @SerializedName(SERIALIZED_NAME_BGP_CONFIG) - private Href bgpConfig; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DEVICES = "devices"; - @SerializedName(SERIALIZED_NAME_DEVICES) - private List devices; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_INVITATIONS = "invitations"; - @SerializedName(SERIALIZED_NAME_INVITATIONS) - private List invitations; - - public static final String SERIALIZED_NAME_MAX_DEVICES = "max_devices"; - @SerializedName(SERIALIZED_NAME_MAX_DEVICES) - private Object maxDevices; - - public static final String SERIALIZED_NAME_MEMBERS = "members"; - @SerializedName(SERIALIZED_NAME_MEMBERS) - private List members; - - public static final String SERIALIZED_NAME_MEMBERSHIPS = "memberships"; - @SerializedName(SERIALIZED_NAME_MEMBERSHIPS) - private List memberships; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NETWORK_STATUS = "network_status"; - @SerializedName(SERIALIZED_NAME_NETWORK_STATUS) - private Object networkStatus; - - public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION) - private Organization organization; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD = "payment_method"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) - private Href paymentMethod; - - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_VOLUMES = "volumes"; - @SerializedName(SERIALIZED_NAME_VOLUMES) - private List volumes; - - /** - * The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEFAULT("default"), - - VMCE("vmce"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public AuthTokenProject() { - } - - public AuthTokenProject bgpConfig(Href bgpConfig) { - - this.bgpConfig = bgpConfig; - return this; - } - - /** - * Get bgpConfig - * @return bgpConfig - **/ - @javax.annotation.Nullable - public Href getBgpConfig() { - return bgpConfig; - } - - - public void setBgpConfig(Href bgpConfig) { - this.bgpConfig = bgpConfig; - } - - - public AuthTokenProject createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AuthTokenProject customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public AuthTokenProject devices(List devices) { - - this.devices = devices; - return this; - } - - public AuthTokenProject addDevicesItem(Href devicesItem) { - if (this.devices == null) { - this.devices = new ArrayList<>(); - } - this.devices.add(devicesItem); - return this; - } - - /** - * Get devices - * @return devices - **/ - @javax.annotation.Nullable - public List getDevices() { - return devices; - } - - - public void setDevices(List devices) { - this.devices = devices; - } - - - public AuthTokenProject id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public AuthTokenProject invitations(List invitations) { - - this.invitations = invitations; - return this; - } - - public AuthTokenProject addInvitationsItem(Href invitationsItem) { - if (this.invitations == null) { - this.invitations = new ArrayList<>(); - } - this.invitations.add(invitationsItem); - return this; - } - - /** - * Get invitations - * @return invitations - **/ - @javax.annotation.Nullable - public List getInvitations() { - return invitations; - } - - - public void setInvitations(List invitations) { - this.invitations = invitations; - } - - - public AuthTokenProject maxDevices(Object maxDevices) { - - this.maxDevices = maxDevices; - return this; - } - - /** - * Get maxDevices - * @return maxDevices - **/ - @javax.annotation.Nullable - public Object getMaxDevices() { - return maxDevices; - } - - - public void setMaxDevices(Object maxDevices) { - this.maxDevices = maxDevices; - } - - - public AuthTokenProject members(List members) { - - this.members = members; - return this; - } - - public AuthTokenProject addMembersItem(Href membersItem) { - if (this.members == null) { - this.members = new ArrayList<>(); - } - this.members.add(membersItem); - return this; - } - - /** - * Get members - * @return members - **/ - @javax.annotation.Nullable - public List getMembers() { - return members; - } - - - public void setMembers(List members) { - this.members = members; - } - - - public AuthTokenProject memberships(List memberships) { - - this.memberships = memberships; - return this; - } - - public AuthTokenProject addMembershipsItem(Href membershipsItem) { - if (this.memberships == null) { - this.memberships = new ArrayList<>(); - } - this.memberships.add(membershipsItem); - return this; - } - - /** - * Get memberships - * @return memberships - **/ - @javax.annotation.Nullable - public List getMemberships() { - return memberships; - } - - - public void setMemberships(List memberships) { - this.memberships = memberships; - } - - - public AuthTokenProject name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public AuthTokenProject networkStatus(Object networkStatus) { - - this.networkStatus = networkStatus; - return this; - } - - /** - * Get networkStatus - * @return networkStatus - **/ - @javax.annotation.Nullable - public Object getNetworkStatus() { - return networkStatus; - } - - - public void setNetworkStatus(Object networkStatus) { - this.networkStatus = networkStatus; - } - - - public AuthTokenProject organization(Organization organization) { - - this.organization = organization; - return this; - } - - /** - * Get organization - * @return organization - **/ - @javax.annotation.Nullable - public Organization getOrganization() { - return organization; - } - - - public void setOrganization(Organization organization) { - this.organization = organization; - } - - - public AuthTokenProject paymentMethod(Href paymentMethod) { - - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @javax.annotation.Nullable - public Href getPaymentMethod() { - return paymentMethod; - } - - - public void setPaymentMethod(Href paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - public AuthTokenProject sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public AuthTokenProject addSshKeysItem(Href sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * Get sshKeys - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - - public AuthTokenProject updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public AuthTokenProject volumes(List volumes) { - - this.volumes = volumes; - return this; - } - - public AuthTokenProject addVolumesItem(Href volumesItem) { - if (this.volumes == null) { - this.volumes = new ArrayList<>(); - } - this.volumes.add(volumesItem); - return this; - } - - /** - * Get volumes - * @return volumes - **/ - @javax.annotation.Nullable - public List getVolumes() { - return volumes; - } - - - public void setVolumes(List volumes) { - this.volumes = volumes; - } - - - public AuthTokenProject type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public AuthTokenProject tags(List tags) { - - this.tags = tags; - return this; - } - - public AuthTokenProject addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the AuthTokenProject instance itself - */ - public AuthTokenProject putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthTokenProject authTokenProject = (AuthTokenProject) o; - return Objects.equals(this.bgpConfig, authTokenProject.bgpConfig) && - Objects.equals(this.createdAt, authTokenProject.createdAt) && - Objects.equals(this.customdata, authTokenProject.customdata) && - Objects.equals(this.devices, authTokenProject.devices) && - Objects.equals(this.id, authTokenProject.id) && - Objects.equals(this.invitations, authTokenProject.invitations) && - Objects.equals(this.maxDevices, authTokenProject.maxDevices) && - Objects.equals(this.members, authTokenProject.members) && - Objects.equals(this.memberships, authTokenProject.memberships) && - Objects.equals(this.name, authTokenProject.name) && - Objects.equals(this.networkStatus, authTokenProject.networkStatus) && - Objects.equals(this.organization, authTokenProject.organization) && - Objects.equals(this.paymentMethod, authTokenProject.paymentMethod) && - Objects.equals(this.sshKeys, authTokenProject.sshKeys) && - Objects.equals(this.updatedAt, authTokenProject.updatedAt) && - Objects.equals(this.volumes, authTokenProject.volumes) && - Objects.equals(this.type, authTokenProject.type) && - Objects.equals(this.tags, authTokenProject.tags)&& - Objects.equals(this.additionalProperties, authTokenProject.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bgpConfig, createdAt, customdata, devices, id, invitations, maxDevices, members, memberships, name, networkStatus, organization, paymentMethod, sshKeys, updatedAt, volumes, type, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthTokenProject {\n"); - sb.append(" bgpConfig: ").append(toIndentedString(bgpConfig)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" devices: ").append(toIndentedString(devices)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" invitations: ").append(toIndentedString(invitations)).append("\n"); - sb.append(" maxDevices: ").append(toIndentedString(maxDevices)).append("\n"); - sb.append(" members: ").append(toIndentedString(members)).append("\n"); - sb.append(" memberships: ").append(toIndentedString(memberships)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" networkStatus: ").append(toIndentedString(networkStatus)).append("\n"); - sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bgp_config"); - openapiFields.add("created_at"); - openapiFields.add("customdata"); - openapiFields.add("devices"); - openapiFields.add("id"); - openapiFields.add("invitations"); - openapiFields.add("max_devices"); - openapiFields.add("members"); - openapiFields.add("memberships"); - openapiFields.add("name"); - openapiFields.add("network_status"); - openapiFields.add("organization"); - openapiFields.add("payment_method"); - openapiFields.add("ssh_keys"); - openapiFields.add("updated_at"); - openapiFields.add("volumes"); - openapiFields.add("type"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthTokenProject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthTokenProject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthTokenProject is not found in the empty JSON string", AuthTokenProject.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `bgp_config` - if (jsonObj.get("bgp_config") != null && !jsonObj.get("bgp_config").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("bgp_config")); - } - if (jsonObj.get("devices") != null && !jsonObj.get("devices").isJsonNull()) { - JsonArray jsonArraydevices = jsonObj.getAsJsonArray("devices"); - if (jsonArraydevices != null) { - // ensure the json data is an array - if (!jsonObj.get("devices").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); - } - - // validate the optional field `devices` (array) - for (int i = 0; i < jsonArraydevices.size(); i++) { - Href.validateJsonElement(jsonArraydevices.get(i)); - }; - } - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (jsonObj.get("invitations") != null && !jsonObj.get("invitations").isJsonNull()) { - JsonArray jsonArrayinvitations = jsonObj.getAsJsonArray("invitations"); - if (jsonArrayinvitations != null) { - // ensure the json data is an array - if (!jsonObj.get("invitations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `invitations` to be an array in the JSON string but got `%s`", jsonObj.get("invitations").toString())); - } - - // validate the optional field `invitations` (array) - for (int i = 0; i < jsonArrayinvitations.size(); i++) { - Href.validateJsonElement(jsonArrayinvitations.get(i)); - }; - } - } - if (jsonObj.get("members") != null && !jsonObj.get("members").isJsonNull()) { - JsonArray jsonArraymembers = jsonObj.getAsJsonArray("members"); - if (jsonArraymembers != null) { - // ensure the json data is an array - if (!jsonObj.get("members").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `members` to be an array in the JSON string but got `%s`", jsonObj.get("members").toString())); - } - - // validate the optional field `members` (array) - for (int i = 0; i < jsonArraymembers.size(); i++) { - Href.validateJsonElement(jsonArraymembers.get(i)); - }; - } - } - if (jsonObj.get("memberships") != null && !jsonObj.get("memberships").isJsonNull()) { - JsonArray jsonArraymemberships = jsonObj.getAsJsonArray("memberships"); - if (jsonArraymemberships != null) { - // ensure the json data is an array - if (!jsonObj.get("memberships").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `memberships` to be an array in the JSON string but got `%s`", jsonObj.get("memberships").toString())); - } - - // validate the optional field `memberships` (array) - for (int i = 0; i < jsonArraymemberships.size(); i++) { - Href.validateJsonElement(jsonArraymemberships.get(i)); - }; - } - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `organization` - if (jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) { - Organization.validateJsonElement(jsonObj.get("organization")); - } - // validate the optional field `payment_method` - if (jsonObj.get("payment_method") != null && !jsonObj.get("payment_method").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("payment_method")); - } - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { - JsonArray jsonArraysshKeys = jsonObj.getAsJsonArray("ssh_keys"); - if (jsonArraysshKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - - // validate the optional field `ssh_keys` (array) - for (int i = 0; i < jsonArraysshKeys.size(); i++) { - Href.validateJsonElement(jsonArraysshKeys.get(i)); - }; - } - } - if (jsonObj.get("volumes") != null && !jsonObj.get("volumes").isJsonNull()) { - JsonArray jsonArrayvolumes = jsonObj.getAsJsonArray("volumes"); - if (jsonArrayvolumes != null) { - // ensure the json data is an array - if (!jsonObj.get("volumes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `volumes` to be an array in the JSON string but got `%s`", jsonObj.get("volumes").toString())); - } - - // validate the optional field `volumes` (array) - for (int i = 0; i < jsonArrayvolumes.size(); i++) { - Href.validateJsonElement(jsonArrayvolumes.get(i)); - }; - } - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthTokenProject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthTokenProject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthTokenProject.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthTokenProject value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public AuthTokenProject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AuthTokenProject instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthTokenProject given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthTokenProject - * @throws IOException if the JSON string is invalid with respect to AuthTokenProject - */ - public static AuthTokenProject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthTokenProject.class); - } - - /** - * Convert an instance of AuthTokenProject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java deleted file mode 100644 index 71dbdd2c1..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/AuthTokenUser.java +++ /dev/null @@ -1,942 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * AuthTokenUser - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AuthTokenUser { - public static final String SERIALIZED_NAME_AVATAR_THUMB_URL = "avatar_thumb_url"; - @SerializedName(SERIALIZED_NAME_AVATAR_THUMB_URL) - private String avatarThumbUrl; - - public static final String SERIALIZED_NAME_AVATAR_URL = "avatar_url"; - @SerializedName(SERIALIZED_NAME_AVATAR_URL) - private String avatarUrl; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DEFAULT_ORGANIZATION_ID = "default_organization_id"; - @SerializedName(SERIALIZED_NAME_DEFAULT_ORGANIZATION_ID) - private UUID defaultOrganizationId; - - public static final String SERIALIZED_NAME_DEFAULT_PROJECT_ID = "default_project_id"; - @SerializedName(SERIALIZED_NAME_DEFAULT_PROJECT_ID) - private UUID defaultProjectId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_EMAILS = "emails"; - @SerializedName(SERIALIZED_NAME_EMAILS) - private List emails; - - public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_FRAUD_SCORE = "fraud_score"; - @SerializedName(SERIALIZED_NAME_FRAUD_SCORE) - private String fraudScore; - - public static final String SERIALIZED_NAME_FULL_NAME = "full_name"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private String fullName; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LAST_LOGIN_AT = "last_login_at"; - @SerializedName(SERIALIZED_NAME_LAST_LOGIN_AT) - private OffsetDateTime lastLoginAt; - - public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_MAX_ORGANIZATIONS = "max_organizations"; - @SerializedName(SERIALIZED_NAME_MAX_ORGANIZATIONS) - private Integer maxOrganizations; - - public static final String SERIALIZED_NAME_MAX_PROJECTS = "max_projects"; - @SerializedName(SERIALIZED_NAME_MAX_PROJECTS) - private Integer maxProjects; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "phone_number"; - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private String phoneNumber; - - public static final String SERIALIZED_NAME_SHORT_ID = "short_id"; - @SerializedName(SERIALIZED_NAME_SHORT_ID) - private String shortId; - - public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; - @SerializedName(SERIALIZED_NAME_TIMEZONE) - private String timezone; - - public static final String SERIALIZED_NAME_TWO_FACTOR_AUTH = "two_factor_auth"; - @SerializedName(SERIALIZED_NAME_TWO_FACTOR_AUTH) - private String twoFactorAuth; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public AuthTokenUser() { - } - - public AuthTokenUser avatarThumbUrl(String avatarThumbUrl) { - - this.avatarThumbUrl = avatarThumbUrl; - return this; - } - - /** - * Get avatarThumbUrl - * @return avatarThumbUrl - **/ - @javax.annotation.Nullable - public String getAvatarThumbUrl() { - return avatarThumbUrl; - } - - - public void setAvatarThumbUrl(String avatarThumbUrl) { - this.avatarThumbUrl = avatarThumbUrl; - } - - - public AuthTokenUser avatarUrl(String avatarUrl) { - - this.avatarUrl = avatarUrl; - return this; - } - - /** - * Get avatarUrl - * @return avatarUrl - **/ - @javax.annotation.Nullable - public String getAvatarUrl() { - return avatarUrl; - } - - - public void setAvatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - } - - - public AuthTokenUser createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public AuthTokenUser customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public AuthTokenUser defaultOrganizationId(UUID defaultOrganizationId) { - - this.defaultOrganizationId = defaultOrganizationId; - return this; - } - - /** - * Get defaultOrganizationId - * @return defaultOrganizationId - **/ - @javax.annotation.Nullable - public UUID getDefaultOrganizationId() { - return defaultOrganizationId; - } - - - public void setDefaultOrganizationId(UUID defaultOrganizationId) { - this.defaultOrganizationId = defaultOrganizationId; - } - - - public AuthTokenUser defaultProjectId(UUID defaultProjectId) { - - this.defaultProjectId = defaultProjectId; - return this; - } - - /** - * Get defaultProjectId - * @return defaultProjectId - **/ - @javax.annotation.Nullable - public UUID getDefaultProjectId() { - return defaultProjectId; - } - - - public void setDefaultProjectId(UUID defaultProjectId) { - this.defaultProjectId = defaultProjectId; - } - - - public AuthTokenUser email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public AuthTokenUser emails(List emails) { - - this.emails = emails; - return this; - } - - public AuthTokenUser addEmailsItem(Href emailsItem) { - if (this.emails == null) { - this.emails = new ArrayList<>(); - } - this.emails.add(emailsItem); - return this; - } - - /** - * Get emails - * @return emails - **/ - @javax.annotation.Nullable - public List getEmails() { - return emails; - } - - - public void setEmails(List emails) { - this.emails = emails; - } - - - public AuthTokenUser firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public AuthTokenUser fraudScore(String fraudScore) { - - this.fraudScore = fraudScore; - return this; - } - - /** - * Get fraudScore - * @return fraudScore - **/ - @javax.annotation.Nullable - public String getFraudScore() { - return fraudScore; - } - - - public void setFraudScore(String fraudScore) { - this.fraudScore = fraudScore; - } - - - public AuthTokenUser fullName(String fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public String getFullName() { - return fullName; - } - - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - - public AuthTokenUser href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public AuthTokenUser id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public AuthTokenUser lastLoginAt(OffsetDateTime lastLoginAt) { - - this.lastLoginAt = lastLoginAt; - return this; - } - - /** - * Get lastLoginAt - * @return lastLoginAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getLastLoginAt() { - return lastLoginAt; - } - - - public void setLastLoginAt(OffsetDateTime lastLoginAt) { - this.lastLoginAt = lastLoginAt; - } - - - public AuthTokenUser lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public AuthTokenUser maxOrganizations(Integer maxOrganizations) { - - this.maxOrganizations = maxOrganizations; - return this; - } - - /** - * Get maxOrganizations - * @return maxOrganizations - **/ - @javax.annotation.Nullable - public Integer getMaxOrganizations() { - return maxOrganizations; - } - - - public void setMaxOrganizations(Integer maxOrganizations) { - this.maxOrganizations = maxOrganizations; - } - - - public AuthTokenUser maxProjects(Integer maxProjects) { - - this.maxProjects = maxProjects; - return this; - } - - /** - * Get maxProjects - * @return maxProjects - **/ - @javax.annotation.Nullable - public Integer getMaxProjects() { - return maxProjects; - } - - - public void setMaxProjects(Integer maxProjects) { - this.maxProjects = maxProjects; - } - - - public AuthTokenUser phoneNumber(String phoneNumber) { - - this.phoneNumber = phoneNumber; - return this; - } - - /** - * Get phoneNumber - * @return phoneNumber - **/ - @javax.annotation.Nullable - public String getPhoneNumber() { - return phoneNumber; - } - - - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - - public AuthTokenUser shortId(String shortId) { - - this.shortId = shortId; - return this; - } - - /** - * Get shortId - * @return shortId - **/ - @javax.annotation.Nullable - public String getShortId() { - return shortId; - } - - - public void setShortId(String shortId) { - this.shortId = shortId; - } - - - public AuthTokenUser timezone(String timezone) { - - this.timezone = timezone; - return this; - } - - /** - * Get timezone - * @return timezone - **/ - @javax.annotation.Nullable - public String getTimezone() { - return timezone; - } - - - public void setTimezone(String timezone) { - this.timezone = timezone; - } - - - public AuthTokenUser twoFactorAuth(String twoFactorAuth) { - - this.twoFactorAuth = twoFactorAuth; - return this; - } - - /** - * Get twoFactorAuth - * @return twoFactorAuth - **/ - @javax.annotation.Nullable - public String getTwoFactorAuth() { - return twoFactorAuth; - } - - - public void setTwoFactorAuth(String twoFactorAuth) { - this.twoFactorAuth = twoFactorAuth; - } - - - public AuthTokenUser updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the AuthTokenUser instance itself - */ - public AuthTokenUser putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AuthTokenUser authTokenUser = (AuthTokenUser) o; - return Objects.equals(this.avatarThumbUrl, authTokenUser.avatarThumbUrl) && - Objects.equals(this.avatarUrl, authTokenUser.avatarUrl) && - Objects.equals(this.createdAt, authTokenUser.createdAt) && - Objects.equals(this.customdata, authTokenUser.customdata) && - Objects.equals(this.defaultOrganizationId, authTokenUser.defaultOrganizationId) && - Objects.equals(this.defaultProjectId, authTokenUser.defaultProjectId) && - Objects.equals(this.email, authTokenUser.email) && - Objects.equals(this.emails, authTokenUser.emails) && - Objects.equals(this.firstName, authTokenUser.firstName) && - Objects.equals(this.fraudScore, authTokenUser.fraudScore) && - Objects.equals(this.fullName, authTokenUser.fullName) && - Objects.equals(this.href, authTokenUser.href) && - Objects.equals(this.id, authTokenUser.id) && - Objects.equals(this.lastLoginAt, authTokenUser.lastLoginAt) && - Objects.equals(this.lastName, authTokenUser.lastName) && - Objects.equals(this.maxOrganizations, authTokenUser.maxOrganizations) && - Objects.equals(this.maxProjects, authTokenUser.maxProjects) && - Objects.equals(this.phoneNumber, authTokenUser.phoneNumber) && - Objects.equals(this.shortId, authTokenUser.shortId) && - Objects.equals(this.timezone, authTokenUser.timezone) && - Objects.equals(this.twoFactorAuth, authTokenUser.twoFactorAuth) && - Objects.equals(this.updatedAt, authTokenUser.updatedAt)&& - Objects.equals(this.additionalProperties, authTokenUser.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(avatarThumbUrl, avatarUrl, createdAt, customdata, defaultOrganizationId, defaultProjectId, email, emails, firstName, fraudScore, fullName, href, id, lastLoginAt, lastName, maxOrganizations, maxProjects, phoneNumber, shortId, timezone, twoFactorAuth, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AuthTokenUser {\n"); - sb.append(" avatarThumbUrl: ").append(toIndentedString(avatarThumbUrl)).append("\n"); - sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" defaultOrganizationId: ").append(toIndentedString(defaultOrganizationId)).append("\n"); - sb.append(" defaultProjectId: ").append(toIndentedString(defaultProjectId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" fraudScore: ").append(toIndentedString(fraudScore)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" lastLoginAt: ").append(toIndentedString(lastLoginAt)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" maxOrganizations: ").append(toIndentedString(maxOrganizations)).append("\n"); - sb.append(" maxProjects: ").append(toIndentedString(maxProjects)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" shortId: ").append(toIndentedString(shortId)).append("\n"); - sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); - sb.append(" twoFactorAuth: ").append(toIndentedString(twoFactorAuth)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatar_thumb_url"); - openapiFields.add("avatar_url"); - openapiFields.add("created_at"); - openapiFields.add("customdata"); - openapiFields.add("default_organization_id"); - openapiFields.add("default_project_id"); - openapiFields.add("email"); - openapiFields.add("emails"); - openapiFields.add("first_name"); - openapiFields.add("fraud_score"); - openapiFields.add("full_name"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("last_login_at"); - openapiFields.add("last_name"); - openapiFields.add("max_organizations"); - openapiFields.add("max_projects"); - openapiFields.add("phone_number"); - openapiFields.add("short_id"); - openapiFields.add("timezone"); - openapiFields.add("two_factor_auth"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to AuthTokenUser - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!AuthTokenUser.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AuthTokenUser is not found in the empty JSON string", AuthTokenUser.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avatar_thumb_url") != null && !jsonObj.get("avatar_thumb_url").isJsonNull()) && !jsonObj.get("avatar_thumb_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatar_thumb_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar_thumb_url").toString())); - } - if ((jsonObj.get("avatar_url") != null && !jsonObj.get("avatar_url").isJsonNull()) && !jsonObj.get("avatar_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatar_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar_url").toString())); - } - if ((jsonObj.get("default_organization_id") != null && !jsonObj.get("default_organization_id").isJsonNull()) && !jsonObj.get("default_organization_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `default_organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_organization_id").toString())); - } - if ((jsonObj.get("default_project_id") != null && !jsonObj.get("default_project_id").isJsonNull()) && !jsonObj.get("default_project_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `default_project_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_project_id").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if (jsonObj.get("emails") != null && !jsonObj.get("emails").isJsonNull()) { - JsonArray jsonArrayemails = jsonObj.getAsJsonArray("emails"); - if (jsonArrayemails != null) { - // ensure the json data is an array - if (!jsonObj.get("emails").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); - } - - // validate the optional field `emails` (array) - for (int i = 0; i < jsonArrayemails.size(); i++) { - Href.validateJsonElement(jsonArrayemails.get(i)); - }; - } - } - if ((jsonObj.get("first_name") != null && !jsonObj.get("first_name").isJsonNull()) && !jsonObj.get("first_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); - } - if ((jsonObj.get("fraud_score") != null && !jsonObj.get("fraud_score").isJsonNull()) && !jsonObj.get("fraud_score").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fraud_score` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fraud_score").toString())); - } - if ((jsonObj.get("full_name") != null && !jsonObj.get("full_name").isJsonNull()) && !jsonObj.get("full_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `full_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("full_name").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("last_name") != null && !jsonObj.get("last_name").isJsonNull()) && !jsonObj.get("last_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); - } - if ((jsonObj.get("phone_number") != null && !jsonObj.get("phone_number").isJsonNull()) && !jsonObj.get("phone_number").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone_number").toString())); - } - if ((jsonObj.get("short_id") != null && !jsonObj.get("short_id").isJsonNull()) && !jsonObj.get("short_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("short_id").toString())); - } - if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); - } - if ((jsonObj.get("two_factor_auth") != null && !jsonObj.get("two_factor_auth").isJsonNull()) && !jsonObj.get("two_factor_auth").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `two_factor_auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("two_factor_auth").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AuthTokenUser.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AuthTokenUser' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AuthTokenUser.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AuthTokenUser value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public AuthTokenUser read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - AuthTokenUser instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of AuthTokenUser given an JSON string - * - * @param jsonString JSON string - * @return An instance of AuthTokenUser - * @throws IOException if the JSON string is invalid with respect to AuthTokenUser - */ - public static AuthTokenUser fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AuthTokenUser.class); - } - - /** - * Convert an instance of AuthTokenUser to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java deleted file mode 100644 index 36a524938..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BGPSessionInput.java +++ /dev/null @@ -1,369 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BGPSessionInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BGPSessionInput { - /** - * Address family for BGP session. - */ - @JsonAdapter(AddressFamilyEnum.Adapter.class) - public enum AddressFamilyEnum { - IPV4("ipv4"), - - IPV6("ipv6"); - - private String value; - - AddressFamilyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AddressFamilyEnum fromValue(String value) { - for (AddressFamilyEnum b : AddressFamilyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AddressFamilyEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AddressFamilyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AddressFamilyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AddressFamilyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private AddressFamilyEnum addressFamily; - - public static final String SERIALIZED_NAME_DEFAULT_ROUTE = "default_route"; - @SerializedName(SERIALIZED_NAME_DEFAULT_ROUTE) - private Boolean defaultRoute = false; - - public BGPSessionInput() { - } - - public BGPSessionInput addressFamily(AddressFamilyEnum addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Address family for BGP session. - * @return addressFamily - **/ - @javax.annotation.Nullable - public AddressFamilyEnum getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(AddressFamilyEnum addressFamily) { - this.addressFamily = addressFamily; - } - - - public BGPSessionInput defaultRoute(Boolean defaultRoute) { - - this.defaultRoute = defaultRoute; - return this; - } - - /** - * Set the default route policy. - * @return defaultRoute - **/ - @javax.annotation.Nullable - public Boolean getDefaultRoute() { - return defaultRoute; - } - - - public void setDefaultRoute(Boolean defaultRoute) { - this.defaultRoute = defaultRoute; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BGPSessionInput instance itself - */ - public BGPSessionInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BGPSessionInput bgPSessionInput = (BGPSessionInput) o; - return Objects.equals(this.addressFamily, bgPSessionInput.addressFamily) && - Objects.equals(this.defaultRoute, bgPSessionInput.defaultRoute)&& - Objects.equals(this.additionalProperties, bgPSessionInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(addressFamily, defaultRoute, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BGPSessionInput {\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" defaultRoute: ").append(toIndentedString(defaultRoute)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address_family"); - openapiFields.add("default_route"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BGPSessionInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BGPSessionInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BGPSessionInput is not found in the empty JSON string", BGPSessionInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("address_family") != null && !jsonObj.get("address_family").isJsonNull()) && !jsonObj.get("address_family").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address_family` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address_family").toString())); - } - // validate the optional field `address_family` - if (jsonObj.get("address_family") != null && !jsonObj.get("address_family").isJsonNull()) { - AddressFamilyEnum.validateJsonElement(jsonObj.get("address_family")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BGPSessionInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BGPSessionInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BGPSessionInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BGPSessionInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BGPSessionInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BGPSessionInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BGPSessionInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of BGPSessionInput - * @throws IOException if the JSON string is invalid with respect to BGPSessionInput - */ - public static BGPSessionInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BGPSessionInput.class); - } - - /** - * Convert an instance of BGPSessionInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java deleted file mode 100644 index 8c76bcc4c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Batch.java +++ /dev/null @@ -1,527 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Batch - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Batch { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_DEVICES = "devices"; - @SerializedName(SERIALIZED_NAME_DEVICES) - private List devices; - - public static final String SERIALIZED_NAME_ERROR_MESSAGES = "error_messages"; - @SerializedName(SERIALIZED_NAME_ERROR_MESSAGES) - private List errorMessages; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private Integer quantity; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public Batch() { - } - - public Batch createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Batch devices(List devices) { - - this.devices = devices; - return this; - } - - public Batch addDevicesItem(Href devicesItem) { - if (this.devices == null) { - this.devices = new ArrayList<>(); - } - this.devices.add(devicesItem); - return this; - } - - /** - * Get devices - * @return devices - **/ - @javax.annotation.Nullable - public List getDevices() { - return devices; - } - - - public void setDevices(List devices) { - this.devices = devices; - } - - - public Batch errorMessages(List errorMessages) { - - this.errorMessages = errorMessages; - return this; - } - - public Batch addErrorMessagesItem(String errorMessagesItem) { - if (this.errorMessages == null) { - this.errorMessages = new ArrayList<>(); - } - this.errorMessages.add(errorMessagesItem); - return this; - } - - /** - * Get errorMessages - * @return errorMessages - **/ - @javax.annotation.Nullable - public List getErrorMessages() { - return errorMessages; - } - - - public void setErrorMessages(List errorMessages) { - this.errorMessages = errorMessages; - } - - - public Batch id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Batch project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - - public Batch quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - public Integer getQuantity() { - return quantity; - } - - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public Batch state(String state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public String getState() { - return state; - } - - - public void setState(String state) { - this.state = state; - } - - - public Batch updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Batch instance itself - */ - public Batch putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Batch batch = (Batch) o; - return Objects.equals(this.createdAt, batch.createdAt) && - Objects.equals(this.devices, batch.devices) && - Objects.equals(this.errorMessages, batch.errorMessages) && - Objects.equals(this.id, batch.id) && - Objects.equals(this.project, batch.project) && - Objects.equals(this.quantity, batch.quantity) && - Objects.equals(this.state, batch.state) && - Objects.equals(this.updatedAt, batch.updatedAt)&& - Objects.equals(this.additionalProperties, batch.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, devices, errorMessages, id, project, quantity, state, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Batch {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" devices: ").append(toIndentedString(devices)).append("\n"); - sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("devices"); - openapiFields.add("error_messages"); - openapiFields.add("id"); - openapiFields.add("project"); - openapiFields.add("quantity"); - openapiFields.add("state"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Batch - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Batch.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Batch is not found in the empty JSON string", Batch.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("devices") != null && !jsonObj.get("devices").isJsonNull()) { - JsonArray jsonArraydevices = jsonObj.getAsJsonArray("devices"); - if (jsonArraydevices != null) { - // ensure the json data is an array - if (!jsonObj.get("devices").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); - } - - // validate the optional field `devices` (array) - for (int i = 0; i < jsonArraydevices.size(); i++) { - Href.validateJsonElement(jsonArraydevices.get(i)); - }; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("error_messages") != null && !jsonObj.get("error_messages").isJsonNull() && !jsonObj.get("error_messages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `error_messages` to be an array in the JSON string but got `%s`", jsonObj.get("error_messages").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Batch.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Batch' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Batch.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Batch value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Batch read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Batch instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Batch given an JSON string - * - * @param jsonString JSON string - * @return An instance of Batch - * @throws IOException if the JSON string is invalid with respect to Batch - */ - public static Batch fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Batch.class); - } - - /** - * Convert an instance of Batch to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java deleted file mode 100644 index 3ddbcb48d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BatchesList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Batch; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BatchesList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BatchesList { - public static final String SERIALIZED_NAME_BATCHES = "batches"; - @SerializedName(SERIALIZED_NAME_BATCHES) - private List batches; - - public BatchesList() { - } - - public BatchesList batches(List batches) { - - this.batches = batches; - return this; - } - - public BatchesList addBatchesItem(Batch batchesItem) { - if (this.batches == null) { - this.batches = new ArrayList<>(); - } - this.batches.add(batchesItem); - return this; - } - - /** - * Get batches - * @return batches - **/ - @javax.annotation.Nullable - public List getBatches() { - return batches; - } - - - public void setBatches(List batches) { - this.batches = batches; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BatchesList instance itself - */ - public BatchesList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BatchesList batchesList = (BatchesList) o; - return Objects.equals(this.batches, batchesList.batches)&& - Objects.equals(this.additionalProperties, batchesList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(batches, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BatchesList {\n"); - sb.append(" batches: ").append(toIndentedString(batches)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("batches"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BatchesList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BatchesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BatchesList is not found in the empty JSON string", BatchesList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("batches") != null && !jsonObj.get("batches").isJsonNull()) { - JsonArray jsonArraybatches = jsonObj.getAsJsonArray("batches"); - if (jsonArraybatches != null) { - // ensure the json data is an array - if (!jsonObj.get("batches").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `batches` to be an array in the JSON string but got `%s`", jsonObj.get("batches").toString())); - } - - // validate the optional field `batches` (array) - for (int i = 0; i < jsonArraybatches.size(); i++) { - Batch.validateJsonElement(jsonArraybatches.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BatchesList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BatchesList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BatchesList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BatchesList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BatchesList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BatchesList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BatchesList given an JSON string - * - * @param jsonString JSON string - * @return An instance of BatchesList - * @throws IOException if the JSON string is invalid with respect to BatchesList - */ - public static BatchesList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BatchesList.class); - } - - /** - * Convert an instance of BatchesList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java deleted file mode 100644 index 24fff6aed..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfig.java +++ /dev/null @@ -1,817 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.BgpSession; -import com.equinix.openapi.metal.v1.model.GlobalBgpRange; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpConfig - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpConfig { - public static final String SERIALIZED_NAME_ASN = "asn"; - @SerializedName(SERIALIZED_NAME_ASN) - private Integer asn; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - /** - * In a Local BGP deployment, a customer uses an internal ASN to control routes within a single Equinix Metal datacenter. This means that the routes are never advertised to the global Internet. Global BGP, on the other hand, requires a customer to have a registered ASN and IP space. - */ - @JsonAdapter(DeploymentTypeEnum.Adapter.class) - public enum DeploymentTypeEnum { - GLOBAL("global"), - - LOCAL("local"); - - private String value; - - DeploymentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DeploymentTypeEnum fromValue(String value) { - for (DeploymentTypeEnum b : DeploymentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DeploymentTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DeploymentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DeploymentTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DeploymentTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DEPLOYMENT_TYPE = "deployment_type"; - @SerializedName(SERIALIZED_NAME_DEPLOYMENT_TYPE) - private DeploymentTypeEnum deploymentType; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_MAX_PREFIX = "max_prefix"; - @SerializedName(SERIALIZED_NAME_MAX_PREFIX) - private Integer maxPrefix = 10; - - public static final String SERIALIZED_NAME_MD5 = "md5"; - @SerializedName(SERIALIZED_NAME_MD5) - private String md5; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public static final String SERIALIZED_NAME_RANGES = "ranges"; - @SerializedName(SERIALIZED_NAME_RANGES) - private List ranges; - - public static final String SERIALIZED_NAME_REQUESTED_AT = "requested_at"; - @SerializedName(SERIALIZED_NAME_REQUESTED_AT) - private OffsetDateTime requestedAt; - - public static final String SERIALIZED_NAME_ROUTE_OBJECT = "route_object"; - @SerializedName(SERIALIZED_NAME_ROUTE_OBJECT) - private String routeObject; - - public static final String SERIALIZED_NAME_SESSIONS = "sessions"; - @SerializedName(SERIALIZED_NAME_SESSIONS) - private List sessions; - - /** - * Status of the BGP Config. Status \"requested\" is valid only with the \"global\" deployment_type. - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - REQUESTED("requested"), - - ENABLED("enabled"), - - DISABLED("disabled"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public BgpConfig() { - } - - public BgpConfig asn(Integer asn) { - - this.asn = asn; - return this; - } - - /** - * Autonomous System Number. ASN is required with Global BGP. With Local BGP the private ASN, 65000, is assigned. - * @return asn - **/ - @javax.annotation.Nullable - public Integer getAsn() { - return asn; - } - - - public void setAsn(Integer asn) { - this.asn = asn; - } - - - public BgpConfig createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BgpConfig deploymentType(DeploymentTypeEnum deploymentType) { - - this.deploymentType = deploymentType; - return this; - } - - /** - * In a Local BGP deployment, a customer uses an internal ASN to control routes within a single Equinix Metal datacenter. This means that the routes are never advertised to the global Internet. Global BGP, on the other hand, requires a customer to have a registered ASN and IP space. - * @return deploymentType - **/ - @javax.annotation.Nullable - public DeploymentTypeEnum getDeploymentType() { - return deploymentType; - } - - - public void setDeploymentType(DeploymentTypeEnum deploymentType) { - this.deploymentType = deploymentType; - } - - - public BgpConfig href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public BgpConfig id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public BgpConfig maxPrefix(Integer maxPrefix) { - - this.maxPrefix = maxPrefix; - return this; - } - - /** - * The maximum number of route filters allowed per server - * @return maxPrefix - **/ - @javax.annotation.Nullable - public Integer getMaxPrefix() { - return maxPrefix; - } - - - public void setMaxPrefix(Integer maxPrefix) { - this.maxPrefix = maxPrefix; - } - - - public BgpConfig md5(String md5) { - - this.md5 = md5; - return this; - } - - /** - * (Optional) Password for BGP session in plaintext (not a checksum) - * @return md5 - **/ - @javax.annotation.Nullable - public String getMd5() { - return md5; - } - - - public void setMd5(String md5) { - this.md5 = md5; - } - - - public BgpConfig project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - - public BgpConfig ranges(List ranges) { - - this.ranges = ranges; - return this; - } - - public BgpConfig addRangesItem(GlobalBgpRange rangesItem) { - if (this.ranges == null) { - this.ranges = new ArrayList<>(); - } - this.ranges.add(rangesItem); - return this; - } - - /** - * The IP block ranges associated to the ASN (Populated in Global BGP only) - * @return ranges - **/ - @javax.annotation.Nullable - public List getRanges() { - return ranges; - } - - - public void setRanges(List ranges) { - this.ranges = ranges; - } - - - public BgpConfig requestedAt(OffsetDateTime requestedAt) { - - this.requestedAt = requestedAt; - return this; - } - - /** - * Get requestedAt - * @return requestedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getRequestedAt() { - return requestedAt; - } - - - public void setRequestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - } - - - public BgpConfig routeObject(String routeObject) { - - this.routeObject = routeObject; - return this; - } - - /** - * Specifies AS-MACRO (aka AS-SET) to use when building client route filters - * @return routeObject - **/ - @javax.annotation.Nullable - public String getRouteObject() { - return routeObject; - } - - - public void setRouteObject(String routeObject) { - this.routeObject = routeObject; - } - - - public BgpConfig sessions(List sessions) { - - this.sessions = sessions; - return this; - } - - public BgpConfig addSessionsItem(BgpSession sessionsItem) { - if (this.sessions == null) { - this.sessions = new ArrayList<>(); - } - this.sessions.add(sessionsItem); - return this; - } - - /** - * The direct connections between neighboring routers that want to exchange routing information. - * @return sessions - **/ - @javax.annotation.Nullable - public List getSessions() { - return sessions; - } - - - public void setSessions(List sessions) { - this.sessions = sessions; - } - - - public BgpConfig status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Status of the BGP Config. Status \"requested\" is valid only with the \"global\" deployment_type. - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpConfig instance itself - */ - public BgpConfig putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpConfig bgpConfig = (BgpConfig) o; - return Objects.equals(this.asn, bgpConfig.asn) && - Objects.equals(this.createdAt, bgpConfig.createdAt) && - Objects.equals(this.deploymentType, bgpConfig.deploymentType) && - Objects.equals(this.href, bgpConfig.href) && - Objects.equals(this.id, bgpConfig.id) && - Objects.equals(this.maxPrefix, bgpConfig.maxPrefix) && - Objects.equals(this.md5, bgpConfig.md5) && - Objects.equals(this.project, bgpConfig.project) && - Objects.equals(this.ranges, bgpConfig.ranges) && - Objects.equals(this.requestedAt, bgpConfig.requestedAt) && - Objects.equals(this.routeObject, bgpConfig.routeObject) && - Objects.equals(this.sessions, bgpConfig.sessions) && - Objects.equals(this.status, bgpConfig.status)&& - Objects.equals(this.additionalProperties, bgpConfig.additionalProperties); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(asn, createdAt, deploymentType, href, id, maxPrefix, md5, project, ranges, requestedAt, routeObject, sessions, status, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpConfig {\n"); - sb.append(" asn: ").append(toIndentedString(asn)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" deploymentType: ").append(toIndentedString(deploymentType)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" maxPrefix: ").append(toIndentedString(maxPrefix)).append("\n"); - sb.append(" md5: ").append(toIndentedString(md5)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" ranges: ").append(toIndentedString(ranges)).append("\n"); - sb.append(" requestedAt: ").append(toIndentedString(requestedAt)).append("\n"); - sb.append(" routeObject: ").append(toIndentedString(routeObject)).append("\n"); - sb.append(" sessions: ").append(toIndentedString(sessions)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("asn"); - openapiFields.add("created_at"); - openapiFields.add("deployment_type"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("max_prefix"); - openapiFields.add("md5"); - openapiFields.add("project"); - openapiFields.add("ranges"); - openapiFields.add("requested_at"); - openapiFields.add("route_object"); - openapiFields.add("sessions"); - openapiFields.add("status"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpConfig - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpConfig is not found in the empty JSON string", BgpConfig.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("deployment_type") != null && !jsonObj.get("deployment_type").isJsonNull()) && !jsonObj.get("deployment_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `deployment_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deployment_type").toString())); - } - // validate the optional field `deployment_type` - if (jsonObj.get("deployment_type") != null && !jsonObj.get("deployment_type").isJsonNull()) { - DeploymentTypeEnum.validateJsonElement(jsonObj.get("deployment_type")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("md5") != null && !jsonObj.get("md5").isJsonNull()) && !jsonObj.get("md5").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `md5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - if (jsonObj.get("ranges") != null && !jsonObj.get("ranges").isJsonNull()) { - JsonArray jsonArrayranges = jsonObj.getAsJsonArray("ranges"); - if (jsonArrayranges != null) { - // ensure the json data is an array - if (!jsonObj.get("ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ranges").toString())); - } - - // validate the optional field `ranges` (array) - for (int i = 0; i < jsonArrayranges.size(); i++) { - GlobalBgpRange.validateJsonElement(jsonArrayranges.get(i)); - }; - } - } - if ((jsonObj.get("route_object") != null && !jsonObj.get("route_object").isJsonNull()) && !jsonObj.get("route_object").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `route_object` to be a primitive type in the JSON string but got `%s`", jsonObj.get("route_object").toString())); - } - if (jsonObj.get("sessions") != null && !jsonObj.get("sessions").isJsonNull()) { - JsonArray jsonArraysessions = jsonObj.getAsJsonArray("sessions"); - if (jsonArraysessions != null) { - // ensure the json data is an array - if (!jsonObj.get("sessions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `sessions` to be an array in the JSON string but got `%s`", jsonObj.get("sessions").toString())); - } - - // validate the optional field `sessions` (array) - for (int i = 0; i < jsonArraysessions.size(); i++) { - BgpSession.validateJsonElement(jsonArraysessions.get(i)); - }; - } - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpConfig.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpConfig' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpConfig.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpConfig value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpConfig read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpConfig instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpConfig given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpConfig - * @throws IOException if the JSON string is invalid with respect to BgpConfig - */ - public static BgpConfig fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpConfig.class); - } - - /** - * Convert an instance of BgpConfig to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java deleted file mode 100644 index 4efeeb717..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInput.java +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpConfigRequestInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpConfigRequestInput { - public static final String SERIALIZED_NAME_ASN = "asn"; - @SerializedName(SERIALIZED_NAME_ASN) - private Integer asn; - - /** - * Wether the BGP deployment is local or global. Local deployments are configured immediately. Global deployments will need to be reviewed by Equinix Metal engineers. - */ - @JsonAdapter(DeploymentTypeEnum.Adapter.class) - public enum DeploymentTypeEnum { - LOCAL("local"), - - GLOBAL("global"); - - private String value; - - DeploymentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DeploymentTypeEnum fromValue(String value) { - for (DeploymentTypeEnum b : DeploymentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DeploymentTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DeploymentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DeploymentTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DeploymentTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DEPLOYMENT_TYPE = "deployment_type"; - @SerializedName(SERIALIZED_NAME_DEPLOYMENT_TYPE) - private DeploymentTypeEnum deploymentType; - - public static final String SERIALIZED_NAME_MD5 = "md5"; - @SerializedName(SERIALIZED_NAME_MD5) - private String md5; - - public static final String SERIALIZED_NAME_USE_CASE = "use_case"; - @SerializedName(SERIALIZED_NAME_USE_CASE) - private String useCase; - - public BgpConfigRequestInput() { - } - - public BgpConfigRequestInput asn(Integer asn) { - - this.asn = asn; - return this; - } - - /** - * Autonomous System Number for local BGP deployment. - * minimum: 0 - * maximum: 4294967295 - * @return asn - **/ - @javax.annotation.Nonnull - public Integer getAsn() { - return asn; - } - - - public void setAsn(Integer asn) { - this.asn = asn; - } - - - public BgpConfigRequestInput deploymentType(DeploymentTypeEnum deploymentType) { - - this.deploymentType = deploymentType; - return this; - } - - /** - * Wether the BGP deployment is local or global. Local deployments are configured immediately. Global deployments will need to be reviewed by Equinix Metal engineers. - * @return deploymentType - **/ - @javax.annotation.Nonnull - public DeploymentTypeEnum getDeploymentType() { - return deploymentType; - } - - - public void setDeploymentType(DeploymentTypeEnum deploymentType) { - this.deploymentType = deploymentType; - } - - - public BgpConfigRequestInput md5(String md5) { - - this.md5 = md5; - return this; - } - - /** - * The plaintext password to share between BGP neighbors as an MD5 checksum: * must be 10-20 characters long * may not include punctuation * must be a combination of numbers and letters * must contain at least one lowercase, uppercase, and digit character - * @return md5 - **/ - @javax.annotation.Nullable - public String getMd5() { - return md5; - } - - - public void setMd5(String md5) { - this.md5 = md5; - } - - - public BgpConfigRequestInput useCase(String useCase) { - - this.useCase = useCase; - return this; - } - - /** - * A use case explanation (necessary for global BGP request review). - * @return useCase - **/ - @javax.annotation.Nullable - public String getUseCase() { - return useCase; - } - - - public void setUseCase(String useCase) { - this.useCase = useCase; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpConfigRequestInput instance itself - */ - public BgpConfigRequestInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpConfigRequestInput bgpConfigRequestInput = (BgpConfigRequestInput) o; - return Objects.equals(this.asn, bgpConfigRequestInput.asn) && - Objects.equals(this.deploymentType, bgpConfigRequestInput.deploymentType) && - Objects.equals(this.md5, bgpConfigRequestInput.md5) && - Objects.equals(this.useCase, bgpConfigRequestInput.useCase)&& - Objects.equals(this.additionalProperties, bgpConfigRequestInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(asn, deploymentType, md5, useCase, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpConfigRequestInput {\n"); - sb.append(" asn: ").append(toIndentedString(asn)).append("\n"); - sb.append(" deploymentType: ").append(toIndentedString(deploymentType)).append("\n"); - sb.append(" md5: ").append(toIndentedString(md5)).append("\n"); - sb.append(" useCase: ").append(toIndentedString(useCase)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("asn"); - openapiFields.add("deployment_type"); - openapiFields.add("md5"); - openapiFields.add("use_case"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("asn"); - openapiRequiredFields.add("deployment_type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpConfigRequestInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpConfigRequestInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpConfigRequestInput is not found in the empty JSON string", BgpConfigRequestInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BgpConfigRequestInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("deployment_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `deployment_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deployment_type").toString())); - } - // validate the required field `deployment_type` - DeploymentTypeEnum.validateJsonElement(jsonObj.get("deployment_type")); - if ((jsonObj.get("md5") != null && !jsonObj.get("md5").isJsonNull()) && !jsonObj.get("md5").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `md5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5").toString())); - } - if ((jsonObj.get("use_case") != null && !jsonObj.get("use_case").isJsonNull()) && !jsonObj.get("use_case").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `use_case` to be a primitive type in the JSON string but got `%s`", jsonObj.get("use_case").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpConfigRequestInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpConfigRequestInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpConfigRequestInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpConfigRequestInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpConfigRequestInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpConfigRequestInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpConfigRequestInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpConfigRequestInput - * @throws IOException if the JSON string is invalid with respect to BgpConfigRequestInput - */ - public static BgpConfigRequestInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpConfigRequestInput.class); - } - - /** - * Convert an instance of BgpConfigRequestInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighbor.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighbor.java deleted file mode 100644 index 07cb77f4b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighbor.java +++ /dev/null @@ -1,603 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.UserLimited; -import com.equinix.openapi.metal.v1.model.VrfMetalGateway; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpDynamicNeighbor - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpDynamicNeighbor { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_BGP_NEIGHBOR_ASN = "bgp_neighbor_asn"; - @SerializedName(SERIALIZED_NAME_BGP_NEIGHBOR_ASN) - private Integer bgpNeighborAsn; - - public static final String SERIALIZED_NAME_BGP_NEIGHBOR_RANGE = "bgp_neighbor_range"; - @SerializedName(SERIALIZED_NAME_BGP_NEIGHBOR_RANGE) - private String bgpNeighborRange; - - public static final String SERIALIZED_NAME_METAL_GATEWAY = "metal_gateway"; - @SerializedName(SERIALIZED_NAME_METAL_GATEWAY) - private VrfMetalGateway metalGateway; - - /** - * Gets or Sets state - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - ACTIVE("active"), - - DELETING("deleting"), - - PENDING("pending"), - - READY("ready"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; - @SerializedName(SERIALIZED_NAME_CREATED_BY) - private UserLimited createdBy; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public BgpDynamicNeighbor() { - } - - - public BgpDynamicNeighbor( - UUID id, - StateEnum state, - String href, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.state = state; - this.href = href; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - /** - * The unique identifier for the resource - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - - - public BgpDynamicNeighbor bgpNeighborAsn(Integer bgpNeighborAsn) { - - this.bgpNeighborAsn = bgpNeighborAsn; - return this; - } - - /** - * The ASN of the dynamic BGP neighbor - * @return bgpNeighborAsn - **/ - @javax.annotation.Nullable - public Integer getBgpNeighborAsn() { - return bgpNeighborAsn; - } - - - public void setBgpNeighborAsn(Integer bgpNeighborAsn) { - this.bgpNeighborAsn = bgpNeighborAsn; - } - - - public BgpDynamicNeighbor bgpNeighborRange(String bgpNeighborRange) { - - this.bgpNeighborRange = bgpNeighborRange; - return this; - } - - /** - * Network range of the dynamic BGP neighbor in CIDR format - * @return bgpNeighborRange - **/ - @javax.annotation.Nullable - public String getBgpNeighborRange() { - return bgpNeighborRange; - } - - - public void setBgpNeighborRange(String bgpNeighborRange) { - this.bgpNeighborRange = bgpNeighborRange; - } - - - public BgpDynamicNeighbor metalGateway(VrfMetalGateway metalGateway) { - - this.metalGateway = metalGateway; - return this; - } - - /** - * Get metalGateway - * @return metalGateway - **/ - @javax.annotation.Nullable - public VrfMetalGateway getMetalGateway() { - return metalGateway; - } - - - public void setMetalGateway(VrfMetalGateway metalGateway) { - this.metalGateway = metalGateway; - } - - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - - public BgpDynamicNeighbor createdBy(UserLimited createdBy) { - - this.createdBy = createdBy; - return this; - } - - /** - * Get createdBy - * @return createdBy - **/ - @javax.annotation.Nullable - public UserLimited getCreatedBy() { - return createdBy; - } - - - public void setCreatedBy(UserLimited createdBy) { - this.createdBy = createdBy; - } - - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - - public BgpDynamicNeighbor tags(List tags) { - - this.tags = tags; - return this; - } - - public BgpDynamicNeighbor addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpDynamicNeighbor instance itself - */ - public BgpDynamicNeighbor putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpDynamicNeighbor bgpDynamicNeighbor = (BgpDynamicNeighbor) o; - return Objects.equals(this.id, bgpDynamicNeighbor.id) && - Objects.equals(this.bgpNeighborAsn, bgpDynamicNeighbor.bgpNeighborAsn) && - Objects.equals(this.bgpNeighborRange, bgpDynamicNeighbor.bgpNeighborRange) && - Objects.equals(this.metalGateway, bgpDynamicNeighbor.metalGateway) && - Objects.equals(this.state, bgpDynamicNeighbor.state) && - Objects.equals(this.href, bgpDynamicNeighbor.href) && - Objects.equals(this.createdAt, bgpDynamicNeighbor.createdAt) && - Objects.equals(this.createdBy, bgpDynamicNeighbor.createdBy) && - Objects.equals(this.updatedAt, bgpDynamicNeighbor.updatedAt) && - Objects.equals(this.tags, bgpDynamicNeighbor.tags)&& - Objects.equals(this.additionalProperties, bgpDynamicNeighbor.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, bgpNeighborAsn, bgpNeighborRange, metalGateway, state, href, createdAt, createdBy, updatedAt, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpDynamicNeighbor {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" bgpNeighborAsn: ").append(toIndentedString(bgpNeighborAsn)).append("\n"); - sb.append(" bgpNeighborRange: ").append(toIndentedString(bgpNeighborRange)).append("\n"); - sb.append(" metalGateway: ").append(toIndentedString(metalGateway)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("bgp_neighbor_asn"); - openapiFields.add("bgp_neighbor_range"); - openapiFields.add("metal_gateway"); - openapiFields.add("state"); - openapiFields.add("href"); - openapiFields.add("created_at"); - openapiFields.add("created_by"); - openapiFields.add("updated_at"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpDynamicNeighbor - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpDynamicNeighbor.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpDynamicNeighbor is not found in the empty JSON string", BgpDynamicNeighbor.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("bgp_neighbor_range") != null && !jsonObj.get("bgp_neighbor_range").isJsonNull()) && !jsonObj.get("bgp_neighbor_range").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bgp_neighbor_range` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bgp_neighbor_range").toString())); - } - // validate the optional field `metal_gateway` - if (jsonObj.get("metal_gateway") != null && !jsonObj.get("metal_gateway").isJsonNull()) { - VrfMetalGateway.validateJsonElement(jsonObj.get("metal_gateway")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - // validate the optional field `created_by` - if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { - UserLimited.validateJsonElement(jsonObj.get("created_by")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpDynamicNeighbor.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpDynamicNeighbor' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpDynamicNeighbor.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpDynamicNeighbor value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpDynamicNeighbor read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpDynamicNeighbor instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpDynamicNeighbor given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpDynamicNeighbor - * @throws IOException if the JSON string is invalid with respect to BgpDynamicNeighbor - */ - public static BgpDynamicNeighbor fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpDynamicNeighbor.class); - } - - /** - * Convert an instance of BgpDynamicNeighbor to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborCreateInput.java deleted file mode 100644 index 6c52d0a0a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborCreateInput.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpDynamicNeighborCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpDynamicNeighborCreateInput { - public static final String SERIALIZED_NAME_BGP_NEIGHBOR_RANGE = "bgp_neighbor_range"; - @SerializedName(SERIALIZED_NAME_BGP_NEIGHBOR_RANGE) - private String bgpNeighborRange; - - public static final String SERIALIZED_NAME_BGP_NEIGHBOR_ASN = "bgp_neighbor_asn"; - @SerializedName(SERIALIZED_NAME_BGP_NEIGHBOR_ASN) - private Integer bgpNeighborAsn; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public BgpDynamicNeighborCreateInput() { - } - - public BgpDynamicNeighborCreateInput bgpNeighborRange(String bgpNeighborRange) { - - this.bgpNeighborRange = bgpNeighborRange; - return this; - } - - /** - * Network range of the dynamic BGP neighbor in CIDR format - * @return bgpNeighborRange - **/ - @javax.annotation.Nonnull - public String getBgpNeighborRange() { - return bgpNeighborRange; - } - - - public void setBgpNeighborRange(String bgpNeighborRange) { - this.bgpNeighborRange = bgpNeighborRange; - } - - - public BgpDynamicNeighborCreateInput bgpNeighborAsn(Integer bgpNeighborAsn) { - - this.bgpNeighborAsn = bgpNeighborAsn; - return this; - } - - /** - * The ASN of the dynamic BGP neighbor - * @return bgpNeighborAsn - **/ - @javax.annotation.Nonnull - public Integer getBgpNeighborAsn() { - return bgpNeighborAsn; - } - - - public void setBgpNeighborAsn(Integer bgpNeighborAsn) { - this.bgpNeighborAsn = bgpNeighborAsn; - } - - - public BgpDynamicNeighborCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public BgpDynamicNeighborCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpDynamicNeighborCreateInput instance itself - */ - public BgpDynamicNeighborCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpDynamicNeighborCreateInput bgpDynamicNeighborCreateInput = (BgpDynamicNeighborCreateInput) o; - return Objects.equals(this.bgpNeighborRange, bgpDynamicNeighborCreateInput.bgpNeighborRange) && - Objects.equals(this.bgpNeighborAsn, bgpDynamicNeighborCreateInput.bgpNeighborAsn) && - Objects.equals(this.tags, bgpDynamicNeighborCreateInput.tags)&& - Objects.equals(this.additionalProperties, bgpDynamicNeighborCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bgpNeighborRange, bgpNeighborAsn, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpDynamicNeighborCreateInput {\n"); - sb.append(" bgpNeighborRange: ").append(toIndentedString(bgpNeighborRange)).append("\n"); - sb.append(" bgpNeighborAsn: ").append(toIndentedString(bgpNeighborAsn)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bgp_neighbor_range"); - openapiFields.add("bgp_neighbor_asn"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("bgp_neighbor_range"); - openapiRequiredFields.add("bgp_neighbor_asn"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpDynamicNeighborCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpDynamicNeighborCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpDynamicNeighborCreateInput is not found in the empty JSON string", BgpDynamicNeighborCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BgpDynamicNeighborCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("bgp_neighbor_range").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bgp_neighbor_range` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bgp_neighbor_range").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpDynamicNeighborCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpDynamicNeighborCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpDynamicNeighborCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpDynamicNeighborCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpDynamicNeighborCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpDynamicNeighborCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpDynamicNeighborCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpDynamicNeighborCreateInput - * @throws IOException if the JSON string is invalid with respect to BgpDynamicNeighborCreateInput - */ - public static BgpDynamicNeighborCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpDynamicNeighborCreateInput.class); - } - - /** - * Convert an instance of BgpDynamicNeighborCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborList.java deleted file mode 100644 index c30e8c86f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.BgpDynamicNeighbor; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpDynamicNeighborList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpDynamicNeighborList { - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS = "bgp_dynamic_neighbors"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS) - private List bgpDynamicNeighbors; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public BgpDynamicNeighborList() { - } - - public BgpDynamicNeighborList bgpDynamicNeighbors(List bgpDynamicNeighbors) { - - this.bgpDynamicNeighbors = bgpDynamicNeighbors; - return this; - } - - public BgpDynamicNeighborList addBgpDynamicNeighborsItem(BgpDynamicNeighbor bgpDynamicNeighborsItem) { - if (this.bgpDynamicNeighbors == null) { - this.bgpDynamicNeighbors = new ArrayList<>(); - } - this.bgpDynamicNeighbors.add(bgpDynamicNeighborsItem); - return this; - } - - /** - * Get bgpDynamicNeighbors - * @return bgpDynamicNeighbors - **/ - @javax.annotation.Nullable - public List getBgpDynamicNeighbors() { - return bgpDynamicNeighbors; - } - - - public void setBgpDynamicNeighbors(List bgpDynamicNeighbors) { - this.bgpDynamicNeighbors = bgpDynamicNeighbors; - } - - - public BgpDynamicNeighborList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpDynamicNeighborList instance itself - */ - public BgpDynamicNeighborList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpDynamicNeighborList bgpDynamicNeighborList = (BgpDynamicNeighborList) o; - return Objects.equals(this.bgpDynamicNeighbors, bgpDynamicNeighborList.bgpDynamicNeighbors) && - Objects.equals(this.meta, bgpDynamicNeighborList.meta)&& - Objects.equals(this.additionalProperties, bgpDynamicNeighborList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bgpDynamicNeighbors, meta, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpDynamicNeighborList {\n"); - sb.append(" bgpDynamicNeighbors: ").append(toIndentedString(bgpDynamicNeighbors)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bgp_dynamic_neighbors"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpDynamicNeighborList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpDynamicNeighborList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpDynamicNeighborList is not found in the empty JSON string", BgpDynamicNeighborList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("bgp_dynamic_neighbors") != null && !jsonObj.get("bgp_dynamic_neighbors").isJsonNull()) { - JsonArray jsonArraybgpDynamicNeighbors = jsonObj.getAsJsonArray("bgp_dynamic_neighbors"); - if (jsonArraybgpDynamicNeighbors != null) { - // ensure the json data is an array - if (!jsonObj.get("bgp_dynamic_neighbors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bgp_dynamic_neighbors` to be an array in the JSON string but got `%s`", jsonObj.get("bgp_dynamic_neighbors").toString())); - } - - // validate the optional field `bgp_dynamic_neighbors` (array) - for (int i = 0; i < jsonArraybgpDynamicNeighbors.size(); i++) { - BgpDynamicNeighbor.validateJsonElement(jsonArraybgpDynamicNeighbors.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpDynamicNeighborList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpDynamicNeighborList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpDynamicNeighborList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpDynamicNeighborList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpDynamicNeighborList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpDynamicNeighborList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpDynamicNeighborList given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpDynamicNeighborList - * @throws IOException if the JSON string is invalid with respect to BgpDynamicNeighborList - */ - public static BgpDynamicNeighborList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpDynamicNeighborList.class); - } - - /** - * Convert an instance of BgpDynamicNeighborList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java deleted file mode 100644 index 81ad90506..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpNeighborData.java +++ /dev/null @@ -1,599 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.BgpRoute; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpNeighborData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpNeighborData { - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private Integer addressFamily; - - public static final String SERIALIZED_NAME_CUSTOMER_AS = "customer_as"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_AS) - private Integer customerAs; - - public static final String SERIALIZED_NAME_CUSTOMER_IP = "customer_ip"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_IP) - private String customerIp; - - public static final String SERIALIZED_NAME_MD5_ENABLED = "md5_enabled"; - @SerializedName(SERIALIZED_NAME_MD5_ENABLED) - private Boolean md5Enabled; - - public static final String SERIALIZED_NAME_MD5_PASSWORD = "md5_password"; - @SerializedName(SERIALIZED_NAME_MD5_PASSWORD) - private String md5Password; - - public static final String SERIALIZED_NAME_MULTIHOP = "multihop"; - @SerializedName(SERIALIZED_NAME_MULTIHOP) - private Boolean multihop; - - public static final String SERIALIZED_NAME_PEER_AS = "peer_as"; - @SerializedName(SERIALIZED_NAME_PEER_AS) - private Integer peerAs; - - public static final String SERIALIZED_NAME_PEER_IPS = "peer_ips"; - @SerializedName(SERIALIZED_NAME_PEER_IPS) - private List peerIps; - - public static final String SERIALIZED_NAME_ROUTES_IN = "routes_in"; - @SerializedName(SERIALIZED_NAME_ROUTES_IN) - private List routesIn; - - public static final String SERIALIZED_NAME_ROUTES_OUT = "routes_out"; - @SerializedName(SERIALIZED_NAME_ROUTES_OUT) - private List routesOut; - - public BgpNeighborData() { - } - - public BgpNeighborData addressFamily(Integer addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Address Family for IP Address. Accepted values are 4 or 6 - * @return addressFamily - **/ - @javax.annotation.Nullable - public Integer getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(Integer addressFamily) { - this.addressFamily = addressFamily; - } - - - public BgpNeighborData customerAs(Integer customerAs) { - - this.customerAs = customerAs; - return this; - } - - /** - * The customer's ASN. In a local BGP deployment, this will be an internal ASN used to route within the data center. For a global BGP deployment, this will be the your own ASN, configured when you set up BGP for your project. - * @return customerAs - **/ - @javax.annotation.Nullable - public Integer getCustomerAs() { - return customerAs; - } - - - public void setCustomerAs(Integer customerAs) { - this.customerAs = customerAs; - } - - - public BgpNeighborData customerIp(String customerIp) { - - this.customerIp = customerIp; - return this; - } - - /** - * The device's IP address. For an IPv4 BGP session, this is typically the private bond0 address for the device. - * @return customerIp - **/ - @javax.annotation.Nullable - public String getCustomerIp() { - return customerIp; - } - - - public void setCustomerIp(String customerIp) { - this.customerIp = customerIp; - } - - - public BgpNeighborData md5Enabled(Boolean md5Enabled) { - - this.md5Enabled = md5Enabled; - return this; - } - - /** - * True if an MD5 password is configured for the project. - * @return md5Enabled - **/ - @javax.annotation.Nullable - public Boolean getMd5Enabled() { - return md5Enabled; - } - - - public void setMd5Enabled(Boolean md5Enabled) { - this.md5Enabled = md5Enabled; - } - - - public BgpNeighborData md5Password(String md5Password) { - - this.md5Password = md5Password; - return this; - } - - /** - * The MD5 password configured for the project, if set. - * @return md5Password - **/ - @javax.annotation.Nullable - public String getMd5Password() { - return md5Password; - } - - - public void setMd5Password(String md5Password) { - this.md5Password = md5Password; - } - - - public BgpNeighborData multihop(Boolean multihop) { - - this.multihop = multihop; - return this; - } - - /** - * True when the BGP session should be configured as multihop. - * @return multihop - **/ - @javax.annotation.Nullable - public Boolean getMultihop() { - return multihop; - } - - - public void setMultihop(Boolean multihop) { - this.multihop = multihop; - } - - - public BgpNeighborData peerAs(Integer peerAs) { - - this.peerAs = peerAs; - return this; - } - - /** - * The Peer ASN to use when configuring BGP on your device. - * @return peerAs - **/ - @javax.annotation.Nullable - public Integer getPeerAs() { - return peerAs; - } - - - public void setPeerAs(Integer peerAs) { - this.peerAs = peerAs; - } - - - public BgpNeighborData peerIps(List peerIps) { - - this.peerIps = peerIps; - return this; - } - - public BgpNeighborData addPeerIpsItem(String peerIpsItem) { - if (this.peerIps == null) { - this.peerIps = new ArrayList<>(); - } - this.peerIps.add(peerIpsItem); - return this; - } - - /** - * A list of one or more IP addresses to use for the Peer IP section of your BGP configuration. For non-multihop sessions, this will typically be a single gateway address for the device. For multihop sessions, it will be a list of IPs. - * @return peerIps - **/ - @javax.annotation.Nullable - public List getPeerIps() { - return peerIps; - } - - - public void setPeerIps(List peerIps) { - this.peerIps = peerIps; - } - - - public BgpNeighborData routesIn(List routesIn) { - - this.routesIn = routesIn; - return this; - } - - public BgpNeighborData addRoutesInItem(BgpRoute routesInItem) { - if (this.routesIn == null) { - this.routesIn = new ArrayList<>(); - } - this.routesIn.add(routesInItem); - return this; - } - - /** - * A list of project subnets - * @return routesIn - **/ - @javax.annotation.Nullable - public List getRoutesIn() { - return routesIn; - } - - - public void setRoutesIn(List routesIn) { - this.routesIn = routesIn; - } - - - public BgpNeighborData routesOut(List routesOut) { - - this.routesOut = routesOut; - return this; - } - - public BgpNeighborData addRoutesOutItem(BgpRoute routesOutItem) { - if (this.routesOut == null) { - this.routesOut = new ArrayList<>(); - } - this.routesOut.add(routesOutItem); - return this; - } - - /** - * A list of outgoing routes. Only populated if the BGP session has default route enabled. - * @return routesOut - **/ - @javax.annotation.Nullable - public List getRoutesOut() { - return routesOut; - } - - - public void setRoutesOut(List routesOut) { - this.routesOut = routesOut; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpNeighborData instance itself - */ - public BgpNeighborData putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpNeighborData bgpNeighborData = (BgpNeighborData) o; - return Objects.equals(this.addressFamily, bgpNeighborData.addressFamily) && - Objects.equals(this.customerAs, bgpNeighborData.customerAs) && - Objects.equals(this.customerIp, bgpNeighborData.customerIp) && - Objects.equals(this.md5Enabled, bgpNeighborData.md5Enabled) && - Objects.equals(this.md5Password, bgpNeighborData.md5Password) && - Objects.equals(this.multihop, bgpNeighborData.multihop) && - Objects.equals(this.peerAs, bgpNeighborData.peerAs) && - Objects.equals(this.peerIps, bgpNeighborData.peerIps) && - Objects.equals(this.routesIn, bgpNeighborData.routesIn) && - Objects.equals(this.routesOut, bgpNeighborData.routesOut)&& - Objects.equals(this.additionalProperties, bgpNeighborData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(addressFamily, customerAs, customerIp, md5Enabled, md5Password, multihop, peerAs, peerIps, routesIn, routesOut, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpNeighborData {\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" customerAs: ").append(toIndentedString(customerAs)).append("\n"); - sb.append(" customerIp: ").append(toIndentedString(customerIp)).append("\n"); - sb.append(" md5Enabled: ").append(toIndentedString(md5Enabled)).append("\n"); - sb.append(" md5Password: ").append(toIndentedString(md5Password)).append("\n"); - sb.append(" multihop: ").append(toIndentedString(multihop)).append("\n"); - sb.append(" peerAs: ").append(toIndentedString(peerAs)).append("\n"); - sb.append(" peerIps: ").append(toIndentedString(peerIps)).append("\n"); - sb.append(" routesIn: ").append(toIndentedString(routesIn)).append("\n"); - sb.append(" routesOut: ").append(toIndentedString(routesOut)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address_family"); - openapiFields.add("customer_as"); - openapiFields.add("customer_ip"); - openapiFields.add("md5_enabled"); - openapiFields.add("md5_password"); - openapiFields.add("multihop"); - openapiFields.add("peer_as"); - openapiFields.add("peer_ips"); - openapiFields.add("routes_in"); - openapiFields.add("routes_out"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpNeighborData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpNeighborData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpNeighborData is not found in the empty JSON string", BgpNeighborData.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("customer_ip") != null && !jsonObj.get("customer_ip").isJsonNull()) && !jsonObj.get("customer_ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customer_ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_ip").toString())); - } - if ((jsonObj.get("md5_password") != null && !jsonObj.get("md5_password").isJsonNull()) && !jsonObj.get("md5_password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `md5_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5_password").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("peer_ips") != null && !jsonObj.get("peer_ips").isJsonNull() && !jsonObj.get("peer_ips").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `peer_ips` to be an array in the JSON string but got `%s`", jsonObj.get("peer_ips").toString())); - } - if (jsonObj.get("routes_in") != null && !jsonObj.get("routes_in").isJsonNull()) { - JsonArray jsonArrayroutesIn = jsonObj.getAsJsonArray("routes_in"); - if (jsonArrayroutesIn != null) { - // ensure the json data is an array - if (!jsonObj.get("routes_in").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `routes_in` to be an array in the JSON string but got `%s`", jsonObj.get("routes_in").toString())); - } - - // validate the optional field `routes_in` (array) - for (int i = 0; i < jsonArrayroutesIn.size(); i++) { - BgpRoute.validateJsonElement(jsonArrayroutesIn.get(i)); - }; - } - } - if (jsonObj.get("routes_out") != null && !jsonObj.get("routes_out").isJsonNull()) { - JsonArray jsonArrayroutesOut = jsonObj.getAsJsonArray("routes_out"); - if (jsonArrayroutesOut != null) { - // ensure the json data is an array - if (!jsonObj.get("routes_out").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `routes_out` to be an array in the JSON string but got `%s`", jsonObj.get("routes_out").toString())); - } - - // validate the optional field `routes_out` (array) - for (int i = 0; i < jsonArrayroutesOut.size(); i++) { - BgpRoute.validateJsonElement(jsonArrayroutesOut.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpNeighborData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpNeighborData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpNeighborData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpNeighborData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpNeighborData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpNeighborData instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpNeighborData given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpNeighborData - * @throws IOException if the JSON string is invalid with respect to BgpNeighborData - */ - public static BgpNeighborData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpNeighborData.class); - } - - /** - * Convert an instance of BgpNeighborData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpRoute.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpRoute.java deleted file mode 100644 index 93cac5576..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpRoute.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpRoute - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpRoute { - public static final String SERIALIZED_NAME_EXACT = "exact"; - @SerializedName(SERIALIZED_NAME_EXACT) - private Boolean exact; - - public static final String SERIALIZED_NAME_ROUTE = "route"; - @SerializedName(SERIALIZED_NAME_ROUTE) - private String route; - - public BgpRoute() { - } - - public BgpRoute exact(Boolean exact) { - - this.exact = exact; - return this; - } - - /** - * Get exact - * @return exact - **/ - @javax.annotation.Nullable - public Boolean getExact() { - return exact; - } - - - public void setExact(Boolean exact) { - this.exact = exact; - } - - - public BgpRoute route(String route) { - - this.route = route; - return this; - } - - /** - * Get route - * @return route - **/ - @javax.annotation.Nullable - public String getRoute() { - return route; - } - - - public void setRoute(String route) { - this.route = route; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpRoute instance itself - */ - public BgpRoute putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpRoute bgpRoute = (BgpRoute) o; - return Objects.equals(this.exact, bgpRoute.exact) && - Objects.equals(this.route, bgpRoute.route)&& - Objects.equals(this.additionalProperties, bgpRoute.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(exact, route, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpRoute {\n"); - sb.append(" exact: ").append(toIndentedString(exact)).append("\n"); - sb.append(" route: ").append(toIndentedString(route)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("exact"); - openapiFields.add("route"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpRoute - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpRoute.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpRoute is not found in the empty JSON string", BgpRoute.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("route") != null && !jsonObj.get("route").isJsonNull()) && !jsonObj.get("route").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `route` to be a primitive type in the JSON string but got `%s`", jsonObj.get("route").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpRoute.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpRoute' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpRoute.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpRoute value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpRoute read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpRoute instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpRoute given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpRoute - * @throws IOException if the JSON string is invalid with respect to BgpRoute - */ - public static BgpRoute fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpRoute.class); - } - - /** - * Convert an instance of BgpRoute to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java deleted file mode 100644 index 2c7635d30..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSession.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpSession - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpSession { - /** - * Gets or Sets addressFamily - */ - @JsonAdapter(AddressFamilyEnum.Adapter.class) - public enum AddressFamilyEnum { - IPV4("ipv4"), - - IPV6("ipv6"); - - private String value; - - AddressFamilyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AddressFamilyEnum fromValue(String value) { - for (AddressFamilyEnum b : AddressFamilyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AddressFamilyEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AddressFamilyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return AddressFamilyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - AddressFamilyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private AddressFamilyEnum addressFamily; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_DEFAULT_ROUTE = "default_route"; - @SerializedName(SERIALIZED_NAME_DEFAULT_ROUTE) - private Boolean defaultRoute; - - public static final String SERIALIZED_NAME_DEVICE = "device"; - @SerializedName(SERIALIZED_NAME_DEVICE) - private Href device; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LEARNED_ROUTES = "learned_routes"; - @SerializedName(SERIALIZED_NAME_LEARNED_ROUTES) - private List learnedRoutes; - - /** - * The status of the BGP Session. Multiple status values may be reported when the device is connected to multiple switches, one value per switch. Each status will start with \"unknown\" and progress to \"up\" or \"down\" depending on the connected device. Subsequent \"unknown\" values indicate a problem acquiring status from the switch. - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - UNKNOWN("unknown"), - - UP("up"), - - DOWN("down"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public BgpSession() { - } - - public BgpSession addressFamily(AddressFamilyEnum addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Get addressFamily - * @return addressFamily - **/ - @javax.annotation.Nonnull - public AddressFamilyEnum getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(AddressFamilyEnum addressFamily) { - this.addressFamily = addressFamily; - } - - - public BgpSession createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public BgpSession defaultRoute(Boolean defaultRoute) { - - this.defaultRoute = defaultRoute; - return this; - } - - /** - * Get defaultRoute - * @return defaultRoute - **/ - @javax.annotation.Nullable - public Boolean getDefaultRoute() { - return defaultRoute; - } - - - public void setDefaultRoute(Boolean defaultRoute) { - this.defaultRoute = defaultRoute; - } - - - public BgpSession device(Href device) { - - this.device = device; - return this; - } - - /** - * Get device - * @return device - **/ - @javax.annotation.Nullable - public Href getDevice() { - return device; - } - - - public void setDevice(Href device) { - this.device = device; - } - - - public BgpSession href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public BgpSession id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public BgpSession learnedRoutes(List learnedRoutes) { - - this.learnedRoutes = learnedRoutes; - return this; - } - - public BgpSession addLearnedRoutesItem(String learnedRoutesItem) { - if (this.learnedRoutes == null) { - this.learnedRoutes = new ArrayList<>(); - } - this.learnedRoutes.add(learnedRoutesItem); - return this; - } - - /** - * Get learnedRoutes - * @return learnedRoutes - **/ - @javax.annotation.Nullable - public List getLearnedRoutes() { - return learnedRoutes; - } - - - public void setLearnedRoutes(List learnedRoutes) { - this.learnedRoutes = learnedRoutes; - } - - - public BgpSession status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * The status of the BGP Session. Multiple status values may be reported when the device is connected to multiple switches, one value per switch. Each status will start with \"unknown\" and progress to \"up\" or \"down\" depending on the connected device. Subsequent \"unknown\" values indicate a problem acquiring status from the switch. - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public BgpSession updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpSession instance itself - */ - public BgpSession putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpSession bgpSession = (BgpSession) o; - return Objects.equals(this.addressFamily, bgpSession.addressFamily) && - Objects.equals(this.createdAt, bgpSession.createdAt) && - Objects.equals(this.defaultRoute, bgpSession.defaultRoute) && - Objects.equals(this.device, bgpSession.device) && - Objects.equals(this.href, bgpSession.href) && - Objects.equals(this.id, bgpSession.id) && - Objects.equals(this.learnedRoutes, bgpSession.learnedRoutes) && - Objects.equals(this.status, bgpSession.status) && - Objects.equals(this.updatedAt, bgpSession.updatedAt)&& - Objects.equals(this.additionalProperties, bgpSession.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(addressFamily, createdAt, defaultRoute, device, href, id, learnedRoutes, status, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpSession {\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" defaultRoute: ").append(toIndentedString(defaultRoute)).append("\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" learnedRoutes: ").append(toIndentedString(learnedRoutes)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address_family"); - openapiFields.add("created_at"); - openapiFields.add("default_route"); - openapiFields.add("device"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("learned_routes"); - openapiFields.add("status"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address_family"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpSession - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpSession.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpSession is not found in the empty JSON string", BgpSession.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : BgpSession.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("address_family").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address_family` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address_family").toString())); - } - // validate the required field `address_family` - AddressFamilyEnum.validateJsonElement(jsonObj.get("address_family")); - // validate the optional field `device` - if (jsonObj.get("device") != null && !jsonObj.get("device").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("device")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("learned_routes") != null && !jsonObj.get("learned_routes").isJsonNull() && !jsonObj.get("learned_routes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `learned_routes` to be an array in the JSON string but got `%s`", jsonObj.get("learned_routes").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpSession.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpSession' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpSession.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpSession value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpSession read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpSession instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpSession given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpSession - * @throws IOException if the JSON string is invalid with respect to BgpSession - */ - public static BgpSession fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpSession.class); - } - - /** - * Convert an instance of BgpSession to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java deleted file mode 100644 index 007a9c7fb..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.BgpSession; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpSessionList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpSessionList { - public static final String SERIALIZED_NAME_BGP_SESSIONS = "bgp_sessions"; - @SerializedName(SERIALIZED_NAME_BGP_SESSIONS) - private List bgpSessions; - - public BgpSessionList() { - } - - public BgpSessionList bgpSessions(List bgpSessions) { - - this.bgpSessions = bgpSessions; - return this; - } - - public BgpSessionList addBgpSessionsItem(BgpSession bgpSessionsItem) { - if (this.bgpSessions == null) { - this.bgpSessions = new ArrayList<>(); - } - this.bgpSessions.add(bgpSessionsItem); - return this; - } - - /** - * Get bgpSessions - * @return bgpSessions - **/ - @javax.annotation.Nullable - public List getBgpSessions() { - return bgpSessions; - } - - - public void setBgpSessions(List bgpSessions) { - this.bgpSessions = bgpSessions; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpSessionList instance itself - */ - public BgpSessionList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpSessionList bgpSessionList = (BgpSessionList) o; - return Objects.equals(this.bgpSessions, bgpSessionList.bgpSessions)&& - Objects.equals(this.additionalProperties, bgpSessionList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bgpSessions, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpSessionList {\n"); - sb.append(" bgpSessions: ").append(toIndentedString(bgpSessions)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bgp_sessions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpSessionList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpSessionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpSessionList is not found in the empty JSON string", BgpSessionList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("bgp_sessions") != null && !jsonObj.get("bgp_sessions").isJsonNull()) { - JsonArray jsonArraybgpSessions = jsonObj.getAsJsonArray("bgp_sessions"); - if (jsonArraybgpSessions != null) { - // ensure the json data is an array - if (!jsonObj.get("bgp_sessions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bgp_sessions` to be an array in the JSON string but got `%s`", jsonObj.get("bgp_sessions").toString())); - } - - // validate the optional field `bgp_sessions` (array) - for (int i = 0; i < jsonArraybgpSessions.size(); i++) { - BgpSession.validateJsonElement(jsonArraybgpSessions.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpSessionList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpSessionList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpSessionList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpSessionList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpSessionList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpSessionList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpSessionList given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpSessionList - * @throws IOException if the JSON string is invalid with respect to BgpSessionList - */ - public static BgpSessionList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpSessionList.class); - } - - /** - * Convert an instance of BgpSessionList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java deleted file mode 100644 index 48226ea27..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighbors.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.BgpNeighborData; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BgpSessionNeighbors - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BgpSessionNeighbors { - public static final String SERIALIZED_NAME_BGP_NEIGHBORS = "bgp_neighbors"; - @SerializedName(SERIALIZED_NAME_BGP_NEIGHBORS) - private List bgpNeighbors; - - public BgpSessionNeighbors() { - } - - public BgpSessionNeighbors bgpNeighbors(List bgpNeighbors) { - - this.bgpNeighbors = bgpNeighbors; - return this; - } - - public BgpSessionNeighbors addBgpNeighborsItem(BgpNeighborData bgpNeighborsItem) { - if (this.bgpNeighbors == null) { - this.bgpNeighbors = new ArrayList<>(); - } - this.bgpNeighbors.add(bgpNeighborsItem); - return this; - } - - /** - * A list of BGP session neighbor data - * @return bgpNeighbors - **/ - @javax.annotation.Nullable - public List getBgpNeighbors() { - return bgpNeighbors; - } - - - public void setBgpNeighbors(List bgpNeighbors) { - this.bgpNeighbors = bgpNeighbors; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BgpSessionNeighbors instance itself - */ - public BgpSessionNeighbors putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BgpSessionNeighbors bgpSessionNeighbors = (BgpSessionNeighbors) o; - return Objects.equals(this.bgpNeighbors, bgpSessionNeighbors.bgpNeighbors)&& - Objects.equals(this.additionalProperties, bgpSessionNeighbors.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bgpNeighbors, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BgpSessionNeighbors {\n"); - sb.append(" bgpNeighbors: ").append(toIndentedString(bgpNeighbors)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bgp_neighbors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BgpSessionNeighbors - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BgpSessionNeighbors.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BgpSessionNeighbors is not found in the empty JSON string", BgpSessionNeighbors.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("bgp_neighbors") != null && !jsonObj.get("bgp_neighbors").isJsonNull()) { - JsonArray jsonArraybgpNeighbors = jsonObj.getAsJsonArray("bgp_neighbors"); - if (jsonArraybgpNeighbors != null) { - // ensure the json data is an array - if (!jsonObj.get("bgp_neighbors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `bgp_neighbors` to be an array in the JSON string but got `%s`", jsonObj.get("bgp_neighbors").toString())); - } - - // validate the optional field `bgp_neighbors` (array) - for (int i = 0; i < jsonArraybgpNeighbors.size(); i++) { - BgpNeighborData.validateJsonElement(jsonArraybgpNeighbors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BgpSessionNeighbors.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BgpSessionNeighbors' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BgpSessionNeighbors.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BgpSessionNeighbors value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BgpSessionNeighbors read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BgpSessionNeighbors instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BgpSessionNeighbors given an JSON string - * - * @param jsonString JSON string - * @return An instance of BgpSessionNeighbors - * @throws IOException if the JSON string is invalid with respect to BgpSessionNeighbors - */ - public static BgpSessionNeighbors fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BgpSessionNeighbors.class); - } - - /** - * Convert an instance of BgpSessionNeighbors to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BondPortData.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BondPortData.java deleted file mode 100644 index c219973c1..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/BondPortData.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * BondPortData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BondPortData { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public BondPortData() { - } - - public BondPortData id(UUID id) { - - this.id = id; - return this; - } - - /** - * ID of the bonding port - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public BondPortData name(String name) { - - this.name = name; - return this; - } - - /** - * Name of the port interface for the bond (\"bond0\") - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the BondPortData instance itself - */ - public BondPortData putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BondPortData bondPortData = (BondPortData) o; - return Objects.equals(this.id, bondPortData.id) && - Objects.equals(this.name, bondPortData.name)&& - Objects.equals(this.additionalProperties, bondPortData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BondPortData {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BondPortData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BondPortData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BondPortData is not found in the empty JSON string", BondPortData.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BondPortData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BondPortData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BondPortData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BondPortData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public BondPortData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BondPortData instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BondPortData given an JSON string - * - * @param jsonString JSON string - * @return An instance of BondPortData - * @throws IOException if the JSON string is invalid with respect to BondPortData - */ - public static BondPortData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BondPortData.class); - } - - /** - * Convert an instance of BondPortData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java deleted file mode 100644 index 137d562dd..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfo.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CapacityCheckPerFacilityInfo - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CapacityCheckPerFacilityInfo { - public static final String SERIALIZED_NAME_AVAILABLE = "available"; - @SerializedName(SERIALIZED_NAME_AVAILABLE) - private Boolean available; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private String facility; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private String quantity; - - public CapacityCheckPerFacilityInfo() { - } - - public CapacityCheckPerFacilityInfo available(Boolean available) { - - this.available = available; - return this; - } - - /** - * Get available - * @return available - **/ - @javax.annotation.Nullable - public Boolean getAvailable() { - return available; - } - - - public void setAvailable(Boolean available) { - this.available = available; - } - - - public CapacityCheckPerFacilityInfo facility(String facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - **/ - @javax.annotation.Nullable - public String getFacility() { - return facility; - } - - - public void setFacility(String facility) { - this.facility = facility; - } - - - public CapacityCheckPerFacilityInfo plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * Get plan - * @return plan - **/ - @javax.annotation.Nullable - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public CapacityCheckPerFacilityInfo quantity(String quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - public String getQuantity() { - return quantity; - } - - - public void setQuantity(String quantity) { - this.quantity = quantity; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CapacityCheckPerFacilityInfo instance itself - */ - public CapacityCheckPerFacilityInfo putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapacityCheckPerFacilityInfo capacityCheckPerFacilityInfo = (CapacityCheckPerFacilityInfo) o; - return Objects.equals(this.available, capacityCheckPerFacilityInfo.available) && - Objects.equals(this.facility, capacityCheckPerFacilityInfo.facility) && - Objects.equals(this.plan, capacityCheckPerFacilityInfo.plan) && - Objects.equals(this.quantity, capacityCheckPerFacilityInfo.quantity)&& - Objects.equals(this.additionalProperties, capacityCheckPerFacilityInfo.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(available, facility, plan, quantity, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapacityCheckPerFacilityInfo {\n"); - sb.append(" available: ").append(toIndentedString(available)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("available"); - openapiFields.add("facility"); - openapiFields.add("plan"); - openapiFields.add("quantity"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CapacityCheckPerFacilityInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CapacityCheckPerFacilityInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityCheckPerFacilityInfo is not found in the empty JSON string", CapacityCheckPerFacilityInfo.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) && !jsonObj.get("facility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CapacityCheckPerFacilityInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CapacityCheckPerFacilityInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CapacityCheckPerFacilityInfo.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CapacityCheckPerFacilityInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CapacityCheckPerFacilityInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CapacityCheckPerFacilityInfo instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CapacityCheckPerFacilityInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of CapacityCheckPerFacilityInfo - * @throws IOException if the JSON string is invalid with respect to CapacityCheckPerFacilityInfo - */ - public static CapacityCheckPerFacilityInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CapacityCheckPerFacilityInfo.class); - } - - /** - * Convert an instance of CapacityCheckPerFacilityInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java deleted file mode 100644 index 0b8bc2e63..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.CapacityCheckPerFacilityInfo; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CapacityCheckPerFacilityList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CapacityCheckPerFacilityList { - public static final String SERIALIZED_NAME_SERVERS = "servers"; - @SerializedName(SERIALIZED_NAME_SERVERS) - private List servers; - - public CapacityCheckPerFacilityList() { - } - - public CapacityCheckPerFacilityList servers(List servers) { - - this.servers = servers; - return this; - } - - public CapacityCheckPerFacilityList addServersItem(CapacityCheckPerFacilityInfo serversItem) { - if (this.servers == null) { - this.servers = new ArrayList<>(); - } - this.servers.add(serversItem); - return this; - } - - /** - * Get servers - * @return servers - **/ - @javax.annotation.Nullable - public List getServers() { - return servers; - } - - - public void setServers(List servers) { - this.servers = servers; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CapacityCheckPerFacilityList instance itself - */ - public CapacityCheckPerFacilityList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapacityCheckPerFacilityList capacityCheckPerFacilityList = (CapacityCheckPerFacilityList) o; - return Objects.equals(this.servers, capacityCheckPerFacilityList.servers)&& - Objects.equals(this.additionalProperties, capacityCheckPerFacilityList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(servers, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapacityCheckPerFacilityList {\n"); - sb.append(" servers: ").append(toIndentedString(servers)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("servers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CapacityCheckPerFacilityList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CapacityCheckPerFacilityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityCheckPerFacilityList is not found in the empty JSON string", CapacityCheckPerFacilityList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("servers") != null && !jsonObj.get("servers").isJsonNull()) { - JsonArray jsonArrayservers = jsonObj.getAsJsonArray("servers"); - if (jsonArrayservers != null) { - // ensure the json data is an array - if (!jsonObj.get("servers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `servers` to be an array in the JSON string but got `%s`", jsonObj.get("servers").toString())); - } - - // validate the optional field `servers` (array) - for (int i = 0; i < jsonArrayservers.size(); i++) { - CapacityCheckPerFacilityInfo.validateJsonElement(jsonArrayservers.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CapacityCheckPerFacilityList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CapacityCheckPerFacilityList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CapacityCheckPerFacilityList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CapacityCheckPerFacilityList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CapacityCheckPerFacilityList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CapacityCheckPerFacilityList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CapacityCheckPerFacilityList given an JSON string - * - * @param jsonString JSON string - * @return An instance of CapacityCheckPerFacilityList - * @throws IOException if the JSON string is invalid with respect to CapacityCheckPerFacilityList - */ - public static CapacityCheckPerFacilityList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CapacityCheckPerFacilityList.class); - } - - /** - * Convert an instance of CapacityCheckPerFacilityList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java deleted file mode 100644 index 2471cd613..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfo.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CapacityCheckPerMetroInfo - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CapacityCheckPerMetroInfo { - public static final String SERIALIZED_NAME_AVAILABLE = "available"; - @SerializedName(SERIALIZED_NAME_AVAILABLE) - private Boolean available; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private String quantity; - - public CapacityCheckPerMetroInfo() { - } - - public CapacityCheckPerMetroInfo available(Boolean available) { - - this.available = available; - return this; - } - - /** - * Returns true if there is enough capacity in the metro to fulfill the quantity set. Returns false if there is not enough. - * @return available - **/ - @javax.annotation.Nullable - public Boolean getAvailable() { - return available; - } - - - public void setAvailable(Boolean available) { - this.available = available; - } - - - public CapacityCheckPerMetroInfo metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * The metro ID or code sent to check capacity. - * @return metro - **/ - @javax.annotation.Nullable - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public CapacityCheckPerMetroInfo plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * The plan ID or slug sent to check capacity. - * @return plan - **/ - @javax.annotation.Nullable - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public CapacityCheckPerMetroInfo quantity(String quantity) { - - this.quantity = quantity; - return this; - } - - /** - * The number of servers sent to check capacity. - * @return quantity - **/ - @javax.annotation.Nullable - public String getQuantity() { - return quantity; - } - - - public void setQuantity(String quantity) { - this.quantity = quantity; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CapacityCheckPerMetroInfo instance itself - */ - public CapacityCheckPerMetroInfo putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapacityCheckPerMetroInfo capacityCheckPerMetroInfo = (CapacityCheckPerMetroInfo) o; - return Objects.equals(this.available, capacityCheckPerMetroInfo.available) && - Objects.equals(this.metro, capacityCheckPerMetroInfo.metro) && - Objects.equals(this.plan, capacityCheckPerMetroInfo.plan) && - Objects.equals(this.quantity, capacityCheckPerMetroInfo.quantity)&& - Objects.equals(this.additionalProperties, capacityCheckPerMetroInfo.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(available, metro, plan, quantity, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapacityCheckPerMetroInfo {\n"); - sb.append(" available: ").append(toIndentedString(available)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("available"); - openapiFields.add("metro"); - openapiFields.add("plan"); - openapiFields.add("quantity"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CapacityCheckPerMetroInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CapacityCheckPerMetroInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityCheckPerMetroInfo is not found in the empty JSON string", CapacityCheckPerMetroInfo.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CapacityCheckPerMetroInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CapacityCheckPerMetroInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CapacityCheckPerMetroInfo.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CapacityCheckPerMetroInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CapacityCheckPerMetroInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CapacityCheckPerMetroInfo instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CapacityCheckPerMetroInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of CapacityCheckPerMetroInfo - * @throws IOException if the JSON string is invalid with respect to CapacityCheckPerMetroInfo - */ - public static CapacityCheckPerMetroInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CapacityCheckPerMetroInfo.class); - } - - /** - * Convert an instance of CapacityCheckPerMetroInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java deleted file mode 100644 index df8c07d0b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.CapacityCheckPerMetroInfo; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CapacityCheckPerMetroList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CapacityCheckPerMetroList { - public static final String SERIALIZED_NAME_SERVERS = "servers"; - @SerializedName(SERIALIZED_NAME_SERVERS) - private List servers; - - public CapacityCheckPerMetroList() { - } - - public CapacityCheckPerMetroList servers(List servers) { - - this.servers = servers; - return this; - } - - public CapacityCheckPerMetroList addServersItem(CapacityCheckPerMetroInfo serversItem) { - if (this.servers == null) { - this.servers = new ArrayList<>(); - } - this.servers.add(serversItem); - return this; - } - - /** - * Get servers - * @return servers - **/ - @javax.annotation.Nullable - public List getServers() { - return servers; - } - - - public void setServers(List servers) { - this.servers = servers; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CapacityCheckPerMetroList instance itself - */ - public CapacityCheckPerMetroList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapacityCheckPerMetroList capacityCheckPerMetroList = (CapacityCheckPerMetroList) o; - return Objects.equals(this.servers, capacityCheckPerMetroList.servers)&& - Objects.equals(this.additionalProperties, capacityCheckPerMetroList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(servers, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapacityCheckPerMetroList {\n"); - sb.append(" servers: ").append(toIndentedString(servers)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("servers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CapacityCheckPerMetroList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CapacityCheckPerMetroList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityCheckPerMetroList is not found in the empty JSON string", CapacityCheckPerMetroList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("servers") != null && !jsonObj.get("servers").isJsonNull()) { - JsonArray jsonArrayservers = jsonObj.getAsJsonArray("servers"); - if (jsonArrayservers != null) { - // ensure the json data is an array - if (!jsonObj.get("servers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `servers` to be an array in the JSON string but got `%s`", jsonObj.get("servers").toString())); - } - - // validate the optional field `servers` (array) - for (int i = 0; i < jsonArrayservers.size(); i++) { - CapacityCheckPerMetroInfo.validateJsonElement(jsonArrayservers.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CapacityCheckPerMetroList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CapacityCheckPerMetroList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CapacityCheckPerMetroList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CapacityCheckPerMetroList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CapacityCheckPerMetroList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CapacityCheckPerMetroList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CapacityCheckPerMetroList given an JSON string - * - * @param jsonString JSON string - * @return An instance of CapacityCheckPerMetroList - * @throws IOException if the JSON string is invalid with respect to CapacityCheckPerMetroList - */ - public static CapacityCheckPerMetroList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CapacityCheckPerMetroList.class); - } - - /** - * Convert an instance of CapacityCheckPerMetroList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java deleted file mode 100644 index 314cc1f11..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityInput.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.ServerInfo; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CapacityInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CapacityInput { - public static final String SERIALIZED_NAME_SERVERS = "servers"; - @SerializedName(SERIALIZED_NAME_SERVERS) - private List servers; - - public CapacityInput() { - } - - public CapacityInput servers(List servers) { - - this.servers = servers; - return this; - } - - public CapacityInput addServersItem(ServerInfo serversItem) { - if (this.servers == null) { - this.servers = new ArrayList<>(); - } - this.servers.add(serversItem); - return this; - } - - /** - * Get servers - * @return servers - **/ - @javax.annotation.Nullable - public List getServers() { - return servers; - } - - - public void setServers(List servers) { - this.servers = servers; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CapacityInput instance itself - */ - public CapacityInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapacityInput capacityInput = (CapacityInput) o; - return Objects.equals(this.servers, capacityInput.servers)&& - Objects.equals(this.additionalProperties, capacityInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(servers, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapacityInput {\n"); - sb.append(" servers: ").append(toIndentedString(servers)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("servers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CapacityInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CapacityInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityInput is not found in the empty JSON string", CapacityInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("servers") != null && !jsonObj.get("servers").isJsonNull()) { - JsonArray jsonArrayservers = jsonObj.getAsJsonArray("servers"); - if (jsonArrayservers != null) { - // ensure the json data is an array - if (!jsonObj.get("servers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `servers` to be an array in the JSON string but got `%s`", jsonObj.get("servers").toString())); - } - - // validate the optional field `servers` (array) - for (int i = 0; i < jsonArrayservers.size(); i++) { - ServerInfo.validateJsonElement(jsonArrayservers.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CapacityInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CapacityInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CapacityInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CapacityInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CapacityInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CapacityInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CapacityInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of CapacityInput - * @throws IOException if the JSON string is invalid with respect to CapacityInput - */ - public static CapacityInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CapacityInput.class); - } - - /** - * Convert an instance of CapacityInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java deleted file mode 100644 index fc23c3afe..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetal.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CapacityLevelPerBaremetal - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CapacityLevelPerBaremetal { - public static final String SERIALIZED_NAME_LEVEL = "level"; - @SerializedName(SERIALIZED_NAME_LEVEL) - private String level; - - public CapacityLevelPerBaremetal() { - } - - public CapacityLevelPerBaremetal level(String level) { - - this.level = level; - return this; - } - - /** - * Get level - * @return level - **/ - @javax.annotation.Nullable - public String getLevel() { - return level; - } - - - public void setLevel(String level) { - this.level = level; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CapacityLevelPerBaremetal instance itself - */ - public CapacityLevelPerBaremetal putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapacityLevelPerBaremetal capacityLevelPerBaremetal = (CapacityLevelPerBaremetal) o; - return Objects.equals(this.level, capacityLevelPerBaremetal.level)&& - Objects.equals(this.additionalProperties, capacityLevelPerBaremetal.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(level, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapacityLevelPerBaremetal {\n"); - sb.append(" level: ").append(toIndentedString(level)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("level"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CapacityLevelPerBaremetal - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CapacityLevelPerBaremetal.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityLevelPerBaremetal is not found in the empty JSON string", CapacityLevelPerBaremetal.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("level") != null && !jsonObj.get("level").isJsonNull()) && !jsonObj.get("level").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `level` to be a primitive type in the JSON string but got `%s`", jsonObj.get("level").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CapacityLevelPerBaremetal.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CapacityLevelPerBaremetal' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CapacityLevelPerBaremetal.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CapacityLevelPerBaremetal value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CapacityLevelPerBaremetal read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CapacityLevelPerBaremetal instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CapacityLevelPerBaremetal given an JSON string - * - * @param jsonString JSON string - * @return An instance of CapacityLevelPerBaremetal - * @throws IOException if the JSON string is invalid with respect to CapacityLevelPerBaremetal - */ - public static CapacityLevelPerBaremetal fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CapacityLevelPerBaremetal.class); - } - - /** - * Convert an instance of CapacityLevelPerBaremetal to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java deleted file mode 100644 index a07f44615..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CapacityList.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.CapacityLevelPerBaremetal; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CapacityList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CapacityList { - public static final String SERIALIZED_NAME_CAPACITY = "capacity"; - @SerializedName(SERIALIZED_NAME_CAPACITY) - private Map> capacity = new HashMap<>(); - - public CapacityList() { - } - - public CapacityList capacity(Map> capacity) { - - this.capacity = capacity; - return this; - } - - public CapacityList putCapacityItem(String key, Map capacityItem) { - if (this.capacity == null) { - this.capacity = new HashMap<>(); - } - this.capacity.put(key, capacityItem); - return this; - } - - /** - * Get capacity - * @return capacity - **/ - @javax.annotation.Nullable - public Map> getCapacity() { - return capacity; - } - - - public void setCapacity(Map> capacity) { - this.capacity = capacity; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CapacityList instance itself - */ - public CapacityList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CapacityList capacityList = (CapacityList) o; - return Objects.equals(this.capacity, capacityList.capacity)&& - Objects.equals(this.additionalProperties, capacityList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(capacity, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CapacityList {\n"); - sb.append(" capacity: ").append(toIndentedString(capacity)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("capacity"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CapacityList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CapacityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CapacityList is not found in the empty JSON string", CapacityList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CapacityList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CapacityList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CapacityList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CapacityList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CapacityList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CapacityList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CapacityList given an JSON string - * - * @param jsonString JSON string - * @return An instance of CapacityList - * @throws IOException if the JSON string is invalid with respect to CapacityList - */ - public static CapacityList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CapacityList.class); - } - - /** - * Convert an instance of CapacityList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Component.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Component.java deleted file mode 100644 index 9fa1ff54b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Component.java +++ /dev/null @@ -1,523 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Component - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Component { - public static final String SERIALIZED_NAME_UUID = "uuid"; - @SerializedName(SERIALIZED_NAME_UUID) - private UUID uuid; - - public static final String SERIALIZED_NAME_VENDOR = "vendor"; - @SerializedName(SERIALIZED_NAME_VENDOR) - private String vendor; - - public static final String SERIALIZED_NAME_MODEL = "model"; - @SerializedName(SERIALIZED_NAME_MODEL) - private List model; - - public static final String SERIALIZED_NAME_FILENAME = "filename"; - @SerializedName(SERIALIZED_NAME_FILENAME) - private String filename; - - public static final String SERIALIZED_NAME_VERSION = "version"; - @SerializedName(SERIALIZED_NAME_VERSION) - private String version; - - public static final String SERIALIZED_NAME_COMPONENT = "component"; - @SerializedName(SERIALIZED_NAME_COMPONENT) - private String component; - - public static final String SERIALIZED_NAME_CHECKSUM = "checksum"; - @SerializedName(SERIALIZED_NAME_CHECKSUM) - private String checksum; - - public static final String SERIALIZED_NAME_UPSTREAM_URL = "upstream_url"; - @SerializedName(SERIALIZED_NAME_UPSTREAM_URL) - private String upstreamUrl; - - public static final String SERIALIZED_NAME_REPOSITORY_URL = "repository_url"; - @SerializedName(SERIALIZED_NAME_REPOSITORY_URL) - private String repositoryUrl; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public Component() { - } - - - public Component( - UUID uuid, - String vendor, - List model, - String filename, - String version, - String component, - String checksum, - String upstreamUrl, - String repositoryUrl, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.uuid = uuid; - this.vendor = vendor; - this.model = model; - this.filename = filename; - this.version = version; - this.component = component; - this.checksum = checksum; - this.upstreamUrl = upstreamUrl; - this.repositoryUrl = repositoryUrl; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - /** - * Component UUID - * @return uuid - **/ - @javax.annotation.Nullable - public UUID getUuid() { - return uuid; - } - - - - - /** - * Component vendor - * @return vendor - **/ - @javax.annotation.Nullable - public String getVendor() { - return vendor; - } - - - - - /** - * List of models where this component version can be applied - * @return model - **/ - @javax.annotation.Nullable - public List getModel() { - return model; - } - - - - - /** - * name of the file - * @return filename - **/ - @javax.annotation.Nullable - public String getFilename() { - return filename; - } - - - - - /** - * Version of the component - * @return version - **/ - @javax.annotation.Nullable - public String getVersion() { - return version; - } - - - - - /** - * Component type - * @return component - **/ - @javax.annotation.Nullable - public String getComponent() { - return component; - } - - - - - /** - * File checksum - * @return checksum - **/ - @javax.annotation.Nullable - public String getChecksum() { - return checksum; - } - - - - - /** - * Location of the file - * @return upstreamUrl - **/ - @javax.annotation.Nullable - public String getUpstreamUrl() { - return upstreamUrl; - } - - - - - /** - * Location of the file in the repository - * @return repositoryUrl - **/ - @javax.annotation.Nullable - public String getRepositoryUrl() { - return repositoryUrl; - } - - - - - /** - * Datetime when the block was created. - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - - /** - * Datetime when the block was updated. - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Component instance itself - */ - public Component putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Component component = (Component) o; - return Objects.equals(this.uuid, component.uuid) && - Objects.equals(this.vendor, component.vendor) && - Objects.equals(this.model, component.model) && - Objects.equals(this.filename, component.filename) && - Objects.equals(this.version, component.version) && - Objects.equals(this.component, component.component) && - Objects.equals(this.checksum, component.checksum) && - Objects.equals(this.upstreamUrl, component.upstreamUrl) && - Objects.equals(this.repositoryUrl, component.repositoryUrl) && - Objects.equals(this.createdAt, component.createdAt) && - Objects.equals(this.updatedAt, component.updatedAt)&& - Objects.equals(this.additionalProperties, component.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, vendor, model, filename, version, component, checksum, upstreamUrl, repositoryUrl, createdAt, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Component {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); - sb.append(" model: ").append(toIndentedString(model)).append("\n"); - sb.append(" filename: ").append(toIndentedString(filename)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" component: ").append(toIndentedString(component)).append("\n"); - sb.append(" checksum: ").append(toIndentedString(checksum)).append("\n"); - sb.append(" upstreamUrl: ").append(toIndentedString(upstreamUrl)).append("\n"); - sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("uuid"); - openapiFields.add("vendor"); - openapiFields.add("model"); - openapiFields.add("filename"); - openapiFields.add("version"); - openapiFields.add("component"); - openapiFields.add("checksum"); - openapiFields.add("upstream_url"); - openapiFields.add("repository_url"); - openapiFields.add("created_at"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Component - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Component.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Component is not found in the empty JSON string", Component.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); - } - if ((jsonObj.get("vendor") != null && !jsonObj.get("vendor").isJsonNull()) && !jsonObj.get("vendor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vendor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vendor").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("model") != null && !jsonObj.get("model").isJsonNull() && !jsonObj.get("model").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `model` to be an array in the JSON string but got `%s`", jsonObj.get("model").toString())); - } - if ((jsonObj.get("filename") != null && !jsonObj.get("filename").isJsonNull()) && !jsonObj.get("filename").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `filename` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filename").toString())); - } - if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); - } - if ((jsonObj.get("component") != null && !jsonObj.get("component").isJsonNull()) && !jsonObj.get("component").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `component` to be a primitive type in the JSON string but got `%s`", jsonObj.get("component").toString())); - } - if ((jsonObj.get("checksum") != null && !jsonObj.get("checksum").isJsonNull()) && !jsonObj.get("checksum").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `checksum` to be a primitive type in the JSON string but got `%s`", jsonObj.get("checksum").toString())); - } - if ((jsonObj.get("upstream_url") != null && !jsonObj.get("upstream_url").isJsonNull()) && !jsonObj.get("upstream_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `upstream_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upstream_url").toString())); - } - if ((jsonObj.get("repository_url") != null && !jsonObj.get("repository_url").isJsonNull()) && !jsonObj.get("repository_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `repository_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("repository_url").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Component.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Component' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Component.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Component value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Component read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Component instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Component given an JSON string - * - * @param jsonString JSON string - * @return An instance of Component - * @throws IOException if the JSON string is invalid with respect to Component - */ - public static Component fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Component.class); - } - - /** - * Convert an instance of Component to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java deleted file mode 100644 index 39d906873..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Coordinates.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Coordinates - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Coordinates { - public static final String SERIALIZED_NAME_LATITUDE = "latitude"; - @SerializedName(SERIALIZED_NAME_LATITUDE) - private String latitude; - - public static final String SERIALIZED_NAME_LONGITUDE = "longitude"; - @SerializedName(SERIALIZED_NAME_LONGITUDE) - private String longitude; - - public Coordinates() { - } - - public Coordinates latitude(String latitude) { - - this.latitude = latitude; - return this; - } - - /** - * Get latitude - * @return latitude - **/ - @javax.annotation.Nullable - public String getLatitude() { - return latitude; - } - - - public void setLatitude(String latitude) { - this.latitude = latitude; - } - - - public Coordinates longitude(String longitude) { - - this.longitude = longitude; - return this; - } - - /** - * Get longitude - * @return longitude - **/ - @javax.annotation.Nullable - public String getLongitude() { - return longitude; - } - - - public void setLongitude(String longitude) { - this.longitude = longitude; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Coordinates instance itself - */ - public Coordinates putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Coordinates coordinates = (Coordinates) o; - return Objects.equals(this.latitude, coordinates.latitude) && - Objects.equals(this.longitude, coordinates.longitude)&& - Objects.equals(this.additionalProperties, coordinates.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(latitude, longitude, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Coordinates {\n"); - sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n"); - sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("latitude"); - openapiFields.add("longitude"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Coordinates - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Coordinates.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Coordinates is not found in the empty JSON string", Coordinates.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("latitude") != null && !jsonObj.get("latitude").isJsonNull()) && !jsonObj.get("latitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); - } - if ((jsonObj.get("longitude") != null && !jsonObj.get("longitude").isJsonNull()) && !jsonObj.get("longitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Coordinates.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Coordinates' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Coordinates.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Coordinates value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Coordinates read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Coordinates instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Coordinates given an JSON string - * - * @param jsonString JSON string - * @return An instance of Coordinates - * @throws IOException if the JSON string is invalid with respect to Coordinates - */ - public static Coordinates fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Coordinates.class); - } - - /** - * Convert an instance of Coordinates to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateDeviceRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateDeviceRequest.java deleted file mode 100644 index 7c06cca9a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateDeviceRequest.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.DeviceCreateInFacilityInput; -import com.equinix.openapi.metal.v1.model.DeviceCreateInMetroInput; -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDeviceRequest extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateDeviceRequest.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDeviceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDeviceRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterDeviceCreateInMetroInput = gson.getDelegateAdapter(this, TypeToken.get(DeviceCreateInMetroInput.class)); - final TypeAdapter adapterDeviceCreateInFacilityInput = gson.getDelegateAdapter(this, TypeToken.get(DeviceCreateInFacilityInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDeviceRequest value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `DeviceCreateInMetroInput` - if (value.getActualInstance() instanceof DeviceCreateInMetroInput) { - JsonElement element = adapterDeviceCreateInMetroInput.toJsonTree((DeviceCreateInMetroInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `DeviceCreateInFacilityInput` - if (value.getActualInstance() instanceof DeviceCreateInFacilityInput) { - JsonElement element = adapterDeviceCreateInFacilityInput.toJsonTree((DeviceCreateInFacilityInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: DeviceCreateInFacilityInput, DeviceCreateInMetroInput"); - } - - @Override - public CreateDeviceRequest read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize DeviceCreateInMetroInput - try { - // validate the JSON object to see if any exception is thrown - DeviceCreateInMetroInput.validateJsonElement(jsonElement); - actualAdapter = adapterDeviceCreateInMetroInput; - match++; - log.log(Level.FINER, "Input data matches schema 'DeviceCreateInMetroInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for DeviceCreateInMetroInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'DeviceCreateInMetroInput'", e); - } - // deserialize DeviceCreateInFacilityInput - try { - // validate the JSON object to see if any exception is thrown - DeviceCreateInFacilityInput.validateJsonElement(jsonElement); - actualAdapter = adapterDeviceCreateInFacilityInput; - match++; - log.log(Level.FINER, "Input data matches schema 'DeviceCreateInFacilityInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for DeviceCreateInFacilityInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'DeviceCreateInFacilityInput'", e); - } - - if (match == 1) { - CreateDeviceRequest ret = new CreateDeviceRequest(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateDeviceRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateDeviceRequest() { - super("oneOf", Boolean.FALSE); - } - - public CreateDeviceRequest(DeviceCreateInFacilityInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateDeviceRequest(DeviceCreateInMetroInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("DeviceCreateInMetroInput", DeviceCreateInMetroInput.class); - schemas.put("DeviceCreateInFacilityInput", DeviceCreateInFacilityInput.class); - } - - @Override - public Map> getSchemas() { - return CreateDeviceRequest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * DeviceCreateInFacilityInput, DeviceCreateInMetroInput - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof DeviceCreateInMetroInput) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof DeviceCreateInFacilityInput) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be DeviceCreateInFacilityInput, DeviceCreateInMetroInput"); - } - - /** - * Get the actual instance, which can be the following: - * DeviceCreateInFacilityInput, DeviceCreateInMetroInput - * - * @return The actual instance (DeviceCreateInFacilityInput, DeviceCreateInMetroInput) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `DeviceCreateInMetroInput`. If the actual instance is not `DeviceCreateInMetroInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `DeviceCreateInMetroInput` - * @throws ClassCastException if the instance is not `DeviceCreateInMetroInput` - */ - public DeviceCreateInMetroInput getDeviceCreateInMetroInput() throws ClassCastException { - return (DeviceCreateInMetroInput)super.getActualInstance(); - } - /** - * Get the actual instance of `DeviceCreateInFacilityInput`. If the actual instance is not `DeviceCreateInFacilityInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `DeviceCreateInFacilityInput` - * @throws ClassCastException if the instance is not `DeviceCreateInFacilityInput` - */ - public DeviceCreateInFacilityInput getDeviceCreateInFacilityInput() throws ClassCastException { - return (DeviceCreateInFacilityInput)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateDeviceRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with DeviceCreateInMetroInput - try { - DeviceCreateInMetroInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for DeviceCreateInMetroInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with DeviceCreateInFacilityInput - try { - DeviceCreateInFacilityInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for DeviceCreateInFacilityInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateDeviceRequest with oneOf schemas: DeviceCreateInFacilityInput, DeviceCreateInMetroInput. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateDeviceRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateDeviceRequest - * @throws IOException if the JSON string is invalid with respect to CreateDeviceRequest - */ - public static CreateDeviceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateDeviceRequest.class); - } - - /** - * Convert an instance of CreateDeviceRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java deleted file mode 100644 index 818c931ea..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateEmailInput.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CreateEmailInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateEmailInput { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public CreateEmailInput() { - } - - public CreateEmailInput address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CreateEmailInput instance itself - */ - public CreateEmailInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateEmailInput createEmailInput = (CreateEmailInput) o; - return Objects.equals(this.address, createEmailInput.address)&& - Objects.equals(this.additionalProperties, createEmailInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateEmailInput {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateEmailInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateEmailInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateEmailInput is not found in the empty JSON string", CreateEmailInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateEmailInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateEmailInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateEmailInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateEmailInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateEmailInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CreateEmailInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CreateEmailInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateEmailInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateEmailInput - * @throws IOException if the JSON string is invalid with respect to CreateEmailInput - */ - public static CreateEmailInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateEmailInput.class); - } - - /** - * Convert an instance of CreateEmailInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequest.java deleted file mode 100644 index 0d77a7379..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequest.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.MetalGatewayCreateInput; -import com.equinix.openapi.metal.v1.model.VrfMetalGatewayCreateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateMetalGatewayRequest extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateMetalGatewayRequest.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateMetalGatewayRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateMetalGatewayRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterMetalGatewayCreateInput = gson.getDelegateAdapter(this, TypeToken.get(MetalGatewayCreateInput.class)); - final TypeAdapter adapterVrfMetalGatewayCreateInput = gson.getDelegateAdapter(this, TypeToken.get(VrfMetalGatewayCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateMetalGatewayRequest value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `MetalGatewayCreateInput` - if (value.getActualInstance() instanceof MetalGatewayCreateInput) { - JsonElement element = adapterMetalGatewayCreateInput.toJsonTree((MetalGatewayCreateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfMetalGatewayCreateInput` - if (value.getActualInstance() instanceof VrfMetalGatewayCreateInput) { - JsonElement element = adapterVrfMetalGatewayCreateInput.toJsonTree((VrfMetalGatewayCreateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: MetalGatewayCreateInput, VrfMetalGatewayCreateInput"); - } - - @Override - public CreateMetalGatewayRequest read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize MetalGatewayCreateInput - try { - // validate the JSON object to see if any exception is thrown - MetalGatewayCreateInput.validateJsonElement(jsonElement); - actualAdapter = adapterMetalGatewayCreateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'MetalGatewayCreateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for MetalGatewayCreateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'MetalGatewayCreateInput'", e); - } - // deserialize VrfMetalGatewayCreateInput - try { - // validate the JSON object to see if any exception is thrown - VrfMetalGatewayCreateInput.validateJsonElement(jsonElement); - actualAdapter = adapterVrfMetalGatewayCreateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfMetalGatewayCreateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfMetalGatewayCreateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfMetalGatewayCreateInput'", e); - } - - if (match == 1) { - CreateMetalGatewayRequest ret = new CreateMetalGatewayRequest(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateMetalGatewayRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateMetalGatewayRequest() { - super("oneOf", Boolean.FALSE); - } - - public CreateMetalGatewayRequest(MetalGatewayCreateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateMetalGatewayRequest(VrfMetalGatewayCreateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MetalGatewayCreateInput", MetalGatewayCreateInput.class); - schemas.put("VrfMetalGatewayCreateInput", VrfMetalGatewayCreateInput.class); - } - - @Override - public Map> getSchemas() { - return CreateMetalGatewayRequest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * MetalGatewayCreateInput, VrfMetalGatewayCreateInput - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof MetalGatewayCreateInput) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfMetalGatewayCreateInput) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be MetalGatewayCreateInput, VrfMetalGatewayCreateInput"); - } - - /** - * Get the actual instance, which can be the following: - * MetalGatewayCreateInput, VrfMetalGatewayCreateInput - * - * @return The actual instance (MetalGatewayCreateInput, VrfMetalGatewayCreateInput) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MetalGatewayCreateInput`. If the actual instance is not `MetalGatewayCreateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `MetalGatewayCreateInput` - * @throws ClassCastException if the instance is not `MetalGatewayCreateInput` - */ - public MetalGatewayCreateInput getMetalGatewayCreateInput() throws ClassCastException { - return (MetalGatewayCreateInput)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfMetalGatewayCreateInput`. If the actual instance is not `VrfMetalGatewayCreateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfMetalGatewayCreateInput` - * @throws ClassCastException if the instance is not `VrfMetalGatewayCreateInput` - */ - public VrfMetalGatewayCreateInput getVrfMetalGatewayCreateInput() throws ClassCastException { - return (VrfMetalGatewayCreateInput)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateMetalGatewayRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with MetalGatewayCreateInput - try { - MetalGatewayCreateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for MetalGatewayCreateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfMetalGatewayCreateInput - try { - VrfMetalGatewayCreateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfMetalGatewayCreateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateMetalGatewayRequest with oneOf schemas: MetalGatewayCreateInput, VrfMetalGatewayCreateInput. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateMetalGatewayRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateMetalGatewayRequest - * @throws IOException if the JSON string is invalid with respect to CreateMetalGatewayRequest - */ - public static CreateMetalGatewayRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateMetalGatewayRequest.class); - } - - /** - * Convert an instance of CreateMetalGatewayRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateOrganizationInterconnectionRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateOrganizationInterconnectionRequest.java deleted file mode 100644 index 8873de05c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateOrganizationInterconnectionRequest.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.DedicatedPortCreateInput; -import com.equinix.openapi.metal.v1.model.VlanFabricVcCreateInput; -import com.equinix.openapi.metal.v1.model.VrfFabricVcCreateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateOrganizationInterconnectionRequest extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateOrganizationInterconnectionRequest.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateOrganizationInterconnectionRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateOrganizationInterconnectionRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterDedicatedPortCreateInput = gson.getDelegateAdapter(this, TypeToken.get(DedicatedPortCreateInput.class)); - final TypeAdapter adapterVlanFabricVcCreateInput = gson.getDelegateAdapter(this, TypeToken.get(VlanFabricVcCreateInput.class)); - final TypeAdapter adapterVrfFabricVcCreateInput = gson.getDelegateAdapter(this, TypeToken.get(VrfFabricVcCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateOrganizationInterconnectionRequest value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `DedicatedPortCreateInput` - if (value.getActualInstance() instanceof DedicatedPortCreateInput) { - JsonElement element = adapterDedicatedPortCreateInput.toJsonTree((DedicatedPortCreateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VlanFabricVcCreateInput` - if (value.getActualInstance() instanceof VlanFabricVcCreateInput) { - JsonElement element = adapterVlanFabricVcCreateInput.toJsonTree((VlanFabricVcCreateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfFabricVcCreateInput` - if (value.getActualInstance() instanceof VrfFabricVcCreateInput) { - JsonElement element = adapterVrfFabricVcCreateInput.toJsonTree((VrfFabricVcCreateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: DedicatedPortCreateInput, VlanFabricVcCreateInput, VrfFabricVcCreateInput"); - } - - @Override - public CreateOrganizationInterconnectionRequest read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize DedicatedPortCreateInput - try { - // validate the JSON object to see if any exception is thrown - DedicatedPortCreateInput.validateJsonElement(jsonElement); - actualAdapter = adapterDedicatedPortCreateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'DedicatedPortCreateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for DedicatedPortCreateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'DedicatedPortCreateInput'", e); - } - // deserialize VlanFabricVcCreateInput - try { - // validate the JSON object to see if any exception is thrown - VlanFabricVcCreateInput.validateJsonElement(jsonElement); - actualAdapter = adapterVlanFabricVcCreateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'VlanFabricVcCreateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VlanFabricVcCreateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VlanFabricVcCreateInput'", e); - } - // deserialize VrfFabricVcCreateInput - try { - // validate the JSON object to see if any exception is thrown - VrfFabricVcCreateInput.validateJsonElement(jsonElement); - actualAdapter = adapterVrfFabricVcCreateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfFabricVcCreateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfFabricVcCreateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfFabricVcCreateInput'", e); - } - - if (match == 1) { - CreateOrganizationInterconnectionRequest ret = new CreateOrganizationInterconnectionRequest(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for CreateOrganizationInterconnectionRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public CreateOrganizationInterconnectionRequest() { - super("oneOf", Boolean.FALSE); - } - - public CreateOrganizationInterconnectionRequest(DedicatedPortCreateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateOrganizationInterconnectionRequest(VlanFabricVcCreateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public CreateOrganizationInterconnectionRequest(VrfFabricVcCreateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("DedicatedPortCreateInput", DedicatedPortCreateInput.class); - schemas.put("VlanFabricVcCreateInput", VlanFabricVcCreateInput.class); - schemas.put("VrfFabricVcCreateInput", VrfFabricVcCreateInput.class); - } - - @Override - public Map> getSchemas() { - return CreateOrganizationInterconnectionRequest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * DedicatedPortCreateInput, VlanFabricVcCreateInput, VrfFabricVcCreateInput - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof DedicatedPortCreateInput) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VlanFabricVcCreateInput) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfFabricVcCreateInput) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be DedicatedPortCreateInput, VlanFabricVcCreateInput, VrfFabricVcCreateInput"); - } - - /** - * Get the actual instance, which can be the following: - * DedicatedPortCreateInput, VlanFabricVcCreateInput, VrfFabricVcCreateInput - * - * @return The actual instance (DedicatedPortCreateInput, VlanFabricVcCreateInput, VrfFabricVcCreateInput) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `DedicatedPortCreateInput`. If the actual instance is not `DedicatedPortCreateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `DedicatedPortCreateInput` - * @throws ClassCastException if the instance is not `DedicatedPortCreateInput` - */ - public DedicatedPortCreateInput getDedicatedPortCreateInput() throws ClassCastException { - return (DedicatedPortCreateInput)super.getActualInstance(); - } - /** - * Get the actual instance of `VlanFabricVcCreateInput`. If the actual instance is not `VlanFabricVcCreateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VlanFabricVcCreateInput` - * @throws ClassCastException if the instance is not `VlanFabricVcCreateInput` - */ - public VlanFabricVcCreateInput getVlanFabricVcCreateInput() throws ClassCastException { - return (VlanFabricVcCreateInput)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfFabricVcCreateInput`. If the actual instance is not `VrfFabricVcCreateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfFabricVcCreateInput` - * @throws ClassCastException if the instance is not `VrfFabricVcCreateInput` - */ - public VrfFabricVcCreateInput getVrfFabricVcCreateInput() throws ClassCastException { - return (VrfFabricVcCreateInput)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateOrganizationInterconnectionRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with DedicatedPortCreateInput - try { - DedicatedPortCreateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for DedicatedPortCreateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VlanFabricVcCreateInput - try { - VlanFabricVcCreateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VlanFabricVcCreateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfFabricVcCreateInput - try { - VrfFabricVcCreateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfFabricVcCreateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for CreateOrganizationInterconnectionRequest with oneOf schemas: DedicatedPortCreateInput, VlanFabricVcCreateInput, VrfFabricVcCreateInput. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of CreateOrganizationInterconnectionRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateOrganizationInterconnectionRequest - * @throws IOException if the JSON string is invalid with respect to CreateOrganizationInterconnectionRequest - */ - public static CreateOrganizationInterconnectionRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateOrganizationInterconnectionRequest.class); - } - - /** - * Convert an instance of CreateOrganizationInterconnectionRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java deleted file mode 100644 index 23626d076..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequest.java +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.CreateSelfServiceReservationRequestPeriod; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationItemRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CreateSelfServiceReservationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSelfServiceReservationRequest { - public static final String SERIALIZED_NAME_ITEM = "item"; - @SerializedName(SERIALIZED_NAME_ITEM) - private List item; - - public static final String SERIALIZED_NAME_NOTES = "notes"; - @SerializedName(SERIALIZED_NAME_NOTES) - private String notes; - - public static final String SERIALIZED_NAME_PERIOD = "period"; - @SerializedName(SERIALIZED_NAME_PERIOD) - private CreateSelfServiceReservationRequestPeriod period; - - public static final String SERIALIZED_NAME_START_DATE = "start_date"; - @SerializedName(SERIALIZED_NAME_START_DATE) - private OffsetDateTime startDate; - - public CreateSelfServiceReservationRequest() { - } - - public CreateSelfServiceReservationRequest item(List item) { - - this.item = item; - return this; - } - - public CreateSelfServiceReservationRequest addItemItem(SelfServiceReservationItemRequest itemItem) { - if (this.item == null) { - this.item = new ArrayList<>(); - } - this.item.add(itemItem); - return this; - } - - /** - * Get item - * @return item - **/ - @javax.annotation.Nullable - public List getItem() { - return item; - } - - - public void setItem(List item) { - this.item = item; - } - - - public CreateSelfServiceReservationRequest notes(String notes) { - - this.notes = notes; - return this; - } - - /** - * Get notes - * @return notes - **/ - @javax.annotation.Nullable - public String getNotes() { - return notes; - } - - - public void setNotes(String notes) { - this.notes = notes; - } - - - public CreateSelfServiceReservationRequest period(CreateSelfServiceReservationRequestPeriod period) { - - this.period = period; - return this; - } - - /** - * Get period - * @return period - **/ - @javax.annotation.Nullable - public CreateSelfServiceReservationRequestPeriod getPeriod() { - return period; - } - - - public void setPeriod(CreateSelfServiceReservationRequestPeriod period) { - this.period = period; - } - - - public CreateSelfServiceReservationRequest startDate(OffsetDateTime startDate) { - - this.startDate = startDate; - return this; - } - - /** - * Get startDate - * @return startDate - **/ - @javax.annotation.Nullable - public OffsetDateTime getStartDate() { - return startDate; - } - - - public void setStartDate(OffsetDateTime startDate) { - this.startDate = startDate; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CreateSelfServiceReservationRequest instance itself - */ - public CreateSelfServiceReservationRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSelfServiceReservationRequest createSelfServiceReservationRequest = (CreateSelfServiceReservationRequest) o; - return Objects.equals(this.item, createSelfServiceReservationRequest.item) && - Objects.equals(this.notes, createSelfServiceReservationRequest.notes) && - Objects.equals(this.period, createSelfServiceReservationRequest.period) && - Objects.equals(this.startDate, createSelfServiceReservationRequest.startDate)&& - Objects.equals(this.additionalProperties, createSelfServiceReservationRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(item, notes, period, startDate, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSelfServiceReservationRequest {\n"); - sb.append(" item: ").append(toIndentedString(item)).append("\n"); - sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); - sb.append(" period: ").append(toIndentedString(period)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("item"); - openapiFields.add("notes"); - openapiFields.add("period"); - openapiFields.add("start_date"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateSelfServiceReservationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateSelfServiceReservationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSelfServiceReservationRequest is not found in the empty JSON string", CreateSelfServiceReservationRequest.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("item") != null && !jsonObj.get("item").isJsonNull()) { - JsonArray jsonArrayitem = jsonObj.getAsJsonArray("item"); - if (jsonArrayitem != null) { - // ensure the json data is an array - if (!jsonObj.get("item").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `item` to be an array in the JSON string but got `%s`", jsonObj.get("item").toString())); - } - - // validate the optional field `item` (array) - for (int i = 0; i < jsonArrayitem.size(); i++) { - SelfServiceReservationItemRequest.validateJsonElement(jsonArrayitem.get(i)); - }; - } - } - if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); - } - // validate the optional field `period` - if (jsonObj.get("period") != null && !jsonObj.get("period").isJsonNull()) { - CreateSelfServiceReservationRequestPeriod.validateJsonElement(jsonObj.get("period")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSelfServiceReservationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSelfServiceReservationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateSelfServiceReservationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSelfServiceReservationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CreateSelfServiceReservationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CreateSelfServiceReservationRequest instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSelfServiceReservationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSelfServiceReservationRequest - * @throws IOException if the JSON string is invalid with respect to CreateSelfServiceReservationRequest - */ - public static CreateSelfServiceReservationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSelfServiceReservationRequest.class); - } - - /** - * Convert an instance of CreateSelfServiceReservationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java deleted file mode 100644 index 3e0a1427d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriod.java +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * CreateSelfServiceReservationRequestPeriod - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateSelfServiceReservationRequestPeriod { - /** - * Gets or Sets count - */ - @JsonAdapter(CountEnum.Adapter.class) - public enum CountEnum { - NUMBER_12(12), - - NUMBER_36(36); - - private Integer value; - - CountEnum(Integer value) { - this.value = value; - } - - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CountEnum fromValue(Integer value) { - for (CountEnum b : CountEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CountEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CountEnum read(final JsonReader jsonReader) throws IOException { - Integer value = jsonReader.nextInt(); - return CountEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - Integer value = jsonElement.getAsInt(); - CountEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_COUNT = "count"; - @SerializedName(SERIALIZED_NAME_COUNT) - private CountEnum count; - - /** - * Gets or Sets unit - */ - @JsonAdapter(UnitEnum.Adapter.class) - public enum UnitEnum { - MONTHLY("monthly"); - - private String value; - - UnitEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static UnitEnum fromValue(String value) { - for (UnitEnum b : UnitEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final UnitEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public UnitEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return UnitEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - UnitEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_UNIT = "unit"; - @SerializedName(SERIALIZED_NAME_UNIT) - private UnitEnum unit; - - public CreateSelfServiceReservationRequestPeriod() { - } - - public CreateSelfServiceReservationRequestPeriod count(CountEnum count) { - - this.count = count; - return this; - } - - /** - * Get count - * @return count - **/ - @javax.annotation.Nullable - public CountEnum getCount() { - return count; - } - - - public void setCount(CountEnum count) { - this.count = count; - } - - - public CreateSelfServiceReservationRequestPeriod unit(UnitEnum unit) { - - this.unit = unit; - return this; - } - - /** - * Get unit - * @return unit - **/ - @javax.annotation.Nullable - public UnitEnum getUnit() { - return unit; - } - - - public void setUnit(UnitEnum unit) { - this.unit = unit; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CreateSelfServiceReservationRequestPeriod instance itself - */ - public CreateSelfServiceReservationRequestPeriod putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateSelfServiceReservationRequestPeriod createSelfServiceReservationRequestPeriod = (CreateSelfServiceReservationRequestPeriod) o; - return Objects.equals(this.count, createSelfServiceReservationRequestPeriod.count) && - Objects.equals(this.unit, createSelfServiceReservationRequestPeriod.unit)&& - Objects.equals(this.additionalProperties, createSelfServiceReservationRequestPeriod.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(count, unit, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateSelfServiceReservationRequestPeriod {\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("count"); - openapiFields.add("unit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateSelfServiceReservationRequestPeriod - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateSelfServiceReservationRequestPeriod.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateSelfServiceReservationRequestPeriod is not found in the empty JSON string", CreateSelfServiceReservationRequestPeriod.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `count` - if (jsonObj.get("count") != null && !jsonObj.get("count").isJsonNull()) { - CountEnum.validateJsonElement(jsonObj.get("count")); - } - if ((jsonObj.get("unit") != null && !jsonObj.get("unit").isJsonNull()) && !jsonObj.get("unit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unit").toString())); - } - // validate the optional field `unit` - if (jsonObj.get("unit") != null && !jsonObj.get("unit").isJsonNull()) { - UnitEnum.validateJsonElement(jsonObj.get("unit")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateSelfServiceReservationRequestPeriod.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateSelfServiceReservationRequestPeriod' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateSelfServiceReservationRequestPeriod.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateSelfServiceReservationRequestPeriod value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CreateSelfServiceReservationRequestPeriod read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CreateSelfServiceReservationRequestPeriod instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateSelfServiceReservationRequestPeriod given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateSelfServiceReservationRequestPeriod - * @throws IOException if the JSON string is invalid with respect to CreateSelfServiceReservationRequestPeriod - */ - public static CreateSelfServiceReservationRequestPeriod fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateSelfServiceReservationRequestPeriod.class); - } - - /** - * Convert an instance of CreateSelfServiceReservationRequestPeriod to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DedicatedPortCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DedicatedPortCreateInput.java deleted file mode 100644 index 318205e0b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DedicatedPortCreateInput.java +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DedicatedPortCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DedicatedPortCreateInput { - public static final String SERIALIZED_NAME_BILLING_ACCOUNT_NAME = "billing_account_name"; - @SerializedName(SERIALIZED_NAME_BILLING_ACCOUNT_NAME) - private String billingAccountName; - - public static final String SERIALIZED_NAME_CONTACT_EMAIL = "contact_email"; - @SerializedName(SERIALIZED_NAME_CONTACT_EMAIL) - private String contactEmail; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - /** - * The mode of the interconnection (only relevant to Dedicated Ports). Fabric VCs won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - */ - @JsonAdapter(ModeEnum.Adapter.class) - public enum ModeEnum { - STANDARD("standard"), - - TUNNEL("tunnel"); - - private String value; - - ModeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ModeEnum fromValue(String value) { - for (ModeEnum b : ModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ModeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ModeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ModeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ModeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_MODE = "mode"; - @SerializedName(SERIALIZED_NAME_MODE) - private ModeEnum mode; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private String project; - - public static final String SERIALIZED_NAME_REDUNDANCY = "redundancy"; - @SerializedName(SERIALIZED_NAME_REDUNDANCY) - private String redundancy; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - /** - * When requesting for a dedicated port, the value of this field should be 'dedicated'. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEDICATED("dedicated"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_USE_CASE = "use_case"; - @SerializedName(SERIALIZED_NAME_USE_CASE) - private String useCase; - - public DedicatedPortCreateInput() { - } - - public DedicatedPortCreateInput billingAccountName(String billingAccountName) { - - this.billingAccountName = billingAccountName; - return this; - } - - /** - * The billing account name of the Equinix Fabric account. - * @return billingAccountName - **/ - @javax.annotation.Nullable - public String getBillingAccountName() { - return billingAccountName; - } - - - public void setBillingAccountName(String billingAccountName) { - this.billingAccountName = billingAccountName; - } - - - public DedicatedPortCreateInput contactEmail(String contactEmail) { - - this.contactEmail = contactEmail; - return this; - } - - /** - * The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. - * @return contactEmail - **/ - @javax.annotation.Nullable - public String getContactEmail() { - return contactEmail; - } - - - public void setContactEmail(String contactEmail) { - this.contactEmail = contactEmail; - } - - - public DedicatedPortCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public DedicatedPortCreateInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * A Metro ID or code. For interconnections with Dedicated Ports, this will be the location of the issued Dedicated Ports. - * @return metro - **/ - @javax.annotation.Nonnull - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public DedicatedPortCreateInput mode(ModeEnum mode) { - - this.mode = mode; - return this; - } - - /** - * The mode of the interconnection (only relevant to Dedicated Ports). Fabric VCs won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - * @return mode - **/ - @javax.annotation.Nullable - public ModeEnum getMode() { - return mode; - } - - - public void setMode(ModeEnum mode) { - this.mode = mode; - } - - - public DedicatedPortCreateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public DedicatedPortCreateInput project(String project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public String getProject() { - return project; - } - - - public void setProject(String project) { - this.project = project; - } - - - public DedicatedPortCreateInput redundancy(String redundancy) { - - this.redundancy = redundancy; - return this; - } - - /** - * Either 'primary' or 'redundant'. - * @return redundancy - **/ - @javax.annotation.Nonnull - public String getRedundancy() { - return redundancy; - } - - - public void setRedundancy(String redundancy) { - this.redundancy = redundancy; - } - - - public DedicatedPortCreateInput speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * A interconnection speed, in bps, mbps, or gbps. For Dedicated Ports, this can be 10Gbps or 100Gbps. - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public DedicatedPortCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public DedicatedPortCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public DedicatedPortCreateInput type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * When requesting for a dedicated port, the value of this field should be 'dedicated'. - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public DedicatedPortCreateInput useCase(String useCase) { - - this.useCase = useCase; - return this; - } - - /** - * The intended use case of the dedicated port. - * @return useCase - **/ - @javax.annotation.Nullable - public String getUseCase() { - return useCase; - } - - - public void setUseCase(String useCase) { - this.useCase = useCase; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DedicatedPortCreateInput instance itself - */ - public DedicatedPortCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DedicatedPortCreateInput dedicatedPortCreateInput = (DedicatedPortCreateInput) o; - return Objects.equals(this.billingAccountName, dedicatedPortCreateInput.billingAccountName) && - Objects.equals(this.contactEmail, dedicatedPortCreateInput.contactEmail) && - Objects.equals(this.description, dedicatedPortCreateInput.description) && - Objects.equals(this.metro, dedicatedPortCreateInput.metro) && - Objects.equals(this.mode, dedicatedPortCreateInput.mode) && - Objects.equals(this.name, dedicatedPortCreateInput.name) && - Objects.equals(this.project, dedicatedPortCreateInput.project) && - Objects.equals(this.redundancy, dedicatedPortCreateInput.redundancy) && - Objects.equals(this.speed, dedicatedPortCreateInput.speed) && - Objects.equals(this.tags, dedicatedPortCreateInput.tags) && - Objects.equals(this.type, dedicatedPortCreateInput.type) && - Objects.equals(this.useCase, dedicatedPortCreateInput.useCase)&& - Objects.equals(this.additionalProperties, dedicatedPortCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(billingAccountName, contactEmail, description, metro, mode, name, project, redundancy, speed, tags, type, useCase, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DedicatedPortCreateInput {\n"); - sb.append(" billingAccountName: ").append(toIndentedString(billingAccountName)).append("\n"); - sb.append(" contactEmail: ").append(toIndentedString(contactEmail)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" redundancy: ").append(toIndentedString(redundancy)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" useCase: ").append(toIndentedString(useCase)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("billing_account_name"); - openapiFields.add("contact_email"); - openapiFields.add("description"); - openapiFields.add("metro"); - openapiFields.add("mode"); - openapiFields.add("name"); - openapiFields.add("project"); - openapiFields.add("redundancy"); - openapiFields.add("speed"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("use_case"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metro"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("redundancy"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DedicatedPortCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DedicatedPortCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DedicatedPortCreateInput is not found in the empty JSON string", DedicatedPortCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DedicatedPortCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("billing_account_name") != null && !jsonObj.get("billing_account_name").isJsonNull()) && !jsonObj.get("billing_account_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billing_account_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billing_account_name").toString())); - } - if ((jsonObj.get("contact_email") != null && !jsonObj.get("contact_email").isJsonNull()) && !jsonObj.get("contact_email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contact_email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact_email").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - if ((jsonObj.get("mode") != null && !jsonObj.get("mode").isJsonNull()) && !jsonObj.get("mode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mode").toString())); - } - // validate the optional field `mode` - if (jsonObj.get("mode") != null && !jsonObj.get("mode").isJsonNull()) { - ModeEnum.validateJsonElement(jsonObj.get("mode")); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) && !jsonObj.get("project").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project").toString())); - } - if (!jsonObj.get("redundancy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redundancy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redundancy").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - if ((jsonObj.get("use_case") != null && !jsonObj.get("use_case").isJsonNull()) && !jsonObj.get("use_case").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `use_case` to be a primitive type in the JSON string but got `%s`", jsonObj.get("use_case").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DedicatedPortCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DedicatedPortCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DedicatedPortCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DedicatedPortCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DedicatedPortCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DedicatedPortCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DedicatedPortCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DedicatedPortCreateInput - * @throws IOException if the JSON string is invalid with respect to DedicatedPortCreateInput - */ - public static DedicatedPortCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DedicatedPortCreateInput.class); - } - - /** - * Convert an instance of DedicatedPortCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java deleted file mode 100644 index 9ce7bc6a2..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Device.java +++ /dev/null @@ -1,1786 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.DeviceActionsInner; -import com.equinix.openapi.metal.v1.model.DeviceCreatedBy; -import com.equinix.openapi.metal.v1.model.DeviceMetro; -import com.equinix.openapi.metal.v1.model.DeviceProject; -import com.equinix.openapi.metal.v1.model.DeviceProjectLite; -import com.equinix.openapi.metal.v1.model.Event; -import com.equinix.openapi.metal.v1.model.Facility; -import com.equinix.openapi.metal.v1.model.HardwareReservation; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.OperatingSystem; -import com.equinix.openapi.metal.v1.model.Plan; -import com.equinix.openapi.metal.v1.model.Port; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Device - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Device { - public static final String SERIALIZED_NAME_ALWAYS_PXE = "always_pxe"; - @SerializedName(SERIALIZED_NAME_ALWAYS_PXE) - private Boolean alwaysPxe; - - public static final String SERIALIZED_NAME_BILLING_CYCLE = "billing_cycle"; - @SerializedName(SERIALIZED_NAME_BILLING_CYCLE) - private String billingCycle; - - public static final String SERIALIZED_NAME_BONDING_MODE = "bonding_mode"; - @SerializedName(SERIALIZED_NAME_BONDING_MODE) - private Integer bondingMode; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; - @SerializedName(SERIALIZED_NAME_CREATED_BY) - private DeviceCreatedBy createdBy; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Map customdata = new HashMap<>(); - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private Facility facility; - - public static final String SERIALIZED_NAME_FIRMWARE_SET_ID = "firmware_set_id"; - @SerializedName(SERIALIZED_NAME_FIRMWARE_SET_ID) - private UUID firmwareSetId; - - public static final String SERIALIZED_NAME_HARDWARE_RESERVATION = "hardware_reservation"; - @SerializedName(SERIALIZED_NAME_HARDWARE_RESERVATION) - private HardwareReservation hardwareReservation; - - public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; - @SerializedName(SERIALIZED_NAME_HOSTNAME) - private String hostname; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_IMAGE_URL = "image_url"; - @SerializedName(SERIALIZED_NAME_IMAGE_URL) - private String imageUrl; - - public static final String SERIALIZED_NAME_IP_ADDRESSES = "ip_addresses"; - @SerializedName(SERIALIZED_NAME_IP_ADDRESSES) - private List ipAddresses; - - public static final String SERIALIZED_NAME_IPXE_SCRIPT_URL = "ipxe_script_url"; - @SerializedName(SERIALIZED_NAME_IPXE_SCRIPT_URL) - private String ipxeScriptUrl; - - public static final String SERIALIZED_NAME_IQN = "iqn"; - @SerializedName(SERIALIZED_NAME_IQN) - private String iqn; - - public static final String SERIALIZED_NAME_LOCKED = "locked"; - @SerializedName(SERIALIZED_NAME_LOCKED) - private Boolean locked; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private DeviceMetro metro; - - public static final String SERIALIZED_NAME_NETWORK_FROZEN = "network_frozen"; - @SerializedName(SERIALIZED_NAME_NETWORK_FROZEN) - private Boolean networkFrozen; - - public static final String SERIALIZED_NAME_NETWORK_PORTS = "network_ports"; - @SerializedName(SERIALIZED_NAME_NETWORK_PORTS) - private List networkPorts; - - public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operating_system"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) - private OperatingSystem operatingSystem; - - public static final String SERIALIZED_NAME_ACTIONS = "actions"; - @SerializedName(SERIALIZED_NAME_ACTIONS) - private List actions; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private Plan plan; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private DeviceProject project; - - public static final String SERIALIZED_NAME_PROJECT_LITE = "project_lite"; - @SerializedName(SERIALIZED_NAME_PROJECT_LITE) - private DeviceProjectLite projectLite; - - public static final String SERIALIZED_NAME_PROVISIONING_EVENTS = "provisioning_events"; - @SerializedName(SERIALIZED_NAME_PROVISIONING_EVENTS) - private List provisioningEvents; - - public static final String SERIALIZED_NAME_PROVISIONING_PERCENTAGE = "provisioning_percentage"; - @SerializedName(SERIALIZED_NAME_PROVISIONING_PERCENTAGE) - private Float provisioningPercentage; - - public static final String SERIALIZED_NAME_ROOT_PASSWORD = "root_password"; - @SerializedName(SERIALIZED_NAME_ROOT_PASSWORD) - private String rootPassword; - - public static final String SERIALIZED_NAME_SHORT_ID = "short_id"; - @SerializedName(SERIALIZED_NAME_SHORT_ID) - private String shortId; - - public static final String SERIALIZED_NAME_SPOT_INSTANCE = "spot_instance"; - @SerializedName(SERIALIZED_NAME_SPOT_INSTANCE) - private Boolean spotInstance; - - public static final String SERIALIZED_NAME_SPOT_PRICE_MAX = "spot_price_max"; - @SerializedName(SERIALIZED_NAME_SPOT_PRICE_MAX) - private Float spotPriceMax; - - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - /** - * The current state the instance is in. * When an instance is initially created it will be in the `queued` state until it is picked up by the provisioner. * Once provisioning has begun on the instance it's state will move to `provisioning`. * When an instance is deleted, it will move to `deprovisioning` state until the deprovision is completed and the instance state moves to `deleted`. * If an instance fails to provision or deprovision it will move to `failed` state. * Once an instance has completed provisioning it will move to `active` state. * If an instance is currently powering off or powering on it will move to `powering_off` or `powering_on` states respectively. * When the instance is powered off completely it will move to the `inactive` state. * When an instance is powered on completely it will move to the `active` state. * Using the reinstall action to install a new OS on the instance will cause the instance state to change to `reinstalling`. * When the reinstall action is complete the instance will move to `active` state. - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - QUEUED("queued"), - - PROVISIONING("provisioning"), - - DEPROVISIONING("deprovisioning"), - - REINSTALLING("reinstalling"), - - ACTIVE("active"), - - INACTIVE("inactive"), - - FAILED("failed"), - - POWERING_ON("powering_on"), - - POWERING_OFF("powering_off"), - - DELETED("deleted"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_STORAGE = "storage"; - @SerializedName(SERIALIZED_NAME_STORAGE) - private Storage storage; - - public static final String SERIALIZED_NAME_SWITCH_UUID = "switch_uuid"; - @SerializedName(SERIALIZED_NAME_SWITCH_UUID) - private String switchUuid; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TERMINATION_TIME = "termination_time"; - @SerializedName(SERIALIZED_NAME_TERMINATION_TIME) - private OffsetDateTime terminationTime; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_USER = "user"; - @SerializedName(SERIALIZED_NAME_USER) - private String user; - - public static final String SERIALIZED_NAME_USERDATA = "userdata"; - @SerializedName(SERIALIZED_NAME_USERDATA) - private String userdata; - - public static final String SERIALIZED_NAME_VOLUMES = "volumes"; - @SerializedName(SERIALIZED_NAME_VOLUMES) - private List volumes; - - public static final String SERIALIZED_NAME_SOS = "sos"; - @SerializedName(SERIALIZED_NAME_SOS) - private String sos; - - public Device() { - } - - public Device alwaysPxe(Boolean alwaysPxe) { - - this.alwaysPxe = alwaysPxe; - return this; - } - - /** - * Get alwaysPxe - * @return alwaysPxe - **/ - @javax.annotation.Nullable - public Boolean getAlwaysPxe() { - return alwaysPxe; - } - - - public void setAlwaysPxe(Boolean alwaysPxe) { - this.alwaysPxe = alwaysPxe; - } - - - public Device billingCycle(String billingCycle) { - - this.billingCycle = billingCycle; - return this; - } - - /** - * Get billingCycle - * @return billingCycle - **/ - @javax.annotation.Nullable - public String getBillingCycle() { - return billingCycle; - } - - - public void setBillingCycle(String billingCycle) { - this.billingCycle = billingCycle; - } - - - public Device bondingMode(Integer bondingMode) { - - this.bondingMode = bondingMode; - return this; - } - - /** - * Get bondingMode - * @return bondingMode - **/ - @javax.annotation.Nullable - public Integer getBondingMode() { - return bondingMode; - } - - - public void setBondingMode(Integer bondingMode) { - this.bondingMode = bondingMode; - } - - - public Device createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Device createdBy(DeviceCreatedBy createdBy) { - - this.createdBy = createdBy; - return this; - } - - /** - * Get createdBy - * @return createdBy - **/ - @javax.annotation.Nullable - public DeviceCreatedBy getCreatedBy() { - return createdBy; - } - - - public void setCreatedBy(DeviceCreatedBy createdBy) { - this.createdBy = createdBy; - } - - - public Device customdata(Map customdata) { - - this.customdata = customdata; - return this; - } - - public Device putCustomdataItem(String key, Object customdataItem) { - if (this.customdata == null) { - this.customdata = new HashMap<>(); - } - this.customdata.put(key, customdataItem); - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Map getCustomdata() { - return customdata; - } - - - public void setCustomdata(Map customdata) { - this.customdata = customdata; - } - - - public Device description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public Device facility(Facility facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - **/ - @javax.annotation.Nullable - public Facility getFacility() { - return facility; - } - - - public void setFacility(Facility facility) { - this.facility = facility; - } - - - public Device firmwareSetId(UUID firmwareSetId) { - - this.firmwareSetId = firmwareSetId; - return this; - } - - /** - * The UUID of the firmware set to associate with the device. - * @return firmwareSetId - **/ - @javax.annotation.Nullable - public UUID getFirmwareSetId() { - return firmwareSetId; - } - - - public void setFirmwareSetId(UUID firmwareSetId) { - this.firmwareSetId = firmwareSetId; - } - - - public Device hardwareReservation(HardwareReservation hardwareReservation) { - - this.hardwareReservation = hardwareReservation; - return this; - } - - /** - * Get hardwareReservation - * @return hardwareReservation - **/ - @javax.annotation.Nullable - public HardwareReservation getHardwareReservation() { - return hardwareReservation; - } - - - public void setHardwareReservation(HardwareReservation hardwareReservation) { - this.hardwareReservation = hardwareReservation; - } - - - public Device hostname(String hostname) { - - this.hostname = hostname; - return this; - } - - /** - * Get hostname - * @return hostname - **/ - @javax.annotation.Nullable - public String getHostname() { - return hostname; - } - - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - - public Device href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public Device id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Device imageUrl(String imageUrl) { - - this.imageUrl = imageUrl; - return this; - } - - /** - * Get imageUrl - * @return imageUrl - **/ - @javax.annotation.Nullable - public String getImageUrl() { - return imageUrl; - } - - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } - - - public Device ipAddresses(List ipAddresses) { - - this.ipAddresses = ipAddresses; - return this; - } - - public Device addIpAddressesItem(IPAssignment ipAddressesItem) { - if (this.ipAddresses == null) { - this.ipAddresses = new ArrayList<>(); - } - this.ipAddresses.add(ipAddressesItem); - return this; - } - - /** - * Get ipAddresses - * @return ipAddresses - **/ - @javax.annotation.Nullable - public List getIpAddresses() { - return ipAddresses; - } - - - public void setIpAddresses(List ipAddresses) { - this.ipAddresses = ipAddresses; - } - - - public Device ipxeScriptUrl(String ipxeScriptUrl) { - - this.ipxeScriptUrl = ipxeScriptUrl; - return this; - } - - /** - * Get ipxeScriptUrl - * @return ipxeScriptUrl - **/ - @javax.annotation.Nullable - public String getIpxeScriptUrl() { - return ipxeScriptUrl; - } - - - public void setIpxeScriptUrl(String ipxeScriptUrl) { - this.ipxeScriptUrl = ipxeScriptUrl; - } - - - public Device iqn(String iqn) { - - this.iqn = iqn; - return this; - } - - /** - * Get iqn - * @return iqn - **/ - @javax.annotation.Nullable - public String getIqn() { - return iqn; - } - - - public void setIqn(String iqn) { - this.iqn = iqn; - } - - - public Device locked(Boolean locked) { - - this.locked = locked; - return this; - } - - /** - * Prevents accidental deletion of this resource when set to true. - * @return locked - **/ - @javax.annotation.Nullable - public Boolean getLocked() { - return locked; - } - - - public void setLocked(Boolean locked) { - this.locked = locked; - } - - - public Device metro(DeviceMetro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public DeviceMetro getMetro() { - return metro; - } - - - public void setMetro(DeviceMetro metro) { - this.metro = metro; - } - - - public Device networkFrozen(Boolean networkFrozen) { - - this.networkFrozen = networkFrozen; - return this; - } - - /** - * Whether network mode changes such as converting to/from Layer2 or Layer3 networking, bonding or disbonding network interfaces are permitted for the device. - * @return networkFrozen - **/ - @javax.annotation.Nullable - public Boolean getNetworkFrozen() { - return networkFrozen; - } - - - public void setNetworkFrozen(Boolean networkFrozen) { - this.networkFrozen = networkFrozen; - } - - - public Device networkPorts(List networkPorts) { - - this.networkPorts = networkPorts; - return this; - } - - public Device addNetworkPortsItem(Port networkPortsItem) { - if (this.networkPorts == null) { - this.networkPorts = new ArrayList<>(); - } - this.networkPorts.add(networkPortsItem); - return this; - } - - /** - * By default, servers at Equinix Metal are configured in a “bonded” mode using LACP (Link Aggregation Control Protocol). Each 2-NIC server is configured with a single bond (namely bond0) with both interfaces eth0 and eth1 as members of the bond in a default Layer 3 mode. Some device plans may have a different number of ports and bonds available. - * @return networkPorts - **/ - @javax.annotation.Nullable - public List getNetworkPorts() { - return networkPorts; - } - - - public void setNetworkPorts(List networkPorts) { - this.networkPorts = networkPorts; - } - - - public Device operatingSystem(OperatingSystem operatingSystem) { - - this.operatingSystem = operatingSystem; - return this; - } - - /** - * Get operatingSystem - * @return operatingSystem - **/ - @javax.annotation.Nullable - public OperatingSystem getOperatingSystem() { - return operatingSystem; - } - - - public void setOperatingSystem(OperatingSystem operatingSystem) { - this.operatingSystem = operatingSystem; - } - - - public Device actions(List actions) { - - this.actions = actions; - return this; - } - - public Device addActionsItem(DeviceActionsInner actionsItem) { - if (this.actions == null) { - this.actions = new ArrayList<>(); - } - this.actions.add(actionsItem); - return this; - } - - /** - * Actions supported by the device instance. - * @return actions - **/ - @javax.annotation.Nullable - public List getActions() { - return actions; - } - - - public void setActions(List actions) { - this.actions = actions; - } - - - public Device plan(Plan plan) { - - this.plan = plan; - return this; - } - - /** - * Get plan - * @return plan - **/ - @javax.annotation.Nullable - public Plan getPlan() { - return plan; - } - - - public void setPlan(Plan plan) { - this.plan = plan; - } - - - public Device project(DeviceProject project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public DeviceProject getProject() { - return project; - } - - - public void setProject(DeviceProject project) { - this.project = project; - } - - - public Device projectLite(DeviceProjectLite projectLite) { - - this.projectLite = projectLite; - return this; - } - - /** - * Get projectLite - * @return projectLite - **/ - @javax.annotation.Nullable - public DeviceProjectLite getProjectLite() { - return projectLite; - } - - - public void setProjectLite(DeviceProjectLite projectLite) { - this.projectLite = projectLite; - } - - - public Device provisioningEvents(List provisioningEvents) { - - this.provisioningEvents = provisioningEvents; - return this; - } - - public Device addProvisioningEventsItem(Event provisioningEventsItem) { - if (this.provisioningEvents == null) { - this.provisioningEvents = new ArrayList<>(); - } - this.provisioningEvents.add(provisioningEventsItem); - return this; - } - - /** - * Get provisioningEvents - * @return provisioningEvents - **/ - @javax.annotation.Nullable - public List getProvisioningEvents() { - return provisioningEvents; - } - - - public void setProvisioningEvents(List provisioningEvents) { - this.provisioningEvents = provisioningEvents; - } - - - public Device provisioningPercentage(Float provisioningPercentage) { - - this.provisioningPercentage = provisioningPercentage; - return this; - } - - /** - * Only visible while device provisioning - * @return provisioningPercentage - **/ - @javax.annotation.Nullable - public Float getProvisioningPercentage() { - return provisioningPercentage; - } - - - public void setProvisioningPercentage(Float provisioningPercentage) { - this.provisioningPercentage = provisioningPercentage; - } - - - public Device rootPassword(String rootPassword) { - - this.rootPassword = rootPassword; - return this; - } - - /** - * Root password is automatically generated when server is provisioned and it is removed after 24 hours - * @return rootPassword - **/ - @javax.annotation.Nullable - public String getRootPassword() { - return rootPassword; - } - - - public void setRootPassword(String rootPassword) { - this.rootPassword = rootPassword; - } - - - public Device shortId(String shortId) { - - this.shortId = shortId; - return this; - } - - /** - * Get shortId - * @return shortId - **/ - @javax.annotation.Nullable - public String getShortId() { - return shortId; - } - - - public void setShortId(String shortId) { - this.shortId = shortId; - } - - - public Device spotInstance(Boolean spotInstance) { - - this.spotInstance = spotInstance; - return this; - } - - /** - * Whether or not the device is a spot instance. - * @return spotInstance - **/ - @javax.annotation.Nullable - public Boolean getSpotInstance() { - return spotInstance; - } - - - public void setSpotInstance(Boolean spotInstance) { - this.spotInstance = spotInstance; - } - - - public Device spotPriceMax(Float spotPriceMax) { - - this.spotPriceMax = spotPriceMax; - return this; - } - - /** - * The maximum price per hour you are willing to pay to keep this spot instance. If you are outbid, the termination will be set allowing two minutes before shutdown. - * @return spotPriceMax - **/ - @javax.annotation.Nullable - public Float getSpotPriceMax() { - return spotPriceMax; - } - - - public void setSpotPriceMax(Float spotPriceMax) { - this.spotPriceMax = spotPriceMax; - } - - - public Device sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public Device addSshKeysItem(Href sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * Get sshKeys - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - - public Device state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * The current state the instance is in. * When an instance is initially created it will be in the `queued` state until it is picked up by the provisioner. * Once provisioning has begun on the instance it's state will move to `provisioning`. * When an instance is deleted, it will move to `deprovisioning` state until the deprovision is completed and the instance state moves to `deleted`. * If an instance fails to provision or deprovision it will move to `failed` state. * Once an instance has completed provisioning it will move to `active` state. * If an instance is currently powering off or powering on it will move to `powering_off` or `powering_on` states respectively. * When the instance is powered off completely it will move to the `inactive` state. * When an instance is powered on completely it will move to the `active` state. * Using the reinstall action to install a new OS on the instance will cause the instance state to change to `reinstalling`. * When the reinstall action is complete the instance will move to `active` state. - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public Device storage(Storage storage) { - - this.storage = storage; - return this; - } - - /** - * Get storage - * @return storage - **/ - @javax.annotation.Nullable - public Storage getStorage() { - return storage; - } - - - public void setStorage(Storage storage) { - this.storage = storage; - } - - - public Device switchUuid(String switchUuid) { - - this.switchUuid = switchUuid; - return this; - } - - /** - * Switch short id. This can be used to determine if two devices are connected to the same switch, for example. - * @return switchUuid - **/ - @javax.annotation.Nullable - public String getSwitchUuid() { - return switchUuid; - } - - - public void setSwitchUuid(String switchUuid) { - this.switchUuid = switchUuid; - } - - - public Device tags(List tags) { - - this.tags = tags; - return this; - } - - public Device addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public Device terminationTime(OffsetDateTime terminationTime) { - - this.terminationTime = terminationTime; - return this; - } - - /** - * When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. - * @return terminationTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getTerminationTime() { - return terminationTime; - } - - - public void setTerminationTime(OffsetDateTime terminationTime) { - this.terminationTime = terminationTime; - } - - - public Device updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Device user(String user) { - - this.user = user; - return this; - } - - /** - * Get user - * @return user - **/ - @javax.annotation.Nullable - public String getUser() { - return user; - } - - - public void setUser(String user) { - this.user = user; - } - - - public Device userdata(String userdata) { - - this.userdata = userdata; - return this; - } - - /** - * Get userdata - * @return userdata - **/ - @javax.annotation.Nullable - public String getUserdata() { - return userdata; - } - - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - - - public Device volumes(List volumes) { - - this.volumes = volumes; - return this; - } - - public Device addVolumesItem(Href volumesItem) { - if (this.volumes == null) { - this.volumes = new ArrayList<>(); - } - this.volumes.add(volumesItem); - return this; - } - - /** - * Get volumes - * @return volumes - **/ - @javax.annotation.Nullable - public List getVolumes() { - return volumes; - } - - - public void setVolumes(List volumes) { - this.volumes = volumes; - } - - - public Device sos(String sos) { - - this.sos = sos; - return this; - } - - /** - * Hostname used to connect to the instance via the SOS (Serial over SSH) out-of-band console. - * @return sos - **/ - @javax.annotation.Nullable - public String getSos() { - return sos; - } - - - public void setSos(String sos) { - this.sos = sos; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Device instance itself - */ - public Device putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Device device = (Device) o; - return Objects.equals(this.alwaysPxe, device.alwaysPxe) && - Objects.equals(this.billingCycle, device.billingCycle) && - Objects.equals(this.bondingMode, device.bondingMode) && - Objects.equals(this.createdAt, device.createdAt) && - Objects.equals(this.createdBy, device.createdBy) && - Objects.equals(this.customdata, device.customdata) && - Objects.equals(this.description, device.description) && - Objects.equals(this.facility, device.facility) && - Objects.equals(this.firmwareSetId, device.firmwareSetId) && - Objects.equals(this.hardwareReservation, device.hardwareReservation) && - Objects.equals(this.hostname, device.hostname) && - Objects.equals(this.href, device.href) && - Objects.equals(this.id, device.id) && - Objects.equals(this.imageUrl, device.imageUrl) && - Objects.equals(this.ipAddresses, device.ipAddresses) && - Objects.equals(this.ipxeScriptUrl, device.ipxeScriptUrl) && - Objects.equals(this.iqn, device.iqn) && - Objects.equals(this.locked, device.locked) && - Objects.equals(this.metro, device.metro) && - Objects.equals(this.networkFrozen, device.networkFrozen) && - Objects.equals(this.networkPorts, device.networkPorts) && - Objects.equals(this.operatingSystem, device.operatingSystem) && - Objects.equals(this.actions, device.actions) && - Objects.equals(this.plan, device.plan) && - Objects.equals(this.project, device.project) && - Objects.equals(this.projectLite, device.projectLite) && - Objects.equals(this.provisioningEvents, device.provisioningEvents) && - Objects.equals(this.provisioningPercentage, device.provisioningPercentage) && - Objects.equals(this.rootPassword, device.rootPassword) && - Objects.equals(this.shortId, device.shortId) && - Objects.equals(this.spotInstance, device.spotInstance) && - Objects.equals(this.spotPriceMax, device.spotPriceMax) && - Objects.equals(this.sshKeys, device.sshKeys) && - Objects.equals(this.state, device.state) && - Objects.equals(this.storage, device.storage) && - Objects.equals(this.switchUuid, device.switchUuid) && - Objects.equals(this.tags, device.tags) && - Objects.equals(this.terminationTime, device.terminationTime) && - Objects.equals(this.updatedAt, device.updatedAt) && - Objects.equals(this.user, device.user) && - Objects.equals(this.userdata, device.userdata) && - Objects.equals(this.volumes, device.volumes) && - Objects.equals(this.sos, device.sos)&& - Objects.equals(this.additionalProperties, device.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(alwaysPxe, billingCycle, bondingMode, createdAt, createdBy, customdata, description, facility, firmwareSetId, hardwareReservation, hostname, href, id, imageUrl, ipAddresses, ipxeScriptUrl, iqn, locked, metro, networkFrozen, networkPorts, operatingSystem, actions, plan, project, projectLite, provisioningEvents, provisioningPercentage, rootPassword, shortId, spotInstance, spotPriceMax, sshKeys, state, storage, switchUuid, tags, terminationTime, updatedAt, user, userdata, volumes, sos, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Device {\n"); - sb.append(" alwaysPxe: ").append(toIndentedString(alwaysPxe)).append("\n"); - sb.append(" billingCycle: ").append(toIndentedString(billingCycle)).append("\n"); - sb.append(" bondingMode: ").append(toIndentedString(bondingMode)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" firmwareSetId: ").append(toIndentedString(firmwareSetId)).append("\n"); - sb.append(" hardwareReservation: ").append(toIndentedString(hardwareReservation)).append("\n"); - sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); - sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); - sb.append(" ipxeScriptUrl: ").append(toIndentedString(ipxeScriptUrl)).append("\n"); - sb.append(" iqn: ").append(toIndentedString(iqn)).append("\n"); - sb.append(" locked: ").append(toIndentedString(locked)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" networkFrozen: ").append(toIndentedString(networkFrozen)).append("\n"); - sb.append(" networkPorts: ").append(toIndentedString(networkPorts)).append("\n"); - sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); - sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" projectLite: ").append(toIndentedString(projectLite)).append("\n"); - sb.append(" provisioningEvents: ").append(toIndentedString(provisioningEvents)).append("\n"); - sb.append(" provisioningPercentage: ").append(toIndentedString(provisioningPercentage)).append("\n"); - sb.append(" rootPassword: ").append(toIndentedString(rootPassword)).append("\n"); - sb.append(" shortId: ").append(toIndentedString(shortId)).append("\n"); - sb.append(" spotInstance: ").append(toIndentedString(spotInstance)).append("\n"); - sb.append(" spotPriceMax: ").append(toIndentedString(spotPriceMax)).append("\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" storage: ").append(toIndentedString(storage)).append("\n"); - sb.append(" switchUuid: ").append(toIndentedString(switchUuid)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" terminationTime: ").append(toIndentedString(terminationTime)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append(" userdata: ").append(toIndentedString(userdata)).append("\n"); - sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); - sb.append(" sos: ").append(toIndentedString(sos)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("always_pxe"); - openapiFields.add("billing_cycle"); - openapiFields.add("bonding_mode"); - openapiFields.add("created_at"); - openapiFields.add("created_by"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("facility"); - openapiFields.add("firmware_set_id"); - openapiFields.add("hardware_reservation"); - openapiFields.add("hostname"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("image_url"); - openapiFields.add("ip_addresses"); - openapiFields.add("ipxe_script_url"); - openapiFields.add("iqn"); - openapiFields.add("locked"); - openapiFields.add("metro"); - openapiFields.add("network_frozen"); - openapiFields.add("network_ports"); - openapiFields.add("operating_system"); - openapiFields.add("actions"); - openapiFields.add("plan"); - openapiFields.add("project"); - openapiFields.add("project_lite"); - openapiFields.add("provisioning_events"); - openapiFields.add("provisioning_percentage"); - openapiFields.add("root_password"); - openapiFields.add("short_id"); - openapiFields.add("spot_instance"); - openapiFields.add("spot_price_max"); - openapiFields.add("ssh_keys"); - openapiFields.add("state"); - openapiFields.add("storage"); - openapiFields.add("switch_uuid"); - openapiFields.add("tags"); - openapiFields.add("termination_time"); - openapiFields.add("updated_at"); - openapiFields.add("user"); - openapiFields.add("userdata"); - openapiFields.add("volumes"); - openapiFields.add("sos"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Device - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Device.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Device is not found in the empty JSON string", Device.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) && !jsonObj.get("billing_cycle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billing_cycle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billing_cycle").toString())); - } - // validate the optional field `created_by` - if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { - DeviceCreatedBy.validateJsonElement(jsonObj.get("created_by")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // validate the optional field `facility` - if (jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) { - Facility.validateJsonElement(jsonObj.get("facility")); - } - if ((jsonObj.get("firmware_set_id") != null && !jsonObj.get("firmware_set_id").isJsonNull()) && !jsonObj.get("firmware_set_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firmware_set_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firmware_set_id").toString())); - } - // validate the optional field `hardware_reservation` - if (jsonObj.get("hardware_reservation") != null && !jsonObj.get("hardware_reservation").isJsonNull()) { - HardwareReservation.validateJsonElement(jsonObj.get("hardware_reservation")); - } - if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("image_url") != null && !jsonObj.get("image_url").isJsonNull()) && !jsonObj.get("image_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `image_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("image_url").toString())); - } - if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { - JsonArray jsonArrayipAddresses = jsonObj.getAsJsonArray("ip_addresses"); - if (jsonArrayipAddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("ip_addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_addresses` to be an array in the JSON string but got `%s`", jsonObj.get("ip_addresses").toString())); - } - - // validate the optional field `ip_addresses` (array) - for (int i = 0; i < jsonArrayipAddresses.size(); i++) { - IPAssignment.validateJsonElement(jsonArrayipAddresses.get(i)); - }; - } - } - if ((jsonObj.get("ipxe_script_url") != null && !jsonObj.get("ipxe_script_url").isJsonNull()) && !jsonObj.get("ipxe_script_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); - } - if ((jsonObj.get("iqn") != null && !jsonObj.get("iqn").isJsonNull()) && !jsonObj.get("iqn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iqn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iqn").toString())); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - DeviceMetro.validateJsonElement(jsonObj.get("metro")); - } - if (jsonObj.get("network_ports") != null && !jsonObj.get("network_ports").isJsonNull()) { - JsonArray jsonArraynetworkPorts = jsonObj.getAsJsonArray("network_ports"); - if (jsonArraynetworkPorts != null) { - // ensure the json data is an array - if (!jsonObj.get("network_ports").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `network_ports` to be an array in the JSON string but got `%s`", jsonObj.get("network_ports").toString())); - } - - // validate the optional field `network_ports` (array) - for (int i = 0; i < jsonArraynetworkPorts.size(); i++) { - Port.validateJsonElement(jsonArraynetworkPorts.get(i)); - }; - } - } - // validate the optional field `operating_system` - if (jsonObj.get("operating_system") != null && !jsonObj.get("operating_system").isJsonNull()) { - OperatingSystem.validateJsonElement(jsonObj.get("operating_system")); - } - if (jsonObj.get("actions") != null && !jsonObj.get("actions").isJsonNull()) { - JsonArray jsonArrayactions = jsonObj.getAsJsonArray("actions"); - if (jsonArrayactions != null) { - // ensure the json data is an array - if (!jsonObj.get("actions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `actions` to be an array in the JSON string but got `%s`", jsonObj.get("actions").toString())); - } - - // validate the optional field `actions` (array) - for (int i = 0; i < jsonArrayactions.size(); i++) { - DeviceActionsInner.validateJsonElement(jsonArrayactions.get(i)); - }; - } - } - // validate the optional field `plan` - if (jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) { - Plan.validateJsonElement(jsonObj.get("plan")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - DeviceProject.validateJsonElement(jsonObj.get("project")); - } - // validate the optional field `project_lite` - if (jsonObj.get("project_lite") != null && !jsonObj.get("project_lite").isJsonNull()) { - DeviceProjectLite.validateJsonElement(jsonObj.get("project_lite")); - } - if (jsonObj.get("provisioning_events") != null && !jsonObj.get("provisioning_events").isJsonNull()) { - JsonArray jsonArrayprovisioningEvents = jsonObj.getAsJsonArray("provisioning_events"); - if (jsonArrayprovisioningEvents != null) { - // ensure the json data is an array - if (!jsonObj.get("provisioning_events").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `provisioning_events` to be an array in the JSON string but got `%s`", jsonObj.get("provisioning_events").toString())); - } - - // validate the optional field `provisioning_events` (array) - for (int i = 0; i < jsonArrayprovisioningEvents.size(); i++) { - Event.validateJsonElement(jsonArrayprovisioningEvents.get(i)); - }; - } - } - if ((jsonObj.get("root_password") != null && !jsonObj.get("root_password").isJsonNull()) && !jsonObj.get("root_password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `root_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("root_password").toString())); - } - if ((jsonObj.get("short_id") != null && !jsonObj.get("short_id").isJsonNull()) && !jsonObj.get("short_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("short_id").toString())); - } - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { - JsonArray jsonArraysshKeys = jsonObj.getAsJsonArray("ssh_keys"); - if (jsonArraysshKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - - // validate the optional field `ssh_keys` (array) - for (int i = 0; i < jsonArraysshKeys.size(); i++) { - Href.validateJsonElement(jsonArraysshKeys.get(i)); - }; - } - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - // validate the optional field `storage` - if (jsonObj.get("storage") != null && !jsonObj.get("storage").isJsonNull()) { - Storage.validateJsonElement(jsonObj.get("storage")); - } - if ((jsonObj.get("switch_uuid") != null && !jsonObj.get("switch_uuid").isJsonNull()) && !jsonObj.get("switch_uuid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `switch_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("switch_uuid").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if ((jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) && !jsonObj.get("user").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `user` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user").toString())); - } - if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userdata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userdata").toString())); - } - if (jsonObj.get("volumes") != null && !jsonObj.get("volumes").isJsonNull()) { - JsonArray jsonArrayvolumes = jsonObj.getAsJsonArray("volumes"); - if (jsonArrayvolumes != null) { - // ensure the json data is an array - if (!jsonObj.get("volumes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `volumes` to be an array in the JSON string but got `%s`", jsonObj.get("volumes").toString())); - } - - // validate the optional field `volumes` (array) - for (int i = 0; i < jsonArrayvolumes.size(); i++) { - Href.validateJsonElement(jsonArrayvolumes.get(i)); - }; - } - } - if ((jsonObj.get("sos") != null && !jsonObj.get("sos").isJsonNull()) && !jsonObj.get("sos").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sos` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sos").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Device.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Device' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Device.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Device value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Device read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Device instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Device given an JSON string - * - * @param jsonString JSON string - * @return An instance of Device - * @throws IOException if the JSON string is invalid with respect to Device - */ - public static Device fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Device.class); - } - - /** - * Convert an instance of Device to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionInput.java deleted file mode 100644 index 92edce18e..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionInput.java +++ /dev/null @@ -1,499 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceActionInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceActionInput { - /** - * Action to perform. See Device.actions for possible actions. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - POWER_ON("power_on"), - - POWER_OFF("power_off"), - - REBOOT("reboot"), - - RESCUE("rescue"), - - REINSTALL("reinstall"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_FORCE_DELETE = "force_delete"; - @SerializedName(SERIALIZED_NAME_FORCE_DELETE) - private Boolean forceDelete; - - public static final String SERIALIZED_NAME_DEPROVISION_FAST = "deprovision_fast"; - @SerializedName(SERIALIZED_NAME_DEPROVISION_FAST) - private Boolean deprovisionFast; - - public static final String SERIALIZED_NAME_PRESERVE_DATA = "preserve_data"; - @SerializedName(SERIALIZED_NAME_PRESERVE_DATA) - private Boolean preserveData; - - public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operating_system"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) - private String operatingSystem; - - public static final String SERIALIZED_NAME_IPXE_SCRIPT_URL = "ipxe_script_url"; - @SerializedName(SERIALIZED_NAME_IPXE_SCRIPT_URL) - private String ipxeScriptUrl; - - public DeviceActionInput() { - } - - public DeviceActionInput type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Action to perform. See Device.actions for possible actions. - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public DeviceActionInput forceDelete(Boolean forceDelete) { - - this.forceDelete = forceDelete; - return this; - } - - /** - * May be required to perform actions under certain conditions - * @return forceDelete - **/ - @javax.annotation.Nullable - public Boolean getForceDelete() { - return forceDelete; - } - - - public void setForceDelete(Boolean forceDelete) { - this.forceDelete = forceDelete; - } - - - public DeviceActionInput deprovisionFast(Boolean deprovisionFast) { - - this.deprovisionFast = deprovisionFast; - return this; - } - - /** - * When type is `reinstall`, enabling fast deprovisioning will bypass full disk wiping. - * @return deprovisionFast - **/ - @javax.annotation.Nullable - public Boolean getDeprovisionFast() { - return deprovisionFast; - } - - - public void setDeprovisionFast(Boolean deprovisionFast) { - this.deprovisionFast = deprovisionFast; - } - - - public DeviceActionInput preserveData(Boolean preserveData) { - - this.preserveData = preserveData; - return this; - } - - /** - * When type is `reinstall`, preserve the existing data on all disks except the operating-system disk. - * @return preserveData - **/ - @javax.annotation.Nullable - public Boolean getPreserveData() { - return preserveData; - } - - - public void setPreserveData(Boolean preserveData) { - this.preserveData = preserveData; - } - - - public DeviceActionInput operatingSystem(String operatingSystem) { - - this.operatingSystem = operatingSystem; - return this; - } - - /** - * When type is `reinstall`, use this `operating_system` (defaults to the current `operating system`) - * @return operatingSystem - **/ - @javax.annotation.Nullable - public String getOperatingSystem() { - return operatingSystem; - } - - - public void setOperatingSystem(String operatingSystem) { - this.operatingSystem = operatingSystem; - } - - - public DeviceActionInput ipxeScriptUrl(String ipxeScriptUrl) { - - this.ipxeScriptUrl = ipxeScriptUrl; - return this; - } - - /** - * When type is `reinstall`, use this `ipxe_script_url` (`operating_system` must be `custom_ipxe`, defaults to the current `ipxe_script_url`) - * @return ipxeScriptUrl - **/ - @javax.annotation.Nullable - public String getIpxeScriptUrl() { - return ipxeScriptUrl; - } - - - public void setIpxeScriptUrl(String ipxeScriptUrl) { - this.ipxeScriptUrl = ipxeScriptUrl; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceActionInput instance itself - */ - public DeviceActionInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceActionInput deviceActionInput = (DeviceActionInput) o; - return Objects.equals(this.type, deviceActionInput.type) && - Objects.equals(this.forceDelete, deviceActionInput.forceDelete) && - Objects.equals(this.deprovisionFast, deviceActionInput.deprovisionFast) && - Objects.equals(this.preserveData, deviceActionInput.preserveData) && - Objects.equals(this.operatingSystem, deviceActionInput.operatingSystem) && - Objects.equals(this.ipxeScriptUrl, deviceActionInput.ipxeScriptUrl)&& - Objects.equals(this.additionalProperties, deviceActionInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(type, forceDelete, deprovisionFast, preserveData, operatingSystem, ipxeScriptUrl, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceActionInput {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" forceDelete: ").append(toIndentedString(forceDelete)).append("\n"); - sb.append(" deprovisionFast: ").append(toIndentedString(deprovisionFast)).append("\n"); - sb.append(" preserveData: ").append(toIndentedString(preserveData)).append("\n"); - sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); - sb.append(" ipxeScriptUrl: ").append(toIndentedString(ipxeScriptUrl)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("force_delete"); - openapiFields.add("deprovision_fast"); - openapiFields.add("preserve_data"); - openapiFields.add("operating_system"); - openapiFields.add("ipxe_script_url"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceActionInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceActionInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceActionInput is not found in the empty JSON string", DeviceActionInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeviceActionInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - if ((jsonObj.get("operating_system") != null && !jsonObj.get("operating_system").isJsonNull()) && !jsonObj.get("operating_system").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operating_system` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operating_system").toString())); - } - if ((jsonObj.get("ipxe_script_url") != null && !jsonObj.get("ipxe_script_url").isJsonNull()) && !jsonObj.get("ipxe_script_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceActionInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceActionInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceActionInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceActionInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceActionInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceActionInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceActionInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceActionInput - * @throws IOException if the JSON string is invalid with respect to DeviceActionInput - */ - public static DeviceActionInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceActionInput.class); - } - - /** - * Convert an instance of DeviceActionInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java deleted file mode 100644 index 43d948b79..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceActionsInner.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceActionsInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceActionsInner { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public DeviceActionsInner() { - } - - public DeviceActionsInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public DeviceActionsInner name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceActionsInner instance itself - */ - public DeviceActionsInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceActionsInner deviceActionsInner = (DeviceActionsInner) o; - return Objects.equals(this.type, deviceActionsInner.type) && - Objects.equals(this.name, deviceActionsInner.name)&& - Objects.equals(this.additionalProperties, deviceActionsInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(type, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceActionsInner {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceActionsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceActionsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceActionsInner is not found in the empty JSON string", DeviceActionsInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceActionsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceActionsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceActionsInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceActionsInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceActionsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceActionsInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceActionsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceActionsInner - * @throws IOException if the JSON string is invalid with respect to DeviceActionsInner - */ - public static DeviceActionsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceActionsInner.class); - } - - /** - * Convert an instance of DeviceActionsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInFacilityInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInFacilityInput.java deleted file mode 100644 index 280af3d52..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInFacilityInput.java +++ /dev/null @@ -1,1208 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceCreateInFacilityInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceCreateInFacilityInput { - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @Deprecated - @SerializedName(SERIALIZED_NAME_FACILITY) - private List facility = new ArrayList<>(); - - public static final String SERIALIZED_NAME_ALWAYS_PXE = "always_pxe"; - @SerializedName(SERIALIZED_NAME_ALWAYS_PXE) - private Boolean alwaysPxe = false; - - /** - * The billing cycle of the device. - */ - @JsonAdapter(BillingCycleEnum.Adapter.class) - public enum BillingCycleEnum { - HOURLY("hourly"), - - DAILY("daily"), - - MONTHLY("monthly"), - - YEARLY("yearly"); - - private String value; - - BillingCycleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static BillingCycleEnum fromValue(String value) { - for (BillingCycleEnum b : BillingCycleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BillingCycleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public BillingCycleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BillingCycleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - BillingCycleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_BILLING_CYCLE = "billing_cycle"; - @SerializedName(SERIALIZED_NAME_BILLING_CYCLE) - private BillingCycleEnum billingCycle; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Map customdata = new HashMap<>(); - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FEATURES = "features"; - @SerializedName(SERIALIZED_NAME_FEATURES) - private List features; - - public static final String SERIALIZED_NAME_HARDWARE_RESERVATION_ID = "hardware_reservation_id"; - @SerializedName(SERIALIZED_NAME_HARDWARE_RESERVATION_ID) - private String hardwareReservationId = ""; - - public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; - @SerializedName(SERIALIZED_NAME_HOSTNAME) - private String hostname; - - public static final String SERIALIZED_NAME_IP_ADDRESSES = "ip_addresses"; - @SerializedName(SERIALIZED_NAME_IP_ADDRESSES) - private List ipAddresses; - - public static final String SERIALIZED_NAME_IPXE_SCRIPT_URL = "ipxe_script_url"; - @SerializedName(SERIALIZED_NAME_IPXE_SCRIPT_URL) - private String ipxeScriptUrl; - - public static final String SERIALIZED_NAME_LOCKED = "locked"; - @SerializedName(SERIALIZED_NAME_LOCKED) - private Boolean locked = false; - - public static final String SERIALIZED_NAME_NETWORK_FROZEN = "network_frozen"; - @SerializedName(SERIALIZED_NAME_NETWORK_FROZEN) - private Boolean networkFrozen; - - public static final String SERIALIZED_NAME_NO_SSH_KEYS = "no_ssh_keys"; - @SerializedName(SERIALIZED_NAME_NO_SSH_KEYS) - private Boolean noSshKeys = false; - - public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operating_system"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) - private String operatingSystem; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE = "private_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE) - private Integer privateIpv4SubnetSize = 28; - - public static final String SERIALIZED_NAME_PROJECT_SSH_KEYS = "project_ssh_keys"; - @SerializedName(SERIALIZED_NAME_PROJECT_SSH_KEYS) - private List projectSshKeys; - - public static final String SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE = "public_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE) - private Integer publicIpv4SubnetSize = 31; - - public static final String SERIALIZED_NAME_SPOT_INSTANCE = "spot_instance"; - @SerializedName(SERIALIZED_NAME_SPOT_INSTANCE) - private Boolean spotInstance; - - public static final String SERIALIZED_NAME_SPOT_PRICE_MAX = "spot_price_max"; - @SerializedName(SERIALIZED_NAME_SPOT_PRICE_MAX) - private Float spotPriceMax; - - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - public static final String SERIALIZED_NAME_STORAGE = "storage"; - @SerializedName(SERIALIZED_NAME_STORAGE) - private Storage storage; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TERMINATION_TIME = "termination_time"; - @SerializedName(SERIALIZED_NAME_TERMINATION_TIME) - private OffsetDateTime terminationTime; - - public static final String SERIALIZED_NAME_USER_SSH_KEYS = "user_ssh_keys"; - @SerializedName(SERIALIZED_NAME_USER_SSH_KEYS) - private List userSshKeys; - - public static final String SERIALIZED_NAME_USERDATA = "userdata"; - @SerializedName(SERIALIZED_NAME_USERDATA) - private String userdata; - - public DeviceCreateInFacilityInput() { - } - - @Deprecated - public DeviceCreateInFacilityInput facility(List facility) { - - this.facility = facility; - return this; - } - - public DeviceCreateInFacilityInput addFacilityItem(String facilityItem) { - if (this.facility == null) { - this.facility = new ArrayList<>(); - } - this.facility.add(facilityItem); - return this; - } - - /** - * The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. - * @return facility - * @deprecated - **/ - @Deprecated - @javax.annotation.Nonnull - public List getFacility() { - return facility; - } - - - @Deprecated - public void setFacility(List facility) { - this.facility = facility; - } - - - public DeviceCreateInFacilityInput alwaysPxe(Boolean alwaysPxe) { - - this.alwaysPxe = alwaysPxe; - return this; - } - - /** - * When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. - * @return alwaysPxe - **/ - @javax.annotation.Nullable - public Boolean getAlwaysPxe() { - return alwaysPxe; - } - - - public void setAlwaysPxe(Boolean alwaysPxe) { - this.alwaysPxe = alwaysPxe; - } - - - public DeviceCreateInFacilityInput billingCycle(BillingCycleEnum billingCycle) { - - this.billingCycle = billingCycle; - return this; - } - - /** - * The billing cycle of the device. - * @return billingCycle - **/ - @javax.annotation.Nullable - public BillingCycleEnum getBillingCycle() { - return billingCycle; - } - - - public void setBillingCycle(BillingCycleEnum billingCycle) { - this.billingCycle = billingCycle; - } - - - public DeviceCreateInFacilityInput customdata(Map customdata) { - - this.customdata = customdata; - return this; - } - - public DeviceCreateInFacilityInput putCustomdataItem(String key, Object customdataItem) { - if (this.customdata == null) { - this.customdata = new HashMap<>(); - } - this.customdata.put(key, customdataItem); - return this; - } - - /** - * Customdata is an arbitrary JSON value that can be accessed via the metadata service. - * @return customdata - **/ - @javax.annotation.Nullable - public Map getCustomdata() { - return customdata; - } - - - public void setCustomdata(Map customdata) { - this.customdata = customdata; - } - - - public DeviceCreateInFacilityInput description(String description) { - - this.description = description; - return this; - } - - /** - * Any description of the device or how it will be used. This may be used to inform other API consumers with project access. - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public DeviceCreateInFacilityInput features(List features) { - - this.features = features; - return this; - } - - public DeviceCreateInFacilityInput addFeaturesItem(String featuresItem) { - if (this.features == null) { - this.features = new ArrayList<>(); - } - this.features.add(featuresItem); - return this; - } - - /** - * The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. - * @return features - **/ - @javax.annotation.Nullable - public List getFeatures() { - return features; - } - - - public void setFeatures(List features) { - this.features = features; - } - - - public DeviceCreateInFacilityInput hardwareReservationId(String hardwareReservationId) { - - this.hardwareReservationId = hardwareReservationId; - return this; - } - - /** - * The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. - * @return hardwareReservationId - **/ - @javax.annotation.Nullable - public String getHardwareReservationId() { - return hardwareReservationId; - } - - - public void setHardwareReservationId(String hardwareReservationId) { - this.hardwareReservationId = hardwareReservationId; - } - - - public DeviceCreateInFacilityInput hostname(String hostname) { - - this.hostname = hostname; - return this; - } - - /** - * The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. - * @return hostname - **/ - @javax.annotation.Nullable - public String getHostname() { - return hostname; - } - - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - - public DeviceCreateInFacilityInput ipAddresses(List ipAddresses) { - - this.ipAddresses = ipAddresses; - return this; - } - - public DeviceCreateInFacilityInput addIpAddressesItem(IPAddress ipAddressesItem) { - if (this.ipAddresses == null) { - this.ipAddresses = new ArrayList<>(); - } - this.ipAddresses.add(ipAddressesItem); - return this; - } - - /** - * The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. - * @return ipAddresses - **/ - @javax.annotation.Nullable - public List getIpAddresses() { - return ipAddresses; - } - - - public void setIpAddresses(List ipAddresses) { - this.ipAddresses = ipAddresses; - } - - - public DeviceCreateInFacilityInput ipxeScriptUrl(String ipxeScriptUrl) { - - this.ipxeScriptUrl = ipxeScriptUrl; - return this; - } - - /** - * When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. - * @return ipxeScriptUrl - **/ - @javax.annotation.Nullable - public String getIpxeScriptUrl() { - return ipxeScriptUrl; - } - - - public void setIpxeScriptUrl(String ipxeScriptUrl) { - this.ipxeScriptUrl = ipxeScriptUrl; - } - - - public DeviceCreateInFacilityInput locked(Boolean locked) { - - this.locked = locked; - return this; - } - - /** - * Whether the device should be locked, preventing accidental deletion. - * @return locked - **/ - @javax.annotation.Nullable - public Boolean getLocked() { - return locked; - } - - - public void setLocked(Boolean locked) { - this.locked = locked; - } - - - public DeviceCreateInFacilityInput networkFrozen(Boolean networkFrozen) { - - this.networkFrozen = networkFrozen; - return this; - } - - /** - * If true, this instance can not be converted to a different network type. - * @return networkFrozen - **/ - @javax.annotation.Nullable - public Boolean getNetworkFrozen() { - return networkFrozen; - } - - - public void setNetworkFrozen(Boolean networkFrozen) { - this.networkFrozen = networkFrozen; - } - - - public DeviceCreateInFacilityInput noSshKeys(Boolean noSshKeys) { - - this.noSshKeys = noSshKeys; - return this; - } - - /** - * Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified - * @return noSshKeys - **/ - @javax.annotation.Nullable - public Boolean getNoSshKeys() { - return noSshKeys; - } - - - public void setNoSshKeys(Boolean noSshKeys) { - this.noSshKeys = noSshKeys; - } - - - public DeviceCreateInFacilityInput operatingSystem(String operatingSystem) { - - this.operatingSystem = operatingSystem; - return this; - } - - /** - * The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. - * @return operatingSystem - **/ - @javax.annotation.Nonnull - public String getOperatingSystem() { - return operatingSystem; - } - - - public void setOperatingSystem(String operatingSystem) { - this.operatingSystem = operatingSystem; - } - - - public DeviceCreateInFacilityInput plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * The slug of the device plan to provision. - * @return plan - **/ - @javax.annotation.Nonnull - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public DeviceCreateInFacilityInput privateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - return this; - } - - /** - * Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. - * @return privateIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPrivateIpv4SubnetSize() { - return privateIpv4SubnetSize; - } - - - public void setPrivateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - } - - - public DeviceCreateInFacilityInput projectSshKeys(List projectSshKeys) { - - this.projectSshKeys = projectSshKeys; - return this; - } - - public DeviceCreateInFacilityInput addProjectSshKeysItem(UUID projectSshKeysItem) { - if (this.projectSshKeys == null) { - this.projectSshKeys = new ArrayList<>(); - } - this.projectSshKeys.add(projectSshKeysItem); - return this; - } - - /** - * A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. - * @return projectSshKeys - **/ - @javax.annotation.Nullable - public List getProjectSshKeys() { - return projectSshKeys; - } - - - public void setProjectSshKeys(List projectSshKeys) { - this.projectSshKeys = projectSshKeys; - } - - - public DeviceCreateInFacilityInput publicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - return this; - } - - /** - * Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. - * @return publicIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPublicIpv4SubnetSize() { - return publicIpv4SubnetSize; - } - - - public void setPublicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - } - - - public DeviceCreateInFacilityInput spotInstance(Boolean spotInstance) { - - this.spotInstance = spotInstance; - return this; - } - - /** - * Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. - * @return spotInstance - **/ - @javax.annotation.Nullable - public Boolean getSpotInstance() { - return spotInstance; - } - - - public void setSpotInstance(Boolean spotInstance) { - this.spotInstance = spotInstance; - } - - - public DeviceCreateInFacilityInput spotPriceMax(Float spotPriceMax) { - - this.spotPriceMax = spotPriceMax; - return this; - } - - /** - * The maximum amount to bid for a spot instance. - * @return spotPriceMax - **/ - @javax.annotation.Nullable - public Float getSpotPriceMax() { - return spotPriceMax; - } - - - public void setSpotPriceMax(Float spotPriceMax) { - this.spotPriceMax = spotPriceMax; - } - - - public DeviceCreateInFacilityInput sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public DeviceCreateInFacilityInput addSshKeysItem(SSHKeyInput sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - - public DeviceCreateInFacilityInput storage(Storage storage) { - - this.storage = storage; - return this; - } - - /** - * Get storage - * @return storage - **/ - @javax.annotation.Nullable - public Storage getStorage() { - return storage; - } - - - public void setStorage(Storage storage) { - this.storage = storage; - } - - - public DeviceCreateInFacilityInput tags(List tags) { - - this.tags = tags; - return this; - } - - public DeviceCreateInFacilityInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public DeviceCreateInFacilityInput terminationTime(OffsetDateTime terminationTime) { - - this.terminationTime = terminationTime; - return this; - } - - /** - * When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. - * @return terminationTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getTerminationTime() { - return terminationTime; - } - - - public void setTerminationTime(OffsetDateTime terminationTime) { - this.terminationTime = terminationTime; - } - - - public DeviceCreateInFacilityInput userSshKeys(List userSshKeys) { - - this.userSshKeys = userSshKeys; - return this; - } - - public DeviceCreateInFacilityInput addUserSshKeysItem(UUID userSshKeysItem) { - if (this.userSshKeys == null) { - this.userSshKeys = new ArrayList<>(); - } - this.userSshKeys.add(userSshKeysItem); - return this; - } - - /** - * A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. - * @return userSshKeys - **/ - @javax.annotation.Nullable - public List getUserSshKeys() { - return userSshKeys; - } - - - public void setUserSshKeys(List userSshKeys) { - this.userSshKeys = userSshKeys; - } - - - public DeviceCreateInFacilityInput userdata(String userdata) { - - this.userdata = userdata; - return this; - } - - /** - * The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. - * @return userdata - **/ - @javax.annotation.Nullable - public String getUserdata() { - return userdata; - } - - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceCreateInFacilityInput instance itself - */ - public DeviceCreateInFacilityInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceCreateInFacilityInput deviceCreateInFacilityInput = (DeviceCreateInFacilityInput) o; - return Objects.equals(this.facility, deviceCreateInFacilityInput.facility) && - Objects.equals(this.alwaysPxe, deviceCreateInFacilityInput.alwaysPxe) && - Objects.equals(this.billingCycle, deviceCreateInFacilityInput.billingCycle) && - Objects.equals(this.customdata, deviceCreateInFacilityInput.customdata) && - Objects.equals(this.description, deviceCreateInFacilityInput.description) && - Objects.equals(this.features, deviceCreateInFacilityInput.features) && - Objects.equals(this.hardwareReservationId, deviceCreateInFacilityInput.hardwareReservationId) && - Objects.equals(this.hostname, deviceCreateInFacilityInput.hostname) && - Objects.equals(this.ipAddresses, deviceCreateInFacilityInput.ipAddresses) && - Objects.equals(this.ipxeScriptUrl, deviceCreateInFacilityInput.ipxeScriptUrl) && - Objects.equals(this.locked, deviceCreateInFacilityInput.locked) && - Objects.equals(this.networkFrozen, deviceCreateInFacilityInput.networkFrozen) && - Objects.equals(this.noSshKeys, deviceCreateInFacilityInput.noSshKeys) && - Objects.equals(this.operatingSystem, deviceCreateInFacilityInput.operatingSystem) && - Objects.equals(this.plan, deviceCreateInFacilityInput.plan) && - Objects.equals(this.privateIpv4SubnetSize, deviceCreateInFacilityInput.privateIpv4SubnetSize) && - Objects.equals(this.projectSshKeys, deviceCreateInFacilityInput.projectSshKeys) && - Objects.equals(this.publicIpv4SubnetSize, deviceCreateInFacilityInput.publicIpv4SubnetSize) && - Objects.equals(this.spotInstance, deviceCreateInFacilityInput.spotInstance) && - Objects.equals(this.spotPriceMax, deviceCreateInFacilityInput.spotPriceMax) && - Objects.equals(this.sshKeys, deviceCreateInFacilityInput.sshKeys) && - Objects.equals(this.storage, deviceCreateInFacilityInput.storage) && - Objects.equals(this.tags, deviceCreateInFacilityInput.tags) && - Objects.equals(this.terminationTime, deviceCreateInFacilityInput.terminationTime) && - Objects.equals(this.userSshKeys, deviceCreateInFacilityInput.userSshKeys) && - Objects.equals(this.userdata, deviceCreateInFacilityInput.userdata)&& - Objects.equals(this.additionalProperties, deviceCreateInFacilityInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(facility, alwaysPxe, billingCycle, customdata, description, features, hardwareReservationId, hostname, ipAddresses, ipxeScriptUrl, locked, networkFrozen, noSshKeys, operatingSystem, plan, privateIpv4SubnetSize, projectSshKeys, publicIpv4SubnetSize, spotInstance, spotPriceMax, sshKeys, storage, tags, terminationTime, userSshKeys, userdata, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceCreateInFacilityInput {\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" alwaysPxe: ").append(toIndentedString(alwaysPxe)).append("\n"); - sb.append(" billingCycle: ").append(toIndentedString(billingCycle)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" features: ").append(toIndentedString(features)).append("\n"); - sb.append(" hardwareReservationId: ").append(toIndentedString(hardwareReservationId)).append("\n"); - sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); - sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); - sb.append(" ipxeScriptUrl: ").append(toIndentedString(ipxeScriptUrl)).append("\n"); - sb.append(" locked: ").append(toIndentedString(locked)).append("\n"); - sb.append(" networkFrozen: ").append(toIndentedString(networkFrozen)).append("\n"); - sb.append(" noSshKeys: ").append(toIndentedString(noSshKeys)).append("\n"); - sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" privateIpv4SubnetSize: ").append(toIndentedString(privateIpv4SubnetSize)).append("\n"); - sb.append(" projectSshKeys: ").append(toIndentedString(projectSshKeys)).append("\n"); - sb.append(" publicIpv4SubnetSize: ").append(toIndentedString(publicIpv4SubnetSize)).append("\n"); - sb.append(" spotInstance: ").append(toIndentedString(spotInstance)).append("\n"); - sb.append(" spotPriceMax: ").append(toIndentedString(spotPriceMax)).append("\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" storage: ").append(toIndentedString(storage)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" terminationTime: ").append(toIndentedString(terminationTime)).append("\n"); - sb.append(" userSshKeys: ").append(toIndentedString(userSshKeys)).append("\n"); - sb.append(" userdata: ").append(toIndentedString(userdata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("facility"); - openapiFields.add("always_pxe"); - openapiFields.add("billing_cycle"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("features"); - openapiFields.add("hardware_reservation_id"); - openapiFields.add("hostname"); - openapiFields.add("ip_addresses"); - openapiFields.add("ipxe_script_url"); - openapiFields.add("locked"); - openapiFields.add("network_frozen"); - openapiFields.add("no_ssh_keys"); - openapiFields.add("operating_system"); - openapiFields.add("plan"); - openapiFields.add("private_ipv4_subnet_size"); - openapiFields.add("project_ssh_keys"); - openapiFields.add("public_ipv4_subnet_size"); - openapiFields.add("spot_instance"); - openapiFields.add("spot_price_max"); - openapiFields.add("ssh_keys"); - openapiFields.add("storage"); - openapiFields.add("tags"); - openapiFields.add("termination_time"); - openapiFields.add("user_ssh_keys"); - openapiFields.add("userdata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("facility"); - openapiRequiredFields.add("operating_system"); - openapiRequiredFields.add("plan"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceCreateInFacilityInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceCreateInFacilityInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceCreateInFacilityInput is not found in the empty JSON string", DeviceCreateInFacilityInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeviceCreateInFacilityInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("facility") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("facility").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be an array in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - if ((jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) && !jsonObj.get("billing_cycle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billing_cycle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billing_cycle").toString())); - } - // validate the optional field `billing_cycle` - if (jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) { - BillingCycleEnum.validateJsonElement(jsonObj.get("billing_cycle")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull() && !jsonObj.get("features").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); - } - if ((jsonObj.get("hardware_reservation_id") != null && !jsonObj.get("hardware_reservation_id").isJsonNull()) && !jsonObj.get("hardware_reservation_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hardware_reservation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hardware_reservation_id").toString())); - } - if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); - } - if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { - JsonArray jsonArrayipAddresses = jsonObj.getAsJsonArray("ip_addresses"); - if (jsonArrayipAddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("ip_addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_addresses` to be an array in the JSON string but got `%s`", jsonObj.get("ip_addresses").toString())); - } - - // validate the optional field `ip_addresses` (array) - for (int i = 0; i < jsonArrayipAddresses.size(); i++) { - IPAddress.validateJsonElement(jsonArrayipAddresses.get(i)); - }; - } - } - if ((jsonObj.get("ipxe_script_url") != null && !jsonObj.get("ipxe_script_url").isJsonNull()) && !jsonObj.get("ipxe_script_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); - } - if (!jsonObj.get("operating_system").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operating_system` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operating_system").toString())); - } - if (!jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonNull() && !jsonObj.get("project_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); - } - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { - JsonArray jsonArraysshKeys = jsonObj.getAsJsonArray("ssh_keys"); - if (jsonArraysshKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - - // validate the optional field `ssh_keys` (array) - for (int i = 0; i < jsonArraysshKeys.size(); i++) { - SSHKeyInput.validateJsonElement(jsonArraysshKeys.get(i)); - }; - } - } - // validate the optional field `storage` - if (jsonObj.get("storage") != null && !jsonObj.get("storage").isJsonNull()) { - Storage.validateJsonElement(jsonObj.get("storage")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonNull() && !jsonObj.get("user_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); - } - if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userdata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userdata").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceCreateInFacilityInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceCreateInFacilityInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceCreateInFacilityInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceCreateInFacilityInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceCreateInFacilityInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceCreateInFacilityInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceCreateInFacilityInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceCreateInFacilityInput - * @throws IOException if the JSON string is invalid with respect to DeviceCreateInFacilityInput - */ - public static DeviceCreateInFacilityInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceCreateInFacilityInput.class); - } - - /** - * Convert an instance of DeviceCreateInFacilityInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInMetroInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInMetroInput.java deleted file mode 100644 index b67ad7b2c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInMetroInput.java +++ /dev/null @@ -1,1192 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceCreateInMetroInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceCreateInMetroInput { - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_ALWAYS_PXE = "always_pxe"; - @SerializedName(SERIALIZED_NAME_ALWAYS_PXE) - private Boolean alwaysPxe = false; - - /** - * The billing cycle of the device. - */ - @JsonAdapter(BillingCycleEnum.Adapter.class) - public enum BillingCycleEnum { - HOURLY("hourly"), - - DAILY("daily"), - - MONTHLY("monthly"), - - YEARLY("yearly"); - - private String value; - - BillingCycleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static BillingCycleEnum fromValue(String value) { - for (BillingCycleEnum b : BillingCycleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BillingCycleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public BillingCycleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BillingCycleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - BillingCycleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_BILLING_CYCLE = "billing_cycle"; - @SerializedName(SERIALIZED_NAME_BILLING_CYCLE) - private BillingCycleEnum billingCycle; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Map customdata = new HashMap<>(); - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FEATURES = "features"; - @SerializedName(SERIALIZED_NAME_FEATURES) - private List features; - - public static final String SERIALIZED_NAME_HARDWARE_RESERVATION_ID = "hardware_reservation_id"; - @SerializedName(SERIALIZED_NAME_HARDWARE_RESERVATION_ID) - private String hardwareReservationId = ""; - - public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; - @SerializedName(SERIALIZED_NAME_HOSTNAME) - private String hostname; - - public static final String SERIALIZED_NAME_IP_ADDRESSES = "ip_addresses"; - @SerializedName(SERIALIZED_NAME_IP_ADDRESSES) - private List ipAddresses; - - public static final String SERIALIZED_NAME_IPXE_SCRIPT_URL = "ipxe_script_url"; - @SerializedName(SERIALIZED_NAME_IPXE_SCRIPT_URL) - private String ipxeScriptUrl; - - public static final String SERIALIZED_NAME_LOCKED = "locked"; - @SerializedName(SERIALIZED_NAME_LOCKED) - private Boolean locked = false; - - public static final String SERIALIZED_NAME_NETWORK_FROZEN = "network_frozen"; - @SerializedName(SERIALIZED_NAME_NETWORK_FROZEN) - private Boolean networkFrozen; - - public static final String SERIALIZED_NAME_NO_SSH_KEYS = "no_ssh_keys"; - @SerializedName(SERIALIZED_NAME_NO_SSH_KEYS) - private Boolean noSshKeys = false; - - public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operating_system"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) - private String operatingSystem; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE = "private_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE) - private Integer privateIpv4SubnetSize = 28; - - public static final String SERIALIZED_NAME_PROJECT_SSH_KEYS = "project_ssh_keys"; - @SerializedName(SERIALIZED_NAME_PROJECT_SSH_KEYS) - private List projectSshKeys; - - public static final String SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE = "public_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE) - private Integer publicIpv4SubnetSize = 31; - - public static final String SERIALIZED_NAME_SPOT_INSTANCE = "spot_instance"; - @SerializedName(SERIALIZED_NAME_SPOT_INSTANCE) - private Boolean spotInstance; - - public static final String SERIALIZED_NAME_SPOT_PRICE_MAX = "spot_price_max"; - @SerializedName(SERIALIZED_NAME_SPOT_PRICE_MAX) - private Float spotPriceMax; - - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - public static final String SERIALIZED_NAME_STORAGE = "storage"; - @SerializedName(SERIALIZED_NAME_STORAGE) - private Storage storage; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TERMINATION_TIME = "termination_time"; - @SerializedName(SERIALIZED_NAME_TERMINATION_TIME) - private OffsetDateTime terminationTime; - - public static final String SERIALIZED_NAME_USER_SSH_KEYS = "user_ssh_keys"; - @SerializedName(SERIALIZED_NAME_USER_SSH_KEYS) - private List userSshKeys; - - public static final String SERIALIZED_NAME_USERDATA = "userdata"; - @SerializedName(SERIALIZED_NAME_USERDATA) - private String userdata; - - public DeviceCreateInMetroInput() { - } - - public DeviceCreateInMetroInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * Metro code or ID of where the instance should be provisioned in. Either metro or facility must be provided. - * @return metro - **/ - @javax.annotation.Nonnull - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public DeviceCreateInMetroInput alwaysPxe(Boolean alwaysPxe) { - - this.alwaysPxe = alwaysPxe; - return this; - } - - /** - * When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. - * @return alwaysPxe - **/ - @javax.annotation.Nullable - public Boolean getAlwaysPxe() { - return alwaysPxe; - } - - - public void setAlwaysPxe(Boolean alwaysPxe) { - this.alwaysPxe = alwaysPxe; - } - - - public DeviceCreateInMetroInput billingCycle(BillingCycleEnum billingCycle) { - - this.billingCycle = billingCycle; - return this; - } - - /** - * The billing cycle of the device. - * @return billingCycle - **/ - @javax.annotation.Nullable - public BillingCycleEnum getBillingCycle() { - return billingCycle; - } - - - public void setBillingCycle(BillingCycleEnum billingCycle) { - this.billingCycle = billingCycle; - } - - - public DeviceCreateInMetroInput customdata(Map customdata) { - - this.customdata = customdata; - return this; - } - - public DeviceCreateInMetroInput putCustomdataItem(String key, Object customdataItem) { - if (this.customdata == null) { - this.customdata = new HashMap<>(); - } - this.customdata.put(key, customdataItem); - return this; - } - - /** - * Customdata is an arbitrary JSON value that can be accessed via the metadata service. - * @return customdata - **/ - @javax.annotation.Nullable - public Map getCustomdata() { - return customdata; - } - - - public void setCustomdata(Map customdata) { - this.customdata = customdata; - } - - - public DeviceCreateInMetroInput description(String description) { - - this.description = description; - return this; - } - - /** - * Any description of the device or how it will be used. This may be used to inform other API consumers with project access. - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public DeviceCreateInMetroInput features(List features) { - - this.features = features; - return this; - } - - public DeviceCreateInMetroInput addFeaturesItem(String featuresItem) { - if (this.features == null) { - this.features = new ArrayList<>(); - } - this.features.add(featuresItem); - return this; - } - - /** - * The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. - * @return features - **/ - @javax.annotation.Nullable - public List getFeatures() { - return features; - } - - - public void setFeatures(List features) { - this.features = features; - } - - - public DeviceCreateInMetroInput hardwareReservationId(String hardwareReservationId) { - - this.hardwareReservationId = hardwareReservationId; - return this; - } - - /** - * The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. - * @return hardwareReservationId - **/ - @javax.annotation.Nullable - public String getHardwareReservationId() { - return hardwareReservationId; - } - - - public void setHardwareReservationId(String hardwareReservationId) { - this.hardwareReservationId = hardwareReservationId; - } - - - public DeviceCreateInMetroInput hostname(String hostname) { - - this.hostname = hostname; - return this; - } - - /** - * The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. - * @return hostname - **/ - @javax.annotation.Nullable - public String getHostname() { - return hostname; - } - - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - - public DeviceCreateInMetroInput ipAddresses(List ipAddresses) { - - this.ipAddresses = ipAddresses; - return this; - } - - public DeviceCreateInMetroInput addIpAddressesItem(IPAddress ipAddressesItem) { - if (this.ipAddresses == null) { - this.ipAddresses = new ArrayList<>(); - } - this.ipAddresses.add(ipAddressesItem); - return this; - } - - /** - * The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. - * @return ipAddresses - **/ - @javax.annotation.Nullable - public List getIpAddresses() { - return ipAddresses; - } - - - public void setIpAddresses(List ipAddresses) { - this.ipAddresses = ipAddresses; - } - - - public DeviceCreateInMetroInput ipxeScriptUrl(String ipxeScriptUrl) { - - this.ipxeScriptUrl = ipxeScriptUrl; - return this; - } - - /** - * When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. - * @return ipxeScriptUrl - **/ - @javax.annotation.Nullable - public String getIpxeScriptUrl() { - return ipxeScriptUrl; - } - - - public void setIpxeScriptUrl(String ipxeScriptUrl) { - this.ipxeScriptUrl = ipxeScriptUrl; - } - - - public DeviceCreateInMetroInput locked(Boolean locked) { - - this.locked = locked; - return this; - } - - /** - * Whether the device should be locked, preventing accidental deletion. - * @return locked - **/ - @javax.annotation.Nullable - public Boolean getLocked() { - return locked; - } - - - public void setLocked(Boolean locked) { - this.locked = locked; - } - - - public DeviceCreateInMetroInput networkFrozen(Boolean networkFrozen) { - - this.networkFrozen = networkFrozen; - return this; - } - - /** - * If true, this instance can not be converted to a different network type. - * @return networkFrozen - **/ - @javax.annotation.Nullable - public Boolean getNetworkFrozen() { - return networkFrozen; - } - - - public void setNetworkFrozen(Boolean networkFrozen) { - this.networkFrozen = networkFrozen; - } - - - public DeviceCreateInMetroInput noSshKeys(Boolean noSshKeys) { - - this.noSshKeys = noSshKeys; - return this; - } - - /** - * Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified - * @return noSshKeys - **/ - @javax.annotation.Nullable - public Boolean getNoSshKeys() { - return noSshKeys; - } - - - public void setNoSshKeys(Boolean noSshKeys) { - this.noSshKeys = noSshKeys; - } - - - public DeviceCreateInMetroInput operatingSystem(String operatingSystem) { - - this.operatingSystem = operatingSystem; - return this; - } - - /** - * The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. - * @return operatingSystem - **/ - @javax.annotation.Nonnull - public String getOperatingSystem() { - return operatingSystem; - } - - - public void setOperatingSystem(String operatingSystem) { - this.operatingSystem = operatingSystem; - } - - - public DeviceCreateInMetroInput plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * The slug of the device plan to provision. - * @return plan - **/ - @javax.annotation.Nonnull - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public DeviceCreateInMetroInput privateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - return this; - } - - /** - * Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. - * @return privateIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPrivateIpv4SubnetSize() { - return privateIpv4SubnetSize; - } - - - public void setPrivateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - } - - - public DeviceCreateInMetroInput projectSshKeys(List projectSshKeys) { - - this.projectSshKeys = projectSshKeys; - return this; - } - - public DeviceCreateInMetroInput addProjectSshKeysItem(UUID projectSshKeysItem) { - if (this.projectSshKeys == null) { - this.projectSshKeys = new ArrayList<>(); - } - this.projectSshKeys.add(projectSshKeysItem); - return this; - } - - /** - * A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. - * @return projectSshKeys - **/ - @javax.annotation.Nullable - public List getProjectSshKeys() { - return projectSshKeys; - } - - - public void setProjectSshKeys(List projectSshKeys) { - this.projectSshKeys = projectSshKeys; - } - - - public DeviceCreateInMetroInput publicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - return this; - } - - /** - * Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. - * @return publicIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPublicIpv4SubnetSize() { - return publicIpv4SubnetSize; - } - - - public void setPublicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - } - - - public DeviceCreateInMetroInput spotInstance(Boolean spotInstance) { - - this.spotInstance = spotInstance; - return this; - } - - /** - * Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. - * @return spotInstance - **/ - @javax.annotation.Nullable - public Boolean getSpotInstance() { - return spotInstance; - } - - - public void setSpotInstance(Boolean spotInstance) { - this.spotInstance = spotInstance; - } - - - public DeviceCreateInMetroInput spotPriceMax(Float spotPriceMax) { - - this.spotPriceMax = spotPriceMax; - return this; - } - - /** - * The maximum amount to bid for a spot instance. - * @return spotPriceMax - **/ - @javax.annotation.Nullable - public Float getSpotPriceMax() { - return spotPriceMax; - } - - - public void setSpotPriceMax(Float spotPriceMax) { - this.spotPriceMax = spotPriceMax; - } - - - public DeviceCreateInMetroInput sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public DeviceCreateInMetroInput addSshKeysItem(SSHKeyInput sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - - public DeviceCreateInMetroInput storage(Storage storage) { - - this.storage = storage; - return this; - } - - /** - * Get storage - * @return storage - **/ - @javax.annotation.Nullable - public Storage getStorage() { - return storage; - } - - - public void setStorage(Storage storage) { - this.storage = storage; - } - - - public DeviceCreateInMetroInput tags(List tags) { - - this.tags = tags; - return this; - } - - public DeviceCreateInMetroInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public DeviceCreateInMetroInput terminationTime(OffsetDateTime terminationTime) { - - this.terminationTime = terminationTime; - return this; - } - - /** - * When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. - * @return terminationTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getTerminationTime() { - return terminationTime; - } - - - public void setTerminationTime(OffsetDateTime terminationTime) { - this.terminationTime = terminationTime; - } - - - public DeviceCreateInMetroInput userSshKeys(List userSshKeys) { - - this.userSshKeys = userSshKeys; - return this; - } - - public DeviceCreateInMetroInput addUserSshKeysItem(UUID userSshKeysItem) { - if (this.userSshKeys == null) { - this.userSshKeys = new ArrayList<>(); - } - this.userSshKeys.add(userSshKeysItem); - return this; - } - - /** - * A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. - * @return userSshKeys - **/ - @javax.annotation.Nullable - public List getUserSshKeys() { - return userSshKeys; - } - - - public void setUserSshKeys(List userSshKeys) { - this.userSshKeys = userSshKeys; - } - - - public DeviceCreateInMetroInput userdata(String userdata) { - - this.userdata = userdata; - return this; - } - - /** - * The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. - * @return userdata - **/ - @javax.annotation.Nullable - public String getUserdata() { - return userdata; - } - - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceCreateInMetroInput instance itself - */ - public DeviceCreateInMetroInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceCreateInMetroInput deviceCreateInMetroInput = (DeviceCreateInMetroInput) o; - return Objects.equals(this.metro, deviceCreateInMetroInput.metro) && - Objects.equals(this.alwaysPxe, deviceCreateInMetroInput.alwaysPxe) && - Objects.equals(this.billingCycle, deviceCreateInMetroInput.billingCycle) && - Objects.equals(this.customdata, deviceCreateInMetroInput.customdata) && - Objects.equals(this.description, deviceCreateInMetroInput.description) && - Objects.equals(this.features, deviceCreateInMetroInput.features) && - Objects.equals(this.hardwareReservationId, deviceCreateInMetroInput.hardwareReservationId) && - Objects.equals(this.hostname, deviceCreateInMetroInput.hostname) && - Objects.equals(this.ipAddresses, deviceCreateInMetroInput.ipAddresses) && - Objects.equals(this.ipxeScriptUrl, deviceCreateInMetroInput.ipxeScriptUrl) && - Objects.equals(this.locked, deviceCreateInMetroInput.locked) && - Objects.equals(this.networkFrozen, deviceCreateInMetroInput.networkFrozen) && - Objects.equals(this.noSshKeys, deviceCreateInMetroInput.noSshKeys) && - Objects.equals(this.operatingSystem, deviceCreateInMetroInput.operatingSystem) && - Objects.equals(this.plan, deviceCreateInMetroInput.plan) && - Objects.equals(this.privateIpv4SubnetSize, deviceCreateInMetroInput.privateIpv4SubnetSize) && - Objects.equals(this.projectSshKeys, deviceCreateInMetroInput.projectSshKeys) && - Objects.equals(this.publicIpv4SubnetSize, deviceCreateInMetroInput.publicIpv4SubnetSize) && - Objects.equals(this.spotInstance, deviceCreateInMetroInput.spotInstance) && - Objects.equals(this.spotPriceMax, deviceCreateInMetroInput.spotPriceMax) && - Objects.equals(this.sshKeys, deviceCreateInMetroInput.sshKeys) && - Objects.equals(this.storage, deviceCreateInMetroInput.storage) && - Objects.equals(this.tags, deviceCreateInMetroInput.tags) && - Objects.equals(this.terminationTime, deviceCreateInMetroInput.terminationTime) && - Objects.equals(this.userSshKeys, deviceCreateInMetroInput.userSshKeys) && - Objects.equals(this.userdata, deviceCreateInMetroInput.userdata)&& - Objects.equals(this.additionalProperties, deviceCreateInMetroInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(metro, alwaysPxe, billingCycle, customdata, description, features, hardwareReservationId, hostname, ipAddresses, ipxeScriptUrl, locked, networkFrozen, noSshKeys, operatingSystem, plan, privateIpv4SubnetSize, projectSshKeys, publicIpv4SubnetSize, spotInstance, spotPriceMax, sshKeys, storage, tags, terminationTime, userSshKeys, userdata, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceCreateInMetroInput {\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" alwaysPxe: ").append(toIndentedString(alwaysPxe)).append("\n"); - sb.append(" billingCycle: ").append(toIndentedString(billingCycle)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" features: ").append(toIndentedString(features)).append("\n"); - sb.append(" hardwareReservationId: ").append(toIndentedString(hardwareReservationId)).append("\n"); - sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); - sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); - sb.append(" ipxeScriptUrl: ").append(toIndentedString(ipxeScriptUrl)).append("\n"); - sb.append(" locked: ").append(toIndentedString(locked)).append("\n"); - sb.append(" networkFrozen: ").append(toIndentedString(networkFrozen)).append("\n"); - sb.append(" noSshKeys: ").append(toIndentedString(noSshKeys)).append("\n"); - sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" privateIpv4SubnetSize: ").append(toIndentedString(privateIpv4SubnetSize)).append("\n"); - sb.append(" projectSshKeys: ").append(toIndentedString(projectSshKeys)).append("\n"); - sb.append(" publicIpv4SubnetSize: ").append(toIndentedString(publicIpv4SubnetSize)).append("\n"); - sb.append(" spotInstance: ").append(toIndentedString(spotInstance)).append("\n"); - sb.append(" spotPriceMax: ").append(toIndentedString(spotPriceMax)).append("\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" storage: ").append(toIndentedString(storage)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" terminationTime: ").append(toIndentedString(terminationTime)).append("\n"); - sb.append(" userSshKeys: ").append(toIndentedString(userSshKeys)).append("\n"); - sb.append(" userdata: ").append(toIndentedString(userdata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metro"); - openapiFields.add("always_pxe"); - openapiFields.add("billing_cycle"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("features"); - openapiFields.add("hardware_reservation_id"); - openapiFields.add("hostname"); - openapiFields.add("ip_addresses"); - openapiFields.add("ipxe_script_url"); - openapiFields.add("locked"); - openapiFields.add("network_frozen"); - openapiFields.add("no_ssh_keys"); - openapiFields.add("operating_system"); - openapiFields.add("plan"); - openapiFields.add("private_ipv4_subnet_size"); - openapiFields.add("project_ssh_keys"); - openapiFields.add("public_ipv4_subnet_size"); - openapiFields.add("spot_instance"); - openapiFields.add("spot_price_max"); - openapiFields.add("ssh_keys"); - openapiFields.add("storage"); - openapiFields.add("tags"); - openapiFields.add("termination_time"); - openapiFields.add("user_ssh_keys"); - openapiFields.add("userdata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metro"); - openapiRequiredFields.add("operating_system"); - openapiRequiredFields.add("plan"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceCreateInMetroInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceCreateInMetroInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceCreateInMetroInput is not found in the empty JSON string", DeviceCreateInMetroInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeviceCreateInMetroInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - if ((jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) && !jsonObj.get("billing_cycle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billing_cycle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billing_cycle").toString())); - } - // validate the optional field `billing_cycle` - if (jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) { - BillingCycleEnum.validateJsonElement(jsonObj.get("billing_cycle")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull() && !jsonObj.get("features").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); - } - if ((jsonObj.get("hardware_reservation_id") != null && !jsonObj.get("hardware_reservation_id").isJsonNull()) && !jsonObj.get("hardware_reservation_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hardware_reservation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hardware_reservation_id").toString())); - } - if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); - } - if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { - JsonArray jsonArrayipAddresses = jsonObj.getAsJsonArray("ip_addresses"); - if (jsonArrayipAddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("ip_addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_addresses` to be an array in the JSON string but got `%s`", jsonObj.get("ip_addresses").toString())); - } - - // validate the optional field `ip_addresses` (array) - for (int i = 0; i < jsonArrayipAddresses.size(); i++) { - IPAddress.validateJsonElement(jsonArrayipAddresses.get(i)); - }; - } - } - if ((jsonObj.get("ipxe_script_url") != null && !jsonObj.get("ipxe_script_url").isJsonNull()) && !jsonObj.get("ipxe_script_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); - } - if (!jsonObj.get("operating_system").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operating_system` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operating_system").toString())); - } - if (!jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonNull() && !jsonObj.get("project_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); - } - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { - JsonArray jsonArraysshKeys = jsonObj.getAsJsonArray("ssh_keys"); - if (jsonArraysshKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - - // validate the optional field `ssh_keys` (array) - for (int i = 0; i < jsonArraysshKeys.size(); i++) { - SSHKeyInput.validateJsonElement(jsonArraysshKeys.get(i)); - }; - } - } - // validate the optional field `storage` - if (jsonObj.get("storage") != null && !jsonObj.get("storage").isJsonNull()) { - Storage.validateJsonElement(jsonObj.get("storage")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonNull() && !jsonObj.get("user_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); - } - if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userdata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userdata").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceCreateInMetroInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceCreateInMetroInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceCreateInMetroInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceCreateInMetroInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceCreateInMetroInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceCreateInMetroInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceCreateInMetroInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceCreateInMetroInput - * @throws IOException if the JSON string is invalid with respect to DeviceCreateInMetroInput - */ - public static DeviceCreateInMetroInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceCreateInMetroInput.class); - } - - /** - * Convert an instance of DeviceCreateInMetroInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java deleted file mode 100644 index 8a19f4562..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreateInput.java +++ /dev/null @@ -1,1160 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceCreateInput { - public static final String SERIALIZED_NAME_ALWAYS_PXE = "always_pxe"; - @SerializedName(SERIALIZED_NAME_ALWAYS_PXE) - private Boolean alwaysPxe = false; - - /** - * The billing cycle of the device. - */ - @JsonAdapter(BillingCycleEnum.Adapter.class) - public enum BillingCycleEnum { - HOURLY("hourly"), - - DAILY("daily"), - - MONTHLY("monthly"), - - YEARLY("yearly"); - - private String value; - - BillingCycleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static BillingCycleEnum fromValue(String value) { - for (BillingCycleEnum b : BillingCycleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BillingCycleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public BillingCycleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BillingCycleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - BillingCycleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_BILLING_CYCLE = "billing_cycle"; - @SerializedName(SERIALIZED_NAME_BILLING_CYCLE) - private BillingCycleEnum billingCycle; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Map customdata = new HashMap<>(); - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FEATURES = "features"; - @SerializedName(SERIALIZED_NAME_FEATURES) - private List features; - - public static final String SERIALIZED_NAME_HARDWARE_RESERVATION_ID = "hardware_reservation_id"; - @SerializedName(SERIALIZED_NAME_HARDWARE_RESERVATION_ID) - private String hardwareReservationId = ""; - - public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; - @SerializedName(SERIALIZED_NAME_HOSTNAME) - private String hostname; - - public static final String SERIALIZED_NAME_IP_ADDRESSES = "ip_addresses"; - @SerializedName(SERIALIZED_NAME_IP_ADDRESSES) - private List ipAddresses; - - public static final String SERIALIZED_NAME_IPXE_SCRIPT_URL = "ipxe_script_url"; - @SerializedName(SERIALIZED_NAME_IPXE_SCRIPT_URL) - private String ipxeScriptUrl; - - public static final String SERIALIZED_NAME_LOCKED = "locked"; - @SerializedName(SERIALIZED_NAME_LOCKED) - private Boolean locked = false; - - public static final String SERIALIZED_NAME_NETWORK_FROZEN = "network_frozen"; - @SerializedName(SERIALIZED_NAME_NETWORK_FROZEN) - private Boolean networkFrozen; - - public static final String SERIALIZED_NAME_NO_SSH_KEYS = "no_ssh_keys"; - @SerializedName(SERIALIZED_NAME_NO_SSH_KEYS) - private Boolean noSshKeys = false; - - public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operating_system"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) - private String operatingSystem; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE = "private_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE) - private Integer privateIpv4SubnetSize = 28; - - public static final String SERIALIZED_NAME_PROJECT_SSH_KEYS = "project_ssh_keys"; - @SerializedName(SERIALIZED_NAME_PROJECT_SSH_KEYS) - private List projectSshKeys; - - public static final String SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE = "public_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE) - private Integer publicIpv4SubnetSize = 31; - - public static final String SERIALIZED_NAME_SPOT_INSTANCE = "spot_instance"; - @SerializedName(SERIALIZED_NAME_SPOT_INSTANCE) - private Boolean spotInstance; - - public static final String SERIALIZED_NAME_SPOT_PRICE_MAX = "spot_price_max"; - @SerializedName(SERIALIZED_NAME_SPOT_PRICE_MAX) - private Float spotPriceMax; - - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - public static final String SERIALIZED_NAME_STORAGE = "storage"; - @SerializedName(SERIALIZED_NAME_STORAGE) - private Storage storage; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TERMINATION_TIME = "termination_time"; - @SerializedName(SERIALIZED_NAME_TERMINATION_TIME) - private OffsetDateTime terminationTime; - - public static final String SERIALIZED_NAME_USER_SSH_KEYS = "user_ssh_keys"; - @SerializedName(SERIALIZED_NAME_USER_SSH_KEYS) - private List userSshKeys; - - public static final String SERIALIZED_NAME_USERDATA = "userdata"; - @SerializedName(SERIALIZED_NAME_USERDATA) - private String userdata; - - public DeviceCreateInput() { - } - - public DeviceCreateInput alwaysPxe(Boolean alwaysPxe) { - - this.alwaysPxe = alwaysPxe; - return this; - } - - /** - * When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. - * @return alwaysPxe - **/ - @javax.annotation.Nullable - public Boolean getAlwaysPxe() { - return alwaysPxe; - } - - - public void setAlwaysPxe(Boolean alwaysPxe) { - this.alwaysPxe = alwaysPxe; - } - - - public DeviceCreateInput billingCycle(BillingCycleEnum billingCycle) { - - this.billingCycle = billingCycle; - return this; - } - - /** - * The billing cycle of the device. - * @return billingCycle - **/ - @javax.annotation.Nullable - public BillingCycleEnum getBillingCycle() { - return billingCycle; - } - - - public void setBillingCycle(BillingCycleEnum billingCycle) { - this.billingCycle = billingCycle; - } - - - public DeviceCreateInput customdata(Map customdata) { - - this.customdata = customdata; - return this; - } - - public DeviceCreateInput putCustomdataItem(String key, Object customdataItem) { - if (this.customdata == null) { - this.customdata = new HashMap<>(); - } - this.customdata.put(key, customdataItem); - return this; - } - - /** - * Customdata is an arbitrary JSON value that can be accessed via the metadata service. - * @return customdata - **/ - @javax.annotation.Nullable - public Map getCustomdata() { - return customdata; - } - - - public void setCustomdata(Map customdata) { - this.customdata = customdata; - } - - - public DeviceCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Any description of the device or how it will be used. This may be used to inform other API consumers with project access. - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public DeviceCreateInput features(List features) { - - this.features = features; - return this; - } - - public DeviceCreateInput addFeaturesItem(String featuresItem) { - if (this.features == null) { - this.features = new ArrayList<>(); - } - this.features.add(featuresItem); - return this; - } - - /** - * The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. - * @return features - **/ - @javax.annotation.Nullable - public List getFeatures() { - return features; - } - - - public void setFeatures(List features) { - this.features = features; - } - - - public DeviceCreateInput hardwareReservationId(String hardwareReservationId) { - - this.hardwareReservationId = hardwareReservationId; - return this; - } - - /** - * The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. - * @return hardwareReservationId - **/ - @javax.annotation.Nullable - public String getHardwareReservationId() { - return hardwareReservationId; - } - - - public void setHardwareReservationId(String hardwareReservationId) { - this.hardwareReservationId = hardwareReservationId; - } - - - public DeviceCreateInput hostname(String hostname) { - - this.hostname = hostname; - return this; - } - - /** - * The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. - * @return hostname - **/ - @javax.annotation.Nullable - public String getHostname() { - return hostname; - } - - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - - public DeviceCreateInput ipAddresses(List ipAddresses) { - - this.ipAddresses = ipAddresses; - return this; - } - - public DeviceCreateInput addIpAddressesItem(IPAddress ipAddressesItem) { - if (this.ipAddresses == null) { - this.ipAddresses = new ArrayList<>(); - } - this.ipAddresses.add(ipAddressesItem); - return this; - } - - /** - * The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. - * @return ipAddresses - **/ - @javax.annotation.Nullable - public List getIpAddresses() { - return ipAddresses; - } - - - public void setIpAddresses(List ipAddresses) { - this.ipAddresses = ipAddresses; - } - - - public DeviceCreateInput ipxeScriptUrl(String ipxeScriptUrl) { - - this.ipxeScriptUrl = ipxeScriptUrl; - return this; - } - - /** - * When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. - * @return ipxeScriptUrl - **/ - @javax.annotation.Nullable - public String getIpxeScriptUrl() { - return ipxeScriptUrl; - } - - - public void setIpxeScriptUrl(String ipxeScriptUrl) { - this.ipxeScriptUrl = ipxeScriptUrl; - } - - - public DeviceCreateInput locked(Boolean locked) { - - this.locked = locked; - return this; - } - - /** - * Whether the device should be locked, preventing accidental deletion. - * @return locked - **/ - @javax.annotation.Nullable - public Boolean getLocked() { - return locked; - } - - - public void setLocked(Boolean locked) { - this.locked = locked; - } - - - public DeviceCreateInput networkFrozen(Boolean networkFrozen) { - - this.networkFrozen = networkFrozen; - return this; - } - - /** - * If true, this instance can not be converted to a different network type. - * @return networkFrozen - **/ - @javax.annotation.Nullable - public Boolean getNetworkFrozen() { - return networkFrozen; - } - - - public void setNetworkFrozen(Boolean networkFrozen) { - this.networkFrozen = networkFrozen; - } - - - public DeviceCreateInput noSshKeys(Boolean noSshKeys) { - - this.noSshKeys = noSshKeys; - return this; - } - - /** - * Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified - * @return noSshKeys - **/ - @javax.annotation.Nullable - public Boolean getNoSshKeys() { - return noSshKeys; - } - - - public void setNoSshKeys(Boolean noSshKeys) { - this.noSshKeys = noSshKeys; - } - - - public DeviceCreateInput operatingSystem(String operatingSystem) { - - this.operatingSystem = operatingSystem; - return this; - } - - /** - * The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. - * @return operatingSystem - **/ - @javax.annotation.Nonnull - public String getOperatingSystem() { - return operatingSystem; - } - - - public void setOperatingSystem(String operatingSystem) { - this.operatingSystem = operatingSystem; - } - - - public DeviceCreateInput plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * The slug of the device plan to provision. - * @return plan - **/ - @javax.annotation.Nonnull - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public DeviceCreateInput privateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - return this; - } - - /** - * Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. - * @return privateIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPrivateIpv4SubnetSize() { - return privateIpv4SubnetSize; - } - - - public void setPrivateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - } - - - public DeviceCreateInput projectSshKeys(List projectSshKeys) { - - this.projectSshKeys = projectSshKeys; - return this; - } - - public DeviceCreateInput addProjectSshKeysItem(UUID projectSshKeysItem) { - if (this.projectSshKeys == null) { - this.projectSshKeys = new ArrayList<>(); - } - this.projectSshKeys.add(projectSshKeysItem); - return this; - } - - /** - * A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. - * @return projectSshKeys - **/ - @javax.annotation.Nullable - public List getProjectSshKeys() { - return projectSshKeys; - } - - - public void setProjectSshKeys(List projectSshKeys) { - this.projectSshKeys = projectSshKeys; - } - - - public DeviceCreateInput publicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - return this; - } - - /** - * Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. - * @return publicIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPublicIpv4SubnetSize() { - return publicIpv4SubnetSize; - } - - - public void setPublicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - } - - - public DeviceCreateInput spotInstance(Boolean spotInstance) { - - this.spotInstance = spotInstance; - return this; - } - - /** - * Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. - * @return spotInstance - **/ - @javax.annotation.Nullable - public Boolean getSpotInstance() { - return spotInstance; - } - - - public void setSpotInstance(Boolean spotInstance) { - this.spotInstance = spotInstance; - } - - - public DeviceCreateInput spotPriceMax(Float spotPriceMax) { - - this.spotPriceMax = spotPriceMax; - return this; - } - - /** - * The maximum amount to bid for a spot instance. - * @return spotPriceMax - **/ - @javax.annotation.Nullable - public Float getSpotPriceMax() { - return spotPriceMax; - } - - - public void setSpotPriceMax(Float spotPriceMax) { - this.spotPriceMax = spotPriceMax; - } - - - public DeviceCreateInput sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public DeviceCreateInput addSshKeysItem(SSHKeyInput sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - - public DeviceCreateInput storage(Storage storage) { - - this.storage = storage; - return this; - } - - /** - * Get storage - * @return storage - **/ - @javax.annotation.Nullable - public Storage getStorage() { - return storage; - } - - - public void setStorage(Storage storage) { - this.storage = storage; - } - - - public DeviceCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public DeviceCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public DeviceCreateInput terminationTime(OffsetDateTime terminationTime) { - - this.terminationTime = terminationTime; - return this; - } - - /** - * When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. - * @return terminationTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getTerminationTime() { - return terminationTime; - } - - - public void setTerminationTime(OffsetDateTime terminationTime) { - this.terminationTime = terminationTime; - } - - - public DeviceCreateInput userSshKeys(List userSshKeys) { - - this.userSshKeys = userSshKeys; - return this; - } - - public DeviceCreateInput addUserSshKeysItem(UUID userSshKeysItem) { - if (this.userSshKeys == null) { - this.userSshKeys = new ArrayList<>(); - } - this.userSshKeys.add(userSshKeysItem); - return this; - } - - /** - * A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. - * @return userSshKeys - **/ - @javax.annotation.Nullable - public List getUserSshKeys() { - return userSshKeys; - } - - - public void setUserSshKeys(List userSshKeys) { - this.userSshKeys = userSshKeys; - } - - - public DeviceCreateInput userdata(String userdata) { - - this.userdata = userdata; - return this; - } - - /** - * The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. - * @return userdata - **/ - @javax.annotation.Nullable - public String getUserdata() { - return userdata; - } - - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceCreateInput instance itself - */ - public DeviceCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceCreateInput deviceCreateInput = (DeviceCreateInput) o; - return Objects.equals(this.alwaysPxe, deviceCreateInput.alwaysPxe) && - Objects.equals(this.billingCycle, deviceCreateInput.billingCycle) && - Objects.equals(this.customdata, deviceCreateInput.customdata) && - Objects.equals(this.description, deviceCreateInput.description) && - Objects.equals(this.features, deviceCreateInput.features) && - Objects.equals(this.hardwareReservationId, deviceCreateInput.hardwareReservationId) && - Objects.equals(this.hostname, deviceCreateInput.hostname) && - Objects.equals(this.ipAddresses, deviceCreateInput.ipAddresses) && - Objects.equals(this.ipxeScriptUrl, deviceCreateInput.ipxeScriptUrl) && - Objects.equals(this.locked, deviceCreateInput.locked) && - Objects.equals(this.networkFrozen, deviceCreateInput.networkFrozen) && - Objects.equals(this.noSshKeys, deviceCreateInput.noSshKeys) && - Objects.equals(this.operatingSystem, deviceCreateInput.operatingSystem) && - Objects.equals(this.plan, deviceCreateInput.plan) && - Objects.equals(this.privateIpv4SubnetSize, deviceCreateInput.privateIpv4SubnetSize) && - Objects.equals(this.projectSshKeys, deviceCreateInput.projectSshKeys) && - Objects.equals(this.publicIpv4SubnetSize, deviceCreateInput.publicIpv4SubnetSize) && - Objects.equals(this.spotInstance, deviceCreateInput.spotInstance) && - Objects.equals(this.spotPriceMax, deviceCreateInput.spotPriceMax) && - Objects.equals(this.sshKeys, deviceCreateInput.sshKeys) && - Objects.equals(this.storage, deviceCreateInput.storage) && - Objects.equals(this.tags, deviceCreateInput.tags) && - Objects.equals(this.terminationTime, deviceCreateInput.terminationTime) && - Objects.equals(this.userSshKeys, deviceCreateInput.userSshKeys) && - Objects.equals(this.userdata, deviceCreateInput.userdata)&& - Objects.equals(this.additionalProperties, deviceCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(alwaysPxe, billingCycle, customdata, description, features, hardwareReservationId, hostname, ipAddresses, ipxeScriptUrl, locked, networkFrozen, noSshKeys, operatingSystem, plan, privateIpv4SubnetSize, projectSshKeys, publicIpv4SubnetSize, spotInstance, spotPriceMax, sshKeys, storage, tags, terminationTime, userSshKeys, userdata, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceCreateInput {\n"); - sb.append(" alwaysPxe: ").append(toIndentedString(alwaysPxe)).append("\n"); - sb.append(" billingCycle: ").append(toIndentedString(billingCycle)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" features: ").append(toIndentedString(features)).append("\n"); - sb.append(" hardwareReservationId: ").append(toIndentedString(hardwareReservationId)).append("\n"); - sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); - sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); - sb.append(" ipxeScriptUrl: ").append(toIndentedString(ipxeScriptUrl)).append("\n"); - sb.append(" locked: ").append(toIndentedString(locked)).append("\n"); - sb.append(" networkFrozen: ").append(toIndentedString(networkFrozen)).append("\n"); - sb.append(" noSshKeys: ").append(toIndentedString(noSshKeys)).append("\n"); - sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" privateIpv4SubnetSize: ").append(toIndentedString(privateIpv4SubnetSize)).append("\n"); - sb.append(" projectSshKeys: ").append(toIndentedString(projectSshKeys)).append("\n"); - sb.append(" publicIpv4SubnetSize: ").append(toIndentedString(publicIpv4SubnetSize)).append("\n"); - sb.append(" spotInstance: ").append(toIndentedString(spotInstance)).append("\n"); - sb.append(" spotPriceMax: ").append(toIndentedString(spotPriceMax)).append("\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" storage: ").append(toIndentedString(storage)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" terminationTime: ").append(toIndentedString(terminationTime)).append("\n"); - sb.append(" userSshKeys: ").append(toIndentedString(userSshKeys)).append("\n"); - sb.append(" userdata: ").append(toIndentedString(userdata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("always_pxe"); - openapiFields.add("billing_cycle"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("features"); - openapiFields.add("hardware_reservation_id"); - openapiFields.add("hostname"); - openapiFields.add("ip_addresses"); - openapiFields.add("ipxe_script_url"); - openapiFields.add("locked"); - openapiFields.add("network_frozen"); - openapiFields.add("no_ssh_keys"); - openapiFields.add("operating_system"); - openapiFields.add("plan"); - openapiFields.add("private_ipv4_subnet_size"); - openapiFields.add("project_ssh_keys"); - openapiFields.add("public_ipv4_subnet_size"); - openapiFields.add("spot_instance"); - openapiFields.add("spot_price_max"); - openapiFields.add("ssh_keys"); - openapiFields.add("storage"); - openapiFields.add("tags"); - openapiFields.add("termination_time"); - openapiFields.add("user_ssh_keys"); - openapiFields.add("userdata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("operating_system"); - openapiRequiredFields.add("plan"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceCreateInput is not found in the empty JSON string", DeviceCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeviceCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) && !jsonObj.get("billing_cycle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billing_cycle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billing_cycle").toString())); - } - // validate the optional field `billing_cycle` - if (jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) { - BillingCycleEnum.validateJsonElement(jsonObj.get("billing_cycle")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull() && !jsonObj.get("features").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); - } - if ((jsonObj.get("hardware_reservation_id") != null && !jsonObj.get("hardware_reservation_id").isJsonNull()) && !jsonObj.get("hardware_reservation_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hardware_reservation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hardware_reservation_id").toString())); - } - if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); - } - if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { - JsonArray jsonArrayipAddresses = jsonObj.getAsJsonArray("ip_addresses"); - if (jsonArrayipAddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("ip_addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_addresses` to be an array in the JSON string but got `%s`", jsonObj.get("ip_addresses").toString())); - } - - // validate the optional field `ip_addresses` (array) - for (int i = 0; i < jsonArrayipAddresses.size(); i++) { - IPAddress.validateJsonElement(jsonArrayipAddresses.get(i)); - }; - } - } - if ((jsonObj.get("ipxe_script_url") != null && !jsonObj.get("ipxe_script_url").isJsonNull()) && !jsonObj.get("ipxe_script_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); - } - if (!jsonObj.get("operating_system").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operating_system` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operating_system").toString())); - } - if (!jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonNull() && !jsonObj.get("project_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); - } - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { - JsonArray jsonArraysshKeys = jsonObj.getAsJsonArray("ssh_keys"); - if (jsonArraysshKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - - // validate the optional field `ssh_keys` (array) - for (int i = 0; i < jsonArraysshKeys.size(); i++) { - SSHKeyInput.validateJsonElement(jsonArraysshKeys.get(i)); - }; - } - } - // validate the optional field `storage` - if (jsonObj.get("storage") != null && !jsonObj.get("storage").isJsonNull()) { - Storage.validateJsonElement(jsonObj.get("storage")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonNull() && !jsonObj.get("user_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); - } - if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userdata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userdata").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceCreateInput - * @throws IOException if the JSON string is invalid with respect to DeviceCreateInput - */ - public static DeviceCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceCreateInput.class); - } - - /** - * Convert an instance of DeviceCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java deleted file mode 100644 index f127c68cb..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceCreatedBy.java +++ /dev/null @@ -1,569 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceCreatedBy - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceCreatedBy { - public static final String SERIALIZED_NAME_AVATAR_THUMB_URL = "avatar_thumb_url"; - @SerializedName(SERIALIZED_NAME_AVATAR_THUMB_URL) - private String avatarThumbUrl; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_FULL_NAME = "full_name"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private String fullName; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_SHORT_ID = "short_id"; - @SerializedName(SERIALIZED_NAME_SHORT_ID) - private String shortId; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public DeviceCreatedBy() { - } - - public DeviceCreatedBy avatarThumbUrl(String avatarThumbUrl) { - - this.avatarThumbUrl = avatarThumbUrl; - return this; - } - - /** - * Avatar thumbnail URL of the User - * @return avatarThumbUrl - **/ - @javax.annotation.Nullable - public String getAvatarThumbUrl() { - return avatarThumbUrl; - } - - - public void setAvatarThumbUrl(String avatarThumbUrl) { - this.avatarThumbUrl = avatarThumbUrl; - } - - - public DeviceCreatedBy createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * When the user was created - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public DeviceCreatedBy email(String email) { - - this.email = email; - return this; - } - - /** - * Primary email address of the User - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public DeviceCreatedBy firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * First name of the User - * @return firstName - **/ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public DeviceCreatedBy fullName(String fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Full name of the User - * @return fullName - **/ - @javax.annotation.Nullable - public String getFullName() { - return fullName; - } - - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - - public DeviceCreatedBy href(String href) { - - this.href = href; - return this; - } - - /** - * API URL uniquely representing the User - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public DeviceCreatedBy id(UUID id) { - - this.id = id; - return this; - } - - /** - * ID of the User - * @return id - **/ - @javax.annotation.Nonnull - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public DeviceCreatedBy lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Last name of the User - * @return lastName - **/ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public DeviceCreatedBy shortId(String shortId) { - - this.shortId = shortId; - return this; - } - - /** - * Short ID of the User - * @return shortId - **/ - @javax.annotation.Nonnull - public String getShortId() { - return shortId; - } - - - public void setShortId(String shortId) { - this.shortId = shortId; - } - - - public DeviceCreatedBy updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * When the user details were last updated - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceCreatedBy instance itself - */ - public DeviceCreatedBy putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceCreatedBy deviceCreatedBy = (DeviceCreatedBy) o; - return Objects.equals(this.avatarThumbUrl, deviceCreatedBy.avatarThumbUrl) && - Objects.equals(this.createdAt, deviceCreatedBy.createdAt) && - Objects.equals(this.email, deviceCreatedBy.email) && - Objects.equals(this.firstName, deviceCreatedBy.firstName) && - Objects.equals(this.fullName, deviceCreatedBy.fullName) && - Objects.equals(this.href, deviceCreatedBy.href) && - Objects.equals(this.id, deviceCreatedBy.id) && - Objects.equals(this.lastName, deviceCreatedBy.lastName) && - Objects.equals(this.shortId, deviceCreatedBy.shortId) && - Objects.equals(this.updatedAt, deviceCreatedBy.updatedAt)&& - Objects.equals(this.additionalProperties, deviceCreatedBy.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(avatarThumbUrl, createdAt, email, firstName, fullName, href, id, lastName, shortId, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceCreatedBy {\n"); - sb.append(" avatarThumbUrl: ").append(toIndentedString(avatarThumbUrl)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" shortId: ").append(toIndentedString(shortId)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatar_thumb_url"); - openapiFields.add("created_at"); - openapiFields.add("email"); - openapiFields.add("first_name"); - openapiFields.add("full_name"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("last_name"); - openapiFields.add("short_id"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("short_id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceCreatedBy - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceCreatedBy.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceCreatedBy is not found in the empty JSON string", DeviceCreatedBy.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeviceCreatedBy.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avatar_thumb_url") != null && !jsonObj.get("avatar_thumb_url").isJsonNull()) && !jsonObj.get("avatar_thumb_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatar_thumb_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar_thumb_url").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("first_name") != null && !jsonObj.get("first_name").isJsonNull()) && !jsonObj.get("first_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); - } - if ((jsonObj.get("full_name") != null && !jsonObj.get("full_name").isJsonNull()) && !jsonObj.get("full_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `full_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("full_name").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("last_name") != null && !jsonObj.get("last_name").isJsonNull()) && !jsonObj.get("last_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); - } - if (!jsonObj.get("short_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("short_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceCreatedBy.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceCreatedBy' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceCreatedBy.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceCreatedBy value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceCreatedBy read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceCreatedBy instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceCreatedBy given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceCreatedBy - * @throws IOException if the JSON string is invalid with respect to DeviceCreatedBy - */ - public static DeviceCreatedBy fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceCreatedBy.class); - } - - /** - * Convert an instance of DeviceCreatedBy to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceHealthRollup.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceHealthRollup.java deleted file mode 100644 index e2e98161f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceHealthRollup.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Represents a Device Health Status - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceHealthRollup { - /** - * Health Status - */ - @JsonAdapter(HealthRollupEnum.Adapter.class) - public enum HealthRollupEnum { - OK("ok"), - - WARNING("warning"), - - CRITICAL("critical"); - - private String value; - - HealthRollupEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static HealthRollupEnum fromValue(String value) { - for (HealthRollupEnum b : HealthRollupEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final HealthRollupEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public HealthRollupEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return HealthRollupEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - HealthRollupEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_HEALTH_ROLLUP = "health_rollup"; - @SerializedName(SERIALIZED_NAME_HEALTH_ROLLUP) - private HealthRollupEnum healthRollup; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public DeviceHealthRollup() { - } - - - public DeviceHealthRollup( - HealthRollupEnum healthRollup, - OffsetDateTime updatedAt - ) { - this(); - this.healthRollup = healthRollup; - this.updatedAt = updatedAt; - } - - /** - * Health Status - * @return healthRollup - **/ - @javax.annotation.Nullable - public HealthRollupEnum getHealthRollup() { - return healthRollup; - } - - - - - /** - * Last update of health status. - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceHealthRollup instance itself - */ - public DeviceHealthRollup putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceHealthRollup deviceHealthRollup = (DeviceHealthRollup) o; - return Objects.equals(this.healthRollup, deviceHealthRollup.healthRollup) && - Objects.equals(this.updatedAt, deviceHealthRollup.updatedAt)&& - Objects.equals(this.additionalProperties, deviceHealthRollup.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(healthRollup, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceHealthRollup {\n"); - sb.append(" healthRollup: ").append(toIndentedString(healthRollup)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("health_rollup"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceHealthRollup - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceHealthRollup.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceHealthRollup is not found in the empty JSON string", DeviceHealthRollup.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("health_rollup") != null && !jsonObj.get("health_rollup").isJsonNull()) && !jsonObj.get("health_rollup").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `health_rollup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("health_rollup").toString())); - } - // validate the optional field `health_rollup` - if (jsonObj.get("health_rollup") != null && !jsonObj.get("health_rollup").isJsonNull()) { - HealthRollupEnum.validateJsonElement(jsonObj.get("health_rollup")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceHealthRollup.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceHealthRollup' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceHealthRollup.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceHealthRollup value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceHealthRollup read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceHealthRollup instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceHealthRollup given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceHealthRollup - * @throws IOException if the JSON string is invalid with respect to DeviceHealthRollup - */ - public static DeviceHealthRollup fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceHealthRollup.class); - } - - /** - * Convert an instance of DeviceHealthRollup to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java deleted file mode 100644 index 60e411b08..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Device; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceList { - public static final String SERIALIZED_NAME_DEVICES = "devices"; - @SerializedName(SERIALIZED_NAME_DEVICES) - private List devices; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public DeviceList() { - } - - public DeviceList devices(List devices) { - - this.devices = devices; - return this; - } - - public DeviceList addDevicesItem(Device devicesItem) { - if (this.devices == null) { - this.devices = new ArrayList<>(); - } - this.devices.add(devicesItem); - return this; - } - - /** - * Get devices - * @return devices - **/ - @javax.annotation.Nullable - public List getDevices() { - return devices; - } - - - public void setDevices(List devices) { - this.devices = devices; - } - - - public DeviceList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceList instance itself - */ - public DeviceList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceList deviceList = (DeviceList) o; - return Objects.equals(this.devices, deviceList.devices) && - Objects.equals(this.meta, deviceList.meta)&& - Objects.equals(this.additionalProperties, deviceList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(devices, meta, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceList {\n"); - sb.append(" devices: ").append(toIndentedString(devices)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("devices"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceList is not found in the empty JSON string", DeviceList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("devices") != null && !jsonObj.get("devices").isJsonNull()) { - JsonArray jsonArraydevices = jsonObj.getAsJsonArray("devices"); - if (jsonArraydevices != null) { - // ensure the json data is an array - if (!jsonObj.get("devices").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); - } - - // validate the optional field `devices` (array) - for (int i = 0; i < jsonArraydevices.size(); i++) { - Device.validateJsonElement(jsonArraydevices.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceList given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceList - * @throws IOException if the JSON string is invalid with respect to DeviceList - */ - public static DeviceList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceList.class); - } - - /** - * Convert an instance of DeviceList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java deleted file mode 100644 index 7e8ecf6b2..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceMetro.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceMetro - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceMetro { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public DeviceMetro() { - } - - public DeviceMetro code(String code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - - public void setCode(String code) { - this.code = code; - } - - - public DeviceMetro country(String country) { - - this.country = country; - return this; - } - - /** - * Get country - * @return country - **/ - @javax.annotation.Nullable - public String getCountry() { - return country; - } - - - public void setCountry(String country) { - this.country = country; - } - - - public DeviceMetro id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public DeviceMetro name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceMetro instance itself - */ - public DeviceMetro putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceMetro deviceMetro = (DeviceMetro) o; - return Objects.equals(this.code, deviceMetro.code) && - Objects.equals(this.country, deviceMetro.country) && - Objects.equals(this.id, deviceMetro.id) && - Objects.equals(this.name, deviceMetro.name)&& - Objects.equals(this.additionalProperties, deviceMetro.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(code, country, id, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceMetro {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("country"); - openapiFields.add("id"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceMetro - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceMetro is not found in the empty JSON string", DeviceMetro.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); - } - if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceMetro.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceMetro' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceMetro.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceMetro value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceMetro read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceMetro instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceMetro given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceMetro - * @throws IOException if the JSON string is invalid with respect to DeviceMetro - */ - public static DeviceMetro fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceMetro.class); - } - - /** - * Convert an instance of DeviceMetro to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java deleted file mode 100644 index b0f9ae00a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProject.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceProject - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceProject { - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public DeviceProject() { - } - - public DeviceProject href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nonnull - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceProject instance itself - */ - public DeviceProject putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceProject deviceProject = (DeviceProject) o; - return Objects.equals(this.href, deviceProject.href)&& - Objects.equals(this.additionalProperties, deviceProject.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(href, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceProject {\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("href"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("href"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceProject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceProject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceProject is not found in the empty JSON string", DeviceProject.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeviceProject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceProject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceProject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceProject.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceProject value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceProject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceProject instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceProject given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceProject - * @throws IOException if the JSON string is invalid with respect to DeviceProject - */ - public static DeviceProject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceProject.class); - } - - /** - * Convert an instance of DeviceProject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java deleted file mode 100644 index ebdc86963..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceProjectLite.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceProjectLite - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceProjectLite { - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public DeviceProjectLite() { - } - - public DeviceProjectLite href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nonnull - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceProjectLite instance itself - */ - public DeviceProjectLite putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceProjectLite deviceProjectLite = (DeviceProjectLite) o; - return Objects.equals(this.href, deviceProjectLite.href)&& - Objects.equals(this.additionalProperties, deviceProjectLite.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(href, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceProjectLite {\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("href"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("href"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceProjectLite - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceProjectLite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceProjectLite is not found in the empty JSON string", DeviceProjectLite.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeviceProjectLite.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceProjectLite.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceProjectLite' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceProjectLite.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceProjectLite value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceProjectLite read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceProjectLite instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceProjectLite given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceProjectLite - * @throws IOException if the JSON string is invalid with respect to DeviceProjectLite - */ - public static DeviceProjectLite fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceProjectLite.class); - } - - /** - * Convert an instance of DeviceProjectLite to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java deleted file mode 100644 index 913324dd9..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInput.java +++ /dev/null @@ -1,632 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceUpdateInput { - public static final String SERIALIZED_NAME_ALWAYS_PXE = "always_pxe"; - @SerializedName(SERIALIZED_NAME_ALWAYS_PXE) - private Boolean alwaysPxe; - - public static final String SERIALIZED_NAME_BILLING_CYCLE = "billing_cycle"; - @SerializedName(SERIALIZED_NAME_BILLING_CYCLE) - private String billingCycle; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Map customdata = new HashMap<>(); - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; - @SerializedName(SERIALIZED_NAME_HOSTNAME) - private String hostname; - - public static final String SERIALIZED_NAME_FIRMWARE_SET_ID = "firmware_set_id"; - @SerializedName(SERIALIZED_NAME_FIRMWARE_SET_ID) - private String firmwareSetId; - - public static final String SERIALIZED_NAME_IPXE_SCRIPT_URL = "ipxe_script_url"; - @SerializedName(SERIALIZED_NAME_IPXE_SCRIPT_URL) - private String ipxeScriptUrl; - - public static final String SERIALIZED_NAME_LOCKED = "locked"; - @SerializedName(SERIALIZED_NAME_LOCKED) - private Boolean locked; - - public static final String SERIALIZED_NAME_NETWORK_FROZEN = "network_frozen"; - @SerializedName(SERIALIZED_NAME_NETWORK_FROZEN) - private Boolean networkFrozen; - - public static final String SERIALIZED_NAME_SPOT_INSTANCE = "spot_instance"; - @SerializedName(SERIALIZED_NAME_SPOT_INSTANCE) - private Boolean spotInstance; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_USERDATA = "userdata"; - @SerializedName(SERIALIZED_NAME_USERDATA) - private String userdata; - - public DeviceUpdateInput() { - } - - public DeviceUpdateInput alwaysPxe(Boolean alwaysPxe) { - - this.alwaysPxe = alwaysPxe; - return this; - } - - /** - * Get alwaysPxe - * @return alwaysPxe - **/ - @javax.annotation.Nullable - public Boolean getAlwaysPxe() { - return alwaysPxe; - } - - - public void setAlwaysPxe(Boolean alwaysPxe) { - this.alwaysPxe = alwaysPxe; - } - - - public DeviceUpdateInput billingCycle(String billingCycle) { - - this.billingCycle = billingCycle; - return this; - } - - /** - * Get billingCycle - * @return billingCycle - **/ - @javax.annotation.Nullable - public String getBillingCycle() { - return billingCycle; - } - - - public void setBillingCycle(String billingCycle) { - this.billingCycle = billingCycle; - } - - - public DeviceUpdateInput customdata(Map customdata) { - - this.customdata = customdata; - return this; - } - - public DeviceUpdateInput putCustomdataItem(String key, Object customdataItem) { - if (this.customdata == null) { - this.customdata = new HashMap<>(); - } - this.customdata.put(key, customdataItem); - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Map getCustomdata() { - return customdata; - } - - - public void setCustomdata(Map customdata) { - this.customdata = customdata; - } - - - public DeviceUpdateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public DeviceUpdateInput hostname(String hostname) { - - this.hostname = hostname; - return this; - } - - /** - * Get hostname - * @return hostname - **/ - @javax.annotation.Nullable - public String getHostname() { - return hostname; - } - - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - - public DeviceUpdateInput firmwareSetId(String firmwareSetId) { - - this.firmwareSetId = firmwareSetId; - return this; - } - - /** - * Get firmwareSetId - * @return firmwareSetId - **/ - @javax.annotation.Nullable - public String getFirmwareSetId() { - return firmwareSetId; - } - - - public void setFirmwareSetId(String firmwareSetId) { - this.firmwareSetId = firmwareSetId; - } - - - public DeviceUpdateInput ipxeScriptUrl(String ipxeScriptUrl) { - - this.ipxeScriptUrl = ipxeScriptUrl; - return this; - } - - /** - * Get ipxeScriptUrl - * @return ipxeScriptUrl - **/ - @javax.annotation.Nullable - public String getIpxeScriptUrl() { - return ipxeScriptUrl; - } - - - public void setIpxeScriptUrl(String ipxeScriptUrl) { - this.ipxeScriptUrl = ipxeScriptUrl; - } - - - public DeviceUpdateInput locked(Boolean locked) { - - this.locked = locked; - return this; - } - - /** - * Whether the device should be locked, preventing accidental deletion. - * @return locked - **/ - @javax.annotation.Nullable - public Boolean getLocked() { - return locked; - } - - - public void setLocked(Boolean locked) { - this.locked = locked; - } - - - public DeviceUpdateInput networkFrozen(Boolean networkFrozen) { - - this.networkFrozen = networkFrozen; - return this; - } - - /** - * If true, this instance can not be converted to a different network type. - * @return networkFrozen - **/ - @javax.annotation.Nullable - public Boolean getNetworkFrozen() { - return networkFrozen; - } - - - public void setNetworkFrozen(Boolean networkFrozen) { - this.networkFrozen = networkFrozen; - } - - - public DeviceUpdateInput spotInstance(Boolean spotInstance) { - - this.spotInstance = spotInstance; - return this; - } - - /** - * Can be set to false to convert a spot-market instance to on-demand. - * @return spotInstance - **/ - @javax.annotation.Nullable - public Boolean getSpotInstance() { - return spotInstance; - } - - - public void setSpotInstance(Boolean spotInstance) { - this.spotInstance = spotInstance; - } - - - public DeviceUpdateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public DeviceUpdateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public DeviceUpdateInput userdata(String userdata) { - - this.userdata = userdata; - return this; - } - - /** - * Get userdata - * @return userdata - **/ - @javax.annotation.Nullable - public String getUserdata() { - return userdata; - } - - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceUpdateInput instance itself - */ - public DeviceUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceUpdateInput deviceUpdateInput = (DeviceUpdateInput) o; - return Objects.equals(this.alwaysPxe, deviceUpdateInput.alwaysPxe) && - Objects.equals(this.billingCycle, deviceUpdateInput.billingCycle) && - Objects.equals(this.customdata, deviceUpdateInput.customdata) && - Objects.equals(this.description, deviceUpdateInput.description) && - Objects.equals(this.hostname, deviceUpdateInput.hostname) && - Objects.equals(this.firmwareSetId, deviceUpdateInput.firmwareSetId) && - Objects.equals(this.ipxeScriptUrl, deviceUpdateInput.ipxeScriptUrl) && - Objects.equals(this.locked, deviceUpdateInput.locked) && - Objects.equals(this.networkFrozen, deviceUpdateInput.networkFrozen) && - Objects.equals(this.spotInstance, deviceUpdateInput.spotInstance) && - Objects.equals(this.tags, deviceUpdateInput.tags) && - Objects.equals(this.userdata, deviceUpdateInput.userdata)&& - Objects.equals(this.additionalProperties, deviceUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(alwaysPxe, billingCycle, customdata, description, hostname, firmwareSetId, ipxeScriptUrl, locked, networkFrozen, spotInstance, tags, userdata, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceUpdateInput {\n"); - sb.append(" alwaysPxe: ").append(toIndentedString(alwaysPxe)).append("\n"); - sb.append(" billingCycle: ").append(toIndentedString(billingCycle)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); - sb.append(" firmwareSetId: ").append(toIndentedString(firmwareSetId)).append("\n"); - sb.append(" ipxeScriptUrl: ").append(toIndentedString(ipxeScriptUrl)).append("\n"); - sb.append(" locked: ").append(toIndentedString(locked)).append("\n"); - sb.append(" networkFrozen: ").append(toIndentedString(networkFrozen)).append("\n"); - sb.append(" spotInstance: ").append(toIndentedString(spotInstance)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" userdata: ").append(toIndentedString(userdata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("always_pxe"); - openapiFields.add("billing_cycle"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("hostname"); - openapiFields.add("firmware_set_id"); - openapiFields.add("ipxe_script_url"); - openapiFields.add("locked"); - openapiFields.add("network_frozen"); - openapiFields.add("spot_instance"); - openapiFields.add("tags"); - openapiFields.add("userdata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceUpdateInput is not found in the empty JSON string", DeviceUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) && !jsonObj.get("billing_cycle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billing_cycle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billing_cycle").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); - } - if ((jsonObj.get("firmware_set_id") != null && !jsonObj.get("firmware_set_id").isJsonNull()) && !jsonObj.get("firmware_set_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firmware_set_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firmware_set_id").toString())); - } - if ((jsonObj.get("ipxe_script_url") != null && !jsonObj.get("ipxe_script_url").isJsonNull()) && !jsonObj.get("ipxe_script_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userdata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userdata").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceUpdateInput - * @throws IOException if the JSON string is invalid with respect to DeviceUpdateInput - */ - public static DeviceUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceUpdateInput.class); - } - - /** - * Convert an instance of DeviceUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java deleted file mode 100644 index 1c4677d2d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsage.java +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceUsage - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceUsage { - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private String quantity; - - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - private String total; - - public static final String SERIALIZED_NAME_UNIT = "unit"; - @SerializedName(SERIALIZED_NAME_UNIT) - private String unit; - - public DeviceUsage() { - } - - public DeviceUsage quantity(String quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - public String getQuantity() { - return quantity; - } - - - public void setQuantity(String quantity) { - this.quantity = quantity; - } - - - public DeviceUsage total(String total) { - - this.total = total; - return this; - } - - /** - * Get total - * @return total - **/ - @javax.annotation.Nullable - public String getTotal() { - return total; - } - - - public void setTotal(String total) { - this.total = total; - } - - - public DeviceUsage unit(String unit) { - - this.unit = unit; - return this; - } - - /** - * Get unit - * @return unit - **/ - @javax.annotation.Nullable - public String getUnit() { - return unit; - } - - - public void setUnit(String unit) { - this.unit = unit; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceUsage instance itself - */ - public DeviceUsage putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceUsage deviceUsage = (DeviceUsage) o; - return Objects.equals(this.quantity, deviceUsage.quantity) && - Objects.equals(this.total, deviceUsage.total) && - Objects.equals(this.unit, deviceUsage.unit)&& - Objects.equals(this.additionalProperties, deviceUsage.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(quantity, total, unit, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceUsage {\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("quantity"); - openapiFields.add("total"); - openapiFields.add("unit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceUsage - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceUsage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceUsage is not found in the empty JSON string", DeviceUsage.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); - } - if ((jsonObj.get("total") != null && !jsonObj.get("total").isJsonNull()) && !jsonObj.get("total").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `total` to be a primitive type in the JSON string but got `%s`", jsonObj.get("total").toString())); - } - if ((jsonObj.get("unit") != null && !jsonObj.get("unit").isJsonNull()) && !jsonObj.get("unit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unit").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceUsage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceUsage' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceUsage.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceUsage value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceUsage read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceUsage instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceUsage given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceUsage - * @throws IOException if the JSON string is invalid with respect to DeviceUsage - */ - public static DeviceUsage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceUsage.class); - } - - /** - * Convert an instance of DeviceUsage to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java deleted file mode 100644 index c9ff9bce9..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/DeviceUsageList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.DeviceUsage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * DeviceUsageList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeviceUsageList { - public static final String SERIALIZED_NAME_USAGES = "usages"; - @SerializedName(SERIALIZED_NAME_USAGES) - private List usages; - - public DeviceUsageList() { - } - - public DeviceUsageList usages(List usages) { - - this.usages = usages; - return this; - } - - public DeviceUsageList addUsagesItem(DeviceUsage usagesItem) { - if (this.usages == null) { - this.usages = new ArrayList<>(); - } - this.usages.add(usagesItem); - return this; - } - - /** - * Get usages - * @return usages - **/ - @javax.annotation.Nullable - public List getUsages() { - return usages; - } - - - public void setUsages(List usages) { - this.usages = usages; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceUsageList instance itself - */ - public DeviceUsageList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceUsageList deviceUsageList = (DeviceUsageList) o; - return Objects.equals(this.usages, deviceUsageList.usages)&& - Objects.equals(this.additionalProperties, deviceUsageList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(usages, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceUsageList {\n"); - sb.append(" usages: ").append(toIndentedString(usages)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("usages"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceUsageList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceUsageList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeviceUsageList is not found in the empty JSON string", DeviceUsageList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("usages") != null && !jsonObj.get("usages").isJsonNull()) { - JsonArray jsonArrayusages = jsonObj.getAsJsonArray("usages"); - if (jsonArrayusages != null) { - // ensure the json data is an array - if (!jsonObj.get("usages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `usages` to be an array in the JSON string but got `%s`", jsonObj.get("usages").toString())); - } - - // validate the optional field `usages` (array) - for (int i = 0; i < jsonArrayusages.size(); i++) { - DeviceUsage.validateJsonElement(jsonArrayusages.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceUsageList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceUsageList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceUsageList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceUsageList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceUsageList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceUsageList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceUsageList given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceUsageList - * @throws IOException if the JSON string is invalid with respect to DeviceUsageList - */ - public static DeviceUsageList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceUsageList.class); - } - - /** - * Convert an instance of DeviceUsageList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Disk.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Disk.java deleted file mode 100644 index 602510834..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Disk.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Partition; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Disk - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Disk { - public static final String SERIALIZED_NAME_DEVICE = "device"; - @SerializedName(SERIALIZED_NAME_DEVICE) - private String device; - - public static final String SERIALIZED_NAME_WIPE_TABLE = "wipeTable"; - @SerializedName(SERIALIZED_NAME_WIPE_TABLE) - private Boolean wipeTable; - - public static final String SERIALIZED_NAME_PARTITIONS = "partitions"; - @SerializedName(SERIALIZED_NAME_PARTITIONS) - private List partitions; - - public Disk() { - } - - public Disk device(String device) { - - this.device = device; - return this; - } - - /** - * Get device - * @return device - **/ - @javax.annotation.Nullable - public String getDevice() { - return device; - } - - - public void setDevice(String device) { - this.device = device; - } - - - public Disk wipeTable(Boolean wipeTable) { - - this.wipeTable = wipeTable; - return this; - } - - /** - * Get wipeTable - * @return wipeTable - **/ - @javax.annotation.Nullable - public Boolean getWipeTable() { - return wipeTable; - } - - - public void setWipeTable(Boolean wipeTable) { - this.wipeTable = wipeTable; - } - - - public Disk partitions(List partitions) { - - this.partitions = partitions; - return this; - } - - public Disk addPartitionsItem(Partition partitionsItem) { - if (this.partitions == null) { - this.partitions = new ArrayList<>(); - } - this.partitions.add(partitionsItem); - return this; - } - - /** - * Get partitions - * @return partitions - **/ - @javax.annotation.Nullable - public List getPartitions() { - return partitions; - } - - - public void setPartitions(List partitions) { - this.partitions = partitions; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Disk instance itself - */ - public Disk putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Disk disk = (Disk) o; - return Objects.equals(this.device, disk.device) && - Objects.equals(this.wipeTable, disk.wipeTable) && - Objects.equals(this.partitions, disk.partitions)&& - Objects.equals(this.additionalProperties, disk.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(device, wipeTable, partitions, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Disk {\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" wipeTable: ").append(toIndentedString(wipeTable)).append("\n"); - sb.append(" partitions: ").append(toIndentedString(partitions)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("device"); - openapiFields.add("wipeTable"); - openapiFields.add("partitions"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Disk - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Disk.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Disk is not found in the empty JSON string", Disk.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("device") != null && !jsonObj.get("device").isJsonNull()) && !jsonObj.get("device").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `device` to be a primitive type in the JSON string but got `%s`", jsonObj.get("device").toString())); - } - if (jsonObj.get("partitions") != null && !jsonObj.get("partitions").isJsonNull()) { - JsonArray jsonArraypartitions = jsonObj.getAsJsonArray("partitions"); - if (jsonArraypartitions != null) { - // ensure the json data is an array - if (!jsonObj.get("partitions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `partitions` to be an array in the JSON string but got `%s`", jsonObj.get("partitions").toString())); - } - - // validate the optional field `partitions` (array) - for (int i = 0; i < jsonArraypartitions.size(); i++) { - Partition.validateJsonElement(jsonArraypartitions.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Disk.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Disk' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Disk.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Disk value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Disk read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Disk instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Disk given an JSON string - * - * @param jsonString JSON string - * @return An instance of Disk - * @throws IOException if the JSON string is invalid with respect to Disk - */ - public static Disk fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Disk.class); - } - - /** - * Convert an instance of Disk to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java deleted file mode 100644 index 3624934be..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Email.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Email - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Email { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_DEFAULT = "default"; - @SerializedName(SERIALIZED_NAME_DEFAULT) - private Boolean _default; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_VERIFIED = "verified"; - @SerializedName(SERIALIZED_NAME_VERIFIED) - private Boolean verified; - - public Email() { - } - - public Email address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public Email _default(Boolean _default) { - - this._default = _default; - return this; - } - - /** - * Get _default - * @return _default - **/ - @javax.annotation.Nullable - public Boolean getDefault() { - return _default; - } - - - public void setDefault(Boolean _default) { - this._default = _default; - } - - - public Email href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public Email id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Email verified(Boolean verified) { - - this.verified = verified; - return this; - } - - /** - * Get verified - * @return verified - **/ - @javax.annotation.Nullable - public Boolean getVerified() { - return verified; - } - - - public void setVerified(Boolean verified) { - this.verified = verified; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Email instance itself - */ - public Email putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Email email = (Email) o; - return Objects.equals(this.address, email.address) && - Objects.equals(this._default, email._default) && - Objects.equals(this.href, email.href) && - Objects.equals(this.id, email.id) && - Objects.equals(this.verified, email.verified)&& - Objects.equals(this.additionalProperties, email.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, _default, href, id, verified, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Email {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" verified: ").append(toIndentedString(verified)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("default"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("verified"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Email - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Email.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Email is not found in the empty JSON string", Email.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Email.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Email' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Email.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Email value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Email read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Email instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Email given an JSON string - * - * @param jsonString JSON string - * @return An instance of Email - * @throws IOException if the JSON string is invalid with respect to Email - */ - public static Email fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Email.class); - } - - /** - * Convert an instance of Email to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java deleted file mode 100644 index 74ac0309b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EmailInput.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * EmailInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class EmailInput { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_DEFAULT = "default"; - @SerializedName(SERIALIZED_NAME_DEFAULT) - private Boolean _default; - - public EmailInput() { - } - - public EmailInput address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public EmailInput _default(Boolean _default) { - - this._default = _default; - return this; - } - - /** - * Get _default - * @return _default - **/ - @javax.annotation.Nullable - public Boolean getDefault() { - return _default; - } - - - public void setDefault(Boolean _default) { - this._default = _default; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the EmailInput instance itself - */ - public EmailInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EmailInput emailInput = (EmailInput) o; - return Objects.equals(this.address, emailInput.address) && - Objects.equals(this._default, emailInput._default)&& - Objects.equals(this.additionalProperties, emailInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, _default, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EmailInput {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("default"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EmailInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EmailInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EmailInput is not found in the empty JSON string", EmailInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EmailInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EmailInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EmailInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EmailInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, EmailInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public EmailInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - EmailInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of EmailInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of EmailInput - * @throws IOException if the JSON string is invalid with respect to EmailInput - */ - public static EmailInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EmailInput.class); - } - - /** - * Convert an instance of EmailInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java deleted file mode 100644 index e461cc4e5..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Entitlement.java +++ /dev/null @@ -1,616 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Entitlement - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Entitlement { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FEATURE_ACCESS = "feature_access"; - @SerializedName(SERIALIZED_NAME_FEATURE_ACCESS) - private Object featureAccess; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_INSTANCE_QUOTA = "instance_quota"; - @SerializedName(SERIALIZED_NAME_INSTANCE_QUOTA) - private Object instanceQuota; - - public static final String SERIALIZED_NAME_IP_QUOTA = "ip_quota"; - @SerializedName(SERIALIZED_NAME_IP_QUOTA) - private Object ipQuota; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PROJECT_QUOTA = "project_quota"; - @SerializedName(SERIALIZED_NAME_PROJECT_QUOTA) - private Integer projectQuota = 0; - - public static final String SERIALIZED_NAME_SLUG = "slug"; - @SerializedName(SERIALIZED_NAME_SLUG) - private String slug; - - public static final String SERIALIZED_NAME_VOLUME_LIMITS = "volume_limits"; - @SerializedName(SERIALIZED_NAME_VOLUME_LIMITS) - private Object volumeLimits; - - public static final String SERIALIZED_NAME_VOLUME_QUOTA = "volume_quota"; - @SerializedName(SERIALIZED_NAME_VOLUME_QUOTA) - private Object volumeQuota; - - public static final String SERIALIZED_NAME_WEIGHT = "weight"; - @SerializedName(SERIALIZED_NAME_WEIGHT) - private Integer weight; - - public Entitlement() { - } - - public Entitlement description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public Entitlement featureAccess(Object featureAccess) { - - this.featureAccess = featureAccess; - return this; - } - - /** - * Get featureAccess - * @return featureAccess - **/ - @javax.annotation.Nullable - public Object getFeatureAccess() { - return featureAccess; - } - - - public void setFeatureAccess(Object featureAccess) { - this.featureAccess = featureAccess; - } - - - public Entitlement href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public Entitlement id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nonnull - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Entitlement instanceQuota(Object instanceQuota) { - - this.instanceQuota = instanceQuota; - return this; - } - - /** - * Get instanceQuota - * @return instanceQuota - **/ - @javax.annotation.Nullable - public Object getInstanceQuota() { - return instanceQuota; - } - - - public void setInstanceQuota(Object instanceQuota) { - this.instanceQuota = instanceQuota; - } - - - public Entitlement ipQuota(Object ipQuota) { - - this.ipQuota = ipQuota; - return this; - } - - /** - * Get ipQuota - * @return ipQuota - **/ - @javax.annotation.Nullable - public Object getIpQuota() { - return ipQuota; - } - - - public void setIpQuota(Object ipQuota) { - this.ipQuota = ipQuota; - } - - - public Entitlement name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Entitlement projectQuota(Integer projectQuota) { - - this.projectQuota = projectQuota; - return this; - } - - /** - * Get projectQuota - * @return projectQuota - **/ - @javax.annotation.Nullable - public Integer getProjectQuota() { - return projectQuota; - } - - - public void setProjectQuota(Integer projectQuota) { - this.projectQuota = projectQuota; - } - - - public Entitlement slug(String slug) { - - this.slug = slug; - return this; - } - - /** - * Get slug - * @return slug - **/ - @javax.annotation.Nonnull - public String getSlug() { - return slug; - } - - - public void setSlug(String slug) { - this.slug = slug; - } - - - public Entitlement volumeLimits(Object volumeLimits) { - - this.volumeLimits = volumeLimits; - return this; - } - - /** - * Get volumeLimits - * @return volumeLimits - **/ - @javax.annotation.Nullable - public Object getVolumeLimits() { - return volumeLimits; - } - - - public void setVolumeLimits(Object volumeLimits) { - this.volumeLimits = volumeLimits; - } - - - public Entitlement volumeQuota(Object volumeQuota) { - - this.volumeQuota = volumeQuota; - return this; - } - - /** - * Get volumeQuota - * @return volumeQuota - **/ - @javax.annotation.Nullable - public Object getVolumeQuota() { - return volumeQuota; - } - - - public void setVolumeQuota(Object volumeQuota) { - this.volumeQuota = volumeQuota; - } - - - public Entitlement weight(Integer weight) { - - this.weight = weight; - return this; - } - - /** - * Get weight - * @return weight - **/ - @javax.annotation.Nonnull - public Integer getWeight() { - return weight; - } - - - public void setWeight(Integer weight) { - this.weight = weight; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Entitlement instance itself - */ - public Entitlement putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Entitlement entitlement = (Entitlement) o; - return Objects.equals(this.description, entitlement.description) && - Objects.equals(this.featureAccess, entitlement.featureAccess) && - Objects.equals(this.href, entitlement.href) && - Objects.equals(this.id, entitlement.id) && - Objects.equals(this.instanceQuota, entitlement.instanceQuota) && - Objects.equals(this.ipQuota, entitlement.ipQuota) && - Objects.equals(this.name, entitlement.name) && - Objects.equals(this.projectQuota, entitlement.projectQuota) && - Objects.equals(this.slug, entitlement.slug) && - Objects.equals(this.volumeLimits, entitlement.volumeLimits) && - Objects.equals(this.volumeQuota, entitlement.volumeQuota) && - Objects.equals(this.weight, entitlement.weight)&& - Objects.equals(this.additionalProperties, entitlement.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, featureAccess, href, id, instanceQuota, ipQuota, name, projectQuota, slug, volumeLimits, volumeQuota, weight, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Entitlement {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" featureAccess: ").append(toIndentedString(featureAccess)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" instanceQuota: ").append(toIndentedString(instanceQuota)).append("\n"); - sb.append(" ipQuota: ").append(toIndentedString(ipQuota)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" projectQuota: ").append(toIndentedString(projectQuota)).append("\n"); - sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); - sb.append(" volumeLimits: ").append(toIndentedString(volumeLimits)).append("\n"); - sb.append(" volumeQuota: ").append(toIndentedString(volumeQuota)).append("\n"); - sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("feature_access"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("instance_quota"); - openapiFields.add("ip_quota"); - openapiFields.add("name"); - openapiFields.add("project_quota"); - openapiFields.add("slug"); - openapiFields.add("volume_limits"); - openapiFields.add("volume_quota"); - openapiFields.add("weight"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("slug"); - openapiRequiredFields.add("weight"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Entitlement - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Entitlement.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Entitlement is not found in the empty JSON string", Entitlement.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Entitlement.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("slug").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `slug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("slug").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Entitlement.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Entitlement' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Entitlement.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Entitlement value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Entitlement read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Entitlement instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Entitlement given an JSON string - * - * @param jsonString JSON string - * @return An instance of Entitlement - * @throws IOException if the JSON string is invalid with respect to Entitlement - */ - public static Entitlement fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Entitlement.class); - } - - /** - * Convert an instance of Entitlement to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java deleted file mode 100644 index c7ab1cbd9..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Error.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Error responses are included with 4xx and 5xx HTTP responses from the API service. Either \"error\" or \"errors\" will be set. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Error { - public static final String SERIALIZED_NAME_ERROR = "error"; - @SerializedName(SERIALIZED_NAME_ERROR) - private String error; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors; - - public Error() { - } - - public Error error(String error) { - - this.error = error; - return this; - } - - /** - * A description of the error that caused the request to fail. - * @return error - **/ - @javax.annotation.Nullable - public String getError() { - return error; - } - - - public void setError(String error) { - this.error = error; - } - - - public Error errors(List errors) { - - this.errors = errors; - return this; - } - - public Error addErrorsItem(String errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * A list of errors that contributed to the request failing. - * @return errors - **/ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - - public void setErrors(List errors) { - this.errors = errors; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Error instance itself - */ - public Error putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Error error = (Error) o; - return Objects.equals(this.error, error.error) && - Objects.equals(this.errors, error.errors)&& - Objects.equals(this.additionalProperties, error.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(error, errors, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Error {\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("error"); - openapiFields.add("errors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Error - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Error.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Error' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Error.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Error value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Error read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Error instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Error given an JSON string - * - * @param jsonString JSON string - * @return An instance of Error - * @throws IOException if the JSON string is invalid with respect to Error - */ - public static Error fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Error.class); - } - - /** - * Convert an instance of Error to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java deleted file mode 100644 index acdd3993d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Event.java +++ /dev/null @@ -1,582 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Event - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Event { - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private String body; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_INTERPOLATED = "interpolated"; - @SerializedName(SERIALIZED_NAME_INTERPOLATED) - private String interpolated; - - public static final String SERIALIZED_NAME_RELATIONSHIPS = "relationships"; - @SerializedName(SERIALIZED_NAME_RELATIONSHIPS) - private List relationships; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_MODIFIED_BY = "modified_by"; - @SerializedName(SERIALIZED_NAME_MODIFIED_BY) - private Object modifiedBy; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - public Event() { - } - - public Event body(String body) { - - this.body = body; - return this; - } - - /** - * Get body - * @return body - **/ - @javax.annotation.Nullable - public String getBody() { - return body; - } - - - public void setBody(String body) { - this.body = body; - } - - - public Event createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Event href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public Event id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Event interpolated(String interpolated) { - - this.interpolated = interpolated; - return this; - } - - /** - * Get interpolated - * @return interpolated - **/ - @javax.annotation.Nullable - public String getInterpolated() { - return interpolated; - } - - - public void setInterpolated(String interpolated) { - this.interpolated = interpolated; - } - - - public Event relationships(List relationships) { - - this.relationships = relationships; - return this; - } - - public Event addRelationshipsItem(Href relationshipsItem) { - if (this.relationships == null) { - this.relationships = new ArrayList<>(); - } - this.relationships.add(relationshipsItem); - return this; - } - - /** - * Get relationships - * @return relationships - **/ - @javax.annotation.Nullable - public List getRelationships() { - return relationships; - } - - - public void setRelationships(List relationships) { - this.relationships = relationships; - } - - - public Event state(String state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public String getState() { - return state; - } - - - public void setState(String state) { - this.state = state; - } - - - public Event type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public Event modifiedBy(Object modifiedBy) { - - this.modifiedBy = modifiedBy; - return this; - } - - /** - * Get modifiedBy - * @return modifiedBy - **/ - @javax.annotation.Nullable - public Object getModifiedBy() { - return modifiedBy; - } - - - public void setModifiedBy(Object modifiedBy) { - this.modifiedBy = modifiedBy; - } - - - public Event ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Event instance itself - */ - public Event putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Event event = (Event) o; - return Objects.equals(this.body, event.body) && - Objects.equals(this.createdAt, event.createdAt) && - Objects.equals(this.href, event.href) && - Objects.equals(this.id, event.id) && - Objects.equals(this.interpolated, event.interpolated) && - Objects.equals(this.relationships, event.relationships) && - Objects.equals(this.state, event.state) && - Objects.equals(this.type, event.type) && - Objects.equals(this.modifiedBy, event.modifiedBy) && - Objects.equals(this.ip, event.ip)&& - Objects.equals(this.additionalProperties, event.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(body, createdAt, href, id, interpolated, relationships, state, type, modifiedBy, ip, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Event {\n"); - sb.append(" body: ").append(toIndentedString(body)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" interpolated: ").append(toIndentedString(interpolated)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" modifiedBy: ").append(toIndentedString(modifiedBy)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("body"); - openapiFields.add("created_at"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("interpolated"); - openapiFields.add("relationships"); - openapiFields.add("state"); - openapiFields.add("type"); - openapiFields.add("modified_by"); - openapiFields.add("ip"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Event - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Event.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Event is not found in the empty JSON string", Event.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("body") != null && !jsonObj.get("body").isJsonNull()) && !jsonObj.get("body").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `body` to be a primitive type in the JSON string but got `%s`", jsonObj.get("body").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("interpolated") != null && !jsonObj.get("interpolated").isJsonNull()) && !jsonObj.get("interpolated").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `interpolated` to be a primitive type in the JSON string but got `%s`", jsonObj.get("interpolated").toString())); - } - if (jsonObj.get("relationships") != null && !jsonObj.get("relationships").isJsonNull()) { - JsonArray jsonArrayrelationships = jsonObj.getAsJsonArray("relationships"); - if (jsonArrayrelationships != null) { - // ensure the json data is an array - if (!jsonObj.get("relationships").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `relationships` to be an array in the JSON string but got `%s`", jsonObj.get("relationships").toString())); - } - - // validate the optional field `relationships` (array) - for (int i = 0; i < jsonArrayrelationships.size(); i++) { - Href.validateJsonElement(jsonArrayrelationships.get(i)); - }; - } - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Event.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Event' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Event.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Event value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Event read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Event instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Event given an JSON string - * - * @param jsonString JSON string - * @return An instance of Event - * @throws IOException if the JSON string is invalid with respect to Event - */ - public static Event fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Event.class); - } - - /** - * Convert an instance of Event to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java deleted file mode 100644 index a48676695..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/EventList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Event; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * EventList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class EventList { - public static final String SERIALIZED_NAME_EVENTS = "events"; - @SerializedName(SERIALIZED_NAME_EVENTS) - private List events; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public EventList() { - } - - public EventList events(List events) { - - this.events = events; - return this; - } - - public EventList addEventsItem(Event eventsItem) { - if (this.events == null) { - this.events = new ArrayList<>(); - } - this.events.add(eventsItem); - return this; - } - - /** - * Get events - * @return events - **/ - @javax.annotation.Nullable - public List getEvents() { - return events; - } - - - public void setEvents(List events) { - this.events = events; - } - - - public EventList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the EventList instance itself - */ - public EventList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EventList eventList = (EventList) o; - return Objects.equals(this.events, eventList.events) && - Objects.equals(this.meta, eventList.meta)&& - Objects.equals(this.additionalProperties, eventList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(events, meta, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EventList {\n"); - sb.append(" events: ").append(toIndentedString(events)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("events"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EventList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EventList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EventList is not found in the empty JSON string", EventList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("events") != null && !jsonObj.get("events").isJsonNull()) { - JsonArray jsonArrayevents = jsonObj.getAsJsonArray("events"); - if (jsonArrayevents != null) { - // ensure the json data is an array - if (!jsonObj.get("events").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `events` to be an array in the JSON string but got `%s`", jsonObj.get("events").toString())); - } - - // validate the optional field `events` (array) - for (int i = 0; i < jsonArrayevents.size(); i++) { - Event.validateJsonElement(jsonArrayevents.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EventList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EventList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EventList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, EventList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public EventList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - EventList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of EventList given an JSON string - * - * @param jsonString JSON string - * @return An instance of EventList - * @throws IOException if the JSON string is invalid with respect to EventList - */ - public static EventList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EventList.class); - } - - /** - * Convert an instance of EventList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java deleted file mode 100644 index 3eea6df51..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FabricServiceToken.java +++ /dev/null @@ -1,606 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * FabricServiceToken - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FabricServiceToken { - public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; - @SerializedName(SERIALIZED_NAME_EXPIRES_AT) - private OffsetDateTime expiresAt; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_MAX_ALLOWED_SPEED = "max_allowed_speed"; - @SerializedName(SERIALIZED_NAME_MAX_ALLOWED_SPEED) - private Integer maxAllowedSpeed; - - /** - * Either primary or secondary, depending on which interconnection the service token is associated to. - */ - @JsonAdapter(RoleEnum.Adapter.class) - public enum RoleEnum { - PRIMARY("primary"), - - SECONDARY("secondary"); - - private String value; - - RoleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RoleEnum fromValue(String value) { - for (RoleEnum b : RoleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RoleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RoleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - RoleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ROLE = "role"; - @SerializedName(SERIALIZED_NAME_ROLE) - private RoleEnum role; - - /** - * Either 'a_side' or 'z_side', depending on which type of Fabric VC was requested. - */ - @JsonAdapter(ServiceTokenTypeEnum.Adapter.class) - public enum ServiceTokenTypeEnum { - A_SIDE("a_side"), - - Z_SIDE("z_side"); - - private String value; - - ServiceTokenTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ServiceTokenTypeEnum fromValue(String value) { - for (ServiceTokenTypeEnum b : ServiceTokenTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ServiceTokenTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ServiceTokenTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ServiceTokenTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ServiceTokenTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SERVICE_TOKEN_TYPE = "service_token_type"; - @SerializedName(SERIALIZED_NAME_SERVICE_TOKEN_TYPE) - private ServiceTokenTypeEnum serviceTokenType; - - /** - * The state of the service token that corresponds with the service token state on Fabric. An 'inactive' state refers to a token that has not been redeemed yet on the Fabric side, an 'active' state refers to a token that has already been redeemed, and an 'expired' state refers to a token that has reached its expiry time. - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - INACTIVE("inactive"), - - ACTIVE("active"), - - EXPIRED("expired"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public FabricServiceToken() { - } - - public FabricServiceToken expiresAt(OffsetDateTime expiresAt) { - - this.expiresAt = expiresAt; - return this; - } - - /** - * The expiration date and time of the Fabric service token. Once a service token is expired, it is no longer redeemable. - * @return expiresAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getExpiresAt() { - return expiresAt; - } - - - public void setExpiresAt(OffsetDateTime expiresAt) { - this.expiresAt = expiresAt; - } - - - public FabricServiceToken id(UUID id) { - - this.id = id; - return this; - } - - /** - * The UUID that can be used on the Fabric Portal to redeem either an A-Side or Z-Side Service Token. For Fabric VCs (Metal Billed), this UUID will represent an A-Side Service Token, which will allow interconnections to be made from Equinix Metal to other Service Providers on Fabric. For Fabric VCs (Fabric Billed), this UUID will represent a Z-Side Service Token, which will allow interconnections to be made to connect an owned Fabric Port or Virtual Device to Equinix Metal. - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public FabricServiceToken maxAllowedSpeed(Integer maxAllowedSpeed) { - - this.maxAllowedSpeed = maxAllowedSpeed; - return this; - } - - /** - * The maximum speed that can be selected on the Fabric Portal when configuring a interconnection with either an A-Side or Z-Side Service Token. For Fabric VCs (Metal Billed), this is what the billing is based off of, and can be one of the following options, '50mbps', '200mbps', '500mbps', '1gbps', '2gbps', '5gbps' or '10gbps'. For Fabric VCs (Fabric Billed), this will default to 10Gbps. - * @return maxAllowedSpeed - **/ - @javax.annotation.Nullable - public Integer getMaxAllowedSpeed() { - return maxAllowedSpeed; - } - - - public void setMaxAllowedSpeed(Integer maxAllowedSpeed) { - this.maxAllowedSpeed = maxAllowedSpeed; - } - - - public FabricServiceToken role(RoleEnum role) { - - this.role = role; - return this; - } - - /** - * Either primary or secondary, depending on which interconnection the service token is associated to. - * @return role - **/ - @javax.annotation.Nullable - public RoleEnum getRole() { - return role; - } - - - public void setRole(RoleEnum role) { - this.role = role; - } - - - public FabricServiceToken serviceTokenType(ServiceTokenTypeEnum serviceTokenType) { - - this.serviceTokenType = serviceTokenType; - return this; - } - - /** - * Either 'a_side' or 'z_side', depending on which type of Fabric VC was requested. - * @return serviceTokenType - **/ - @javax.annotation.Nullable - public ServiceTokenTypeEnum getServiceTokenType() { - return serviceTokenType; - } - - - public void setServiceTokenType(ServiceTokenTypeEnum serviceTokenType) { - this.serviceTokenType = serviceTokenType; - } - - - public FabricServiceToken state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * The state of the service token that corresponds with the service token state on Fabric. An 'inactive' state refers to a token that has not been redeemed yet on the Fabric side, an 'active' state refers to a token that has already been redeemed, and an 'expired' state refers to a token that has reached its expiry time. - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the FabricServiceToken instance itself - */ - public FabricServiceToken putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FabricServiceToken fabricServiceToken = (FabricServiceToken) o; - return Objects.equals(this.expiresAt, fabricServiceToken.expiresAt) && - Objects.equals(this.id, fabricServiceToken.id) && - Objects.equals(this.maxAllowedSpeed, fabricServiceToken.maxAllowedSpeed) && - Objects.equals(this.role, fabricServiceToken.role) && - Objects.equals(this.serviceTokenType, fabricServiceToken.serviceTokenType) && - Objects.equals(this.state, fabricServiceToken.state)&& - Objects.equals(this.additionalProperties, fabricServiceToken.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(expiresAt, id, maxAllowedSpeed, role, serviceTokenType, state, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FabricServiceToken {\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" maxAllowedSpeed: ").append(toIndentedString(maxAllowedSpeed)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append(" serviceTokenType: ").append(toIndentedString(serviceTokenType)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("expires_at"); - openapiFields.add("id"); - openapiFields.add("max_allowed_speed"); - openapiFields.add("role"); - openapiFields.add("service_token_type"); - openapiFields.add("state"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FabricServiceToken - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FabricServiceToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FabricServiceToken is not found in the empty JSON string", FabricServiceToken.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) && !jsonObj.get("role").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); - } - // validate the optional field `role` - if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { - RoleEnum.validateJsonElement(jsonObj.get("role")); - } - if ((jsonObj.get("service_token_type") != null && !jsonObj.get("service_token_type").isJsonNull()) && !jsonObj.get("service_token_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `service_token_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("service_token_type").toString())); - } - // validate the optional field `service_token_type` - if (jsonObj.get("service_token_type") != null && !jsonObj.get("service_token_type").isJsonNull()) { - ServiceTokenTypeEnum.validateJsonElement(jsonObj.get("service_token_type")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FabricServiceToken.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FabricServiceToken' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FabricServiceToken.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FabricServiceToken value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public FabricServiceToken read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FabricServiceToken instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FabricServiceToken given an JSON string - * - * @param jsonString JSON string - * @return An instance of FabricServiceToken - * @throws IOException if the JSON string is invalid with respect to FabricServiceToken - */ - public static FabricServiceToken fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FabricServiceToken.class); - } - - /** - * Convert an instance of FabricServiceToken to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java deleted file mode 100644 index 4b646e0cc..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Facility.java +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Address; -import com.equinix.openapi.metal.v1.model.DeviceMetro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Facility - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Facility { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - /** - * Gets or Sets features - */ - @JsonAdapter(FeaturesEnum.Adapter.class) - public enum FeaturesEnum { - BAREMETAL("baremetal"), - - BACKEND_TRANSFER("backend_transfer"), - - LAYER_2("layer_2"), - - GLOBAL_IPV4("global_ipv4"), - - IBX("ibx"); - - private String value; - - FeaturesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FeaturesEnum fromValue(String value) { - for (FeaturesEnum b : FeaturesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FeaturesEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FeaturesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FeaturesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FeaturesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FEATURES = "features"; - @SerializedName(SERIALIZED_NAME_FEATURES) - private List features; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_IP_RANGES = "ip_ranges"; - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private DeviceMetro metro; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public Facility() { - } - - public Facility address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public Facility code(String code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - - public void setCode(String code) { - this.code = code; - } - - - public Facility features(List features) { - - this.features = features; - return this; - } - - public Facility addFeaturesItem(FeaturesEnum featuresItem) { - if (this.features == null) { - this.features = new ArrayList<>(); - } - this.features.add(featuresItem); - return this; - } - - /** - * Get features - * @return features - **/ - @javax.annotation.Nullable - public List getFeatures() { - return features; - } - - - public void setFeatures(List features) { - this.features = features; - } - - - public Facility id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Facility ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public Facility addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * IP ranges registered in facility. Can be used for GeoIP location - * @return ipRanges - **/ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - - public Facility metro(DeviceMetro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public DeviceMetro getMetro() { - return metro; - } - - - public void setMetro(DeviceMetro metro) { - this.metro = metro; - } - - - public Facility name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Facility instance itself - */ - public Facility putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Facility facility = (Facility) o; - return Objects.equals(this.address, facility.address) && - Objects.equals(this.code, facility.code) && - Objects.equals(this.features, facility.features) && - Objects.equals(this.id, facility.id) && - Objects.equals(this.ipRanges, facility.ipRanges) && - Objects.equals(this.metro, facility.metro) && - Objects.equals(this.name, facility.name)&& - Objects.equals(this.additionalProperties, facility.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, code, features, id, ipRanges, metro, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Facility {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" features: ").append(toIndentedString(features)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("code"); - openapiFields.add("features"); - openapiFields.add("id"); - openapiFields.add("ip_ranges"); - openapiFields.add("metro"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Facility - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Facility.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Facility is not found in the empty JSON string", Facility.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull() && !jsonObj.get("features").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull() && !jsonObj.get("ip_ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - DeviceMetro.validateJsonElement(jsonObj.get("metro")); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Facility.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Facility' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Facility.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Facility value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Facility read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Facility instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Facility given an JSON string - * - * @param jsonString JSON string - * @return An instance of Facility - * @throws IOException if the JSON string is invalid with respect to Facility - */ - public static Facility fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Facility.class); - } - - /** - * Convert an instance of Facility to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityInput.java deleted file mode 100644 index d8a48c687..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityInput.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * FacilityInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FacilityInput { - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @Deprecated - @SerializedName(SERIALIZED_NAME_FACILITY) - private List facility = new ArrayList<>(); - - public FacilityInput() { - } - - @Deprecated - public FacilityInput facility(List facility) { - - this.facility = facility; - return this; - } - - public FacilityInput addFacilityItem(String facilityItem) { - if (this.facility == null) { - this.facility = new ArrayList<>(); - } - this.facility.add(facilityItem); - return this; - } - - /** - * The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. - * @return facility - * @deprecated - **/ - @Deprecated - @javax.annotation.Nonnull - public List getFacility() { - return facility; - } - - - @Deprecated - public void setFacility(List facility) { - this.facility = facility; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the FacilityInput instance itself - */ - public FacilityInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FacilityInput facilityInput = (FacilityInput) o; - return Objects.equals(this.facility, facilityInput.facility)&& - Objects.equals(this.additionalProperties, facilityInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(facility, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FacilityInput {\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("facility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("facility"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FacilityInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FacilityInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FacilityInput is not found in the empty JSON string", FacilityInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FacilityInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("facility") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("facility").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be an array in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FacilityInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FacilityInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FacilityInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FacilityInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public FacilityInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FacilityInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FacilityInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of FacilityInput - * @throws IOException if the JSON string is invalid with respect to FacilityInput - */ - public static FacilityInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FacilityInput.class); - } - - /** - * Convert an instance of FacilityInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java deleted file mode 100644 index 54300eb3e..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FacilityList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Facility; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * FacilityList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FacilityList { - public static final String SERIALIZED_NAME_FACILITIES = "facilities"; - @SerializedName(SERIALIZED_NAME_FACILITIES) - private List facilities; - - public FacilityList() { - } - - public FacilityList facilities(List facilities) { - - this.facilities = facilities; - return this; - } - - public FacilityList addFacilitiesItem(Facility facilitiesItem) { - if (this.facilities == null) { - this.facilities = new ArrayList<>(); - } - this.facilities.add(facilitiesItem); - return this; - } - - /** - * Get facilities - * @return facilities - **/ - @javax.annotation.Nullable - public List getFacilities() { - return facilities; - } - - - public void setFacilities(List facilities) { - this.facilities = facilities; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the FacilityList instance itself - */ - public FacilityList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FacilityList facilityList = (FacilityList) o; - return Objects.equals(this.facilities, facilityList.facilities)&& - Objects.equals(this.additionalProperties, facilityList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(facilities, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FacilityList {\n"); - sb.append(" facilities: ").append(toIndentedString(facilities)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("facilities"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FacilityList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FacilityList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FacilityList is not found in the empty JSON string", FacilityList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("facilities") != null && !jsonObj.get("facilities").isJsonNull()) { - JsonArray jsonArrayfacilities = jsonObj.getAsJsonArray("facilities"); - if (jsonArrayfacilities != null) { - // ensure the json data is an array - if (!jsonObj.get("facilities").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `facilities` to be an array in the JSON string but got `%s`", jsonObj.get("facilities").toString())); - } - - // validate the optional field `facilities` (array) - for (int i = 0; i < jsonArrayfacilities.size(); i++) { - Facility.validateJsonElement(jsonArrayfacilities.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FacilityList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FacilityList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FacilityList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FacilityList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public FacilityList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FacilityList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FacilityList given an JSON string - * - * @param jsonString JSON string - * @return An instance of FacilityList - * @throws IOException if the JSON string is invalid with respect to FacilityList - */ - public static FacilityList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FacilityList.class); - } - - /** - * Convert an instance of FacilityList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Filesystem.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Filesystem.java deleted file mode 100644 index dcbb855dc..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Filesystem.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Mount; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Filesystem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Filesystem { - public static final String SERIALIZED_NAME_MOUNT = "mount"; - @SerializedName(SERIALIZED_NAME_MOUNT) - private Mount mount; - - public Filesystem() { - } - - public Filesystem mount(Mount mount) { - - this.mount = mount; - return this; - } - - /** - * Get mount - * @return mount - **/ - @javax.annotation.Nullable - public Mount getMount() { - return mount; - } - - - public void setMount(Mount mount) { - this.mount = mount; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Filesystem instance itself - */ - public Filesystem putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Filesystem filesystem = (Filesystem) o; - return Objects.equals(this.mount, filesystem.mount)&& - Objects.equals(this.additionalProperties, filesystem.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(mount, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Filesystem {\n"); - sb.append(" mount: ").append(toIndentedString(mount)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("mount"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Filesystem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Filesystem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Filesystem is not found in the empty JSON string", Filesystem.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `mount` - if (jsonObj.get("mount") != null && !jsonObj.get("mount").isJsonNull()) { - Mount.validateJsonElement(jsonObj.get("mount")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Filesystem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Filesystem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Filesystem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Filesystem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Filesystem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Filesystem instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Filesystem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Filesystem - * @throws IOException if the JSON string is invalid with respect to Filesystem - */ - public static Filesystem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Filesystem.class); - } - - /** - * Convert an instance of Filesystem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200Response.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200Response.java deleted file mode 100644 index 579517839..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200Response.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservation; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.ParentBlock; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FindIPAddressById200Response extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(FindIPAddressById200Response.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FindIPAddressById200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FindIPAddressById200Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterIPAssignment = gson.getDelegateAdapter(this, TypeToken.get(IPAssignment.class)); - final TypeAdapter adapterIPReservation = gson.getDelegateAdapter(this, TypeToken.get(IPReservation.class)); - final TypeAdapter adapterVrfIpReservation = gson.getDelegateAdapter(this, TypeToken.get(VrfIpReservation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FindIPAddressById200Response value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `IPAssignment` - if (value.getActualInstance() instanceof IPAssignment) { - JsonElement element = adapterIPAssignment.toJsonTree((IPAssignment)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `IPReservation` - if (value.getActualInstance() instanceof IPReservation) { - JsonElement element = adapterIPReservation.toJsonTree((IPReservation)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfIpReservation` - if (value.getActualInstance() instanceof VrfIpReservation) { - JsonElement element = adapterVrfIpReservation.toJsonTree((VrfIpReservation)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: IPAssignment, IPReservation, VrfIpReservation"); - } - - @Override - public FindIPAddressById200Response read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize IPAssignment - try { - // validate the JSON object to see if any exception is thrown - IPAssignment.validateJsonElement(jsonElement); - actualAdapter = adapterIPAssignment; - match++; - log.log(Level.FINER, "Input data matches schema 'IPAssignment'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for IPAssignment failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'IPAssignment'", e); - } - // deserialize IPReservation - try { - // validate the JSON object to see if any exception is thrown - IPReservation.validateJsonElement(jsonElement); - actualAdapter = adapterIPReservation; - match++; - log.log(Level.FINER, "Input data matches schema 'IPReservation'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for IPReservation failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'IPReservation'", e); - } - // deserialize VrfIpReservation - try { - // validate the JSON object to see if any exception is thrown - VrfIpReservation.validateJsonElement(jsonElement); - actualAdapter = adapterVrfIpReservation; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfIpReservation'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfIpReservation failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfIpReservation'", e); - } - - if (match == 1) { - FindIPAddressById200Response ret = new FindIPAddressById200Response(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for FindIPAddressById200Response: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public FindIPAddressById200Response() { - super("oneOf", Boolean.FALSE); - } - - public FindIPAddressById200Response(IPAssignment o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public FindIPAddressById200Response(IPReservation o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public FindIPAddressById200Response(VrfIpReservation o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("IPAssignment", IPAssignment.class); - schemas.put("IPReservation", IPReservation.class); - schemas.put("VrfIpReservation", VrfIpReservation.class); - } - - @Override - public Map> getSchemas() { - return FindIPAddressById200Response.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * IPAssignment, IPReservation, VrfIpReservation - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof IPAssignment) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof IPReservation) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfIpReservation) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be IPAssignment, IPReservation, VrfIpReservation"); - } - - /** - * Get the actual instance, which can be the following: - * IPAssignment, IPReservation, VrfIpReservation - * - * @return The actual instance (IPAssignment, IPReservation, VrfIpReservation) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IPAssignment`. If the actual instance is not `IPAssignment`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `IPAssignment` - * @throws ClassCastException if the instance is not `IPAssignment` - */ - public IPAssignment getIPAssignment() throws ClassCastException { - return (IPAssignment)super.getActualInstance(); - } - /** - * Get the actual instance of `IPReservation`. If the actual instance is not `IPReservation`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `IPReservation` - * @throws ClassCastException if the instance is not `IPReservation` - */ - public IPReservation getIPReservation() throws ClassCastException { - return (IPReservation)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfIpReservation`. If the actual instance is not `VrfIpReservation`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfIpReservation` - * @throws ClassCastException if the instance is not `VrfIpReservation` - */ - public VrfIpReservation getVrfIpReservation() throws ClassCastException { - return (VrfIpReservation)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FindIPAddressById200Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with IPAssignment - try { - IPAssignment.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for IPAssignment failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with IPReservation - try { - IPReservation.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for IPReservation failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfIpReservation - try { - VrfIpReservation.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfIpReservation failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for FindIPAddressById200Response with oneOf schemas: IPAssignment, IPReservation, VrfIpReservation. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of FindIPAddressById200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of FindIPAddressById200Response - * @throws IOException if the JSON string is invalid with respect to FindIPAddressById200Response - */ - public static FindIPAddressById200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FindIPAddressById200Response.class); - } - - /** - * Convert an instance of FindIPAddressById200Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindMetalGatewayById200Response.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindMetalGatewayById200Response.java deleted file mode 100644 index 5821e696a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindMetalGatewayById200Response.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.MetalGateway; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservationOrHref; -import com.equinix.openapi.metal.v1.model.VrfMetalGateway; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FindMetalGatewayById200Response extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(FindMetalGatewayById200Response.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FindMetalGatewayById200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FindMetalGatewayById200Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterMetalGateway = gson.getDelegateAdapter(this, TypeToken.get(MetalGateway.class)); - final TypeAdapter adapterVrfMetalGateway = gson.getDelegateAdapter(this, TypeToken.get(VrfMetalGateway.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FindMetalGatewayById200Response value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `MetalGateway` - if (value.getActualInstance() instanceof MetalGateway) { - JsonElement element = adapterMetalGateway.toJsonTree((MetalGateway)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfMetalGateway` - if (value.getActualInstance() instanceof VrfMetalGateway) { - JsonElement element = adapterVrfMetalGateway.toJsonTree((VrfMetalGateway)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: MetalGateway, VrfMetalGateway"); - } - - @Override - public FindMetalGatewayById200Response read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize MetalGateway - try { - // validate the JSON object to see if any exception is thrown - MetalGateway.validateJsonElement(jsonElement); - actualAdapter = adapterMetalGateway; - match++; - log.log(Level.FINER, "Input data matches schema 'MetalGateway'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for MetalGateway failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'MetalGateway'", e); - } - // deserialize VrfMetalGateway - try { - // validate the JSON object to see if any exception is thrown - VrfMetalGateway.validateJsonElement(jsonElement); - actualAdapter = adapterVrfMetalGateway; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfMetalGateway'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfMetalGateway failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfMetalGateway'", e); - } - - if (match == 1) { - FindMetalGatewayById200Response ret = new FindMetalGatewayById200Response(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for FindMetalGatewayById200Response: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public FindMetalGatewayById200Response() { - super("oneOf", Boolean.FALSE); - } - - public FindMetalGatewayById200Response(MetalGateway o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public FindMetalGatewayById200Response(VrfMetalGateway o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("MetalGateway", MetalGateway.class); - schemas.put("VrfMetalGateway", VrfMetalGateway.class); - } - - @Override - public Map> getSchemas() { - return FindMetalGatewayById200Response.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * MetalGateway, VrfMetalGateway - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof MetalGateway) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfMetalGateway) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be MetalGateway, VrfMetalGateway"); - } - - /** - * Get the actual instance, which can be the following: - * MetalGateway, VrfMetalGateway - * - * @return The actual instance (MetalGateway, VrfMetalGateway) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `MetalGateway`. If the actual instance is not `MetalGateway`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `MetalGateway` - * @throws ClassCastException if the instance is not `MetalGateway` - */ - public MetalGateway getMetalGateway() throws ClassCastException { - return (MetalGateway)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfMetalGateway`. If the actual instance is not `VrfMetalGateway`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfMetalGateway` - * @throws ClassCastException if the instance is not `VrfMetalGateway` - */ - public VrfMetalGateway getVrfMetalGateway() throws ClassCastException { - return (VrfMetalGateway)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FindMetalGatewayById200Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with MetalGateway - try { - MetalGateway.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for MetalGateway failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfMetalGateway - try { - VrfMetalGateway.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfMetalGateway failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for FindMetalGatewayById200Response with oneOf schemas: MetalGateway, VrfMetalGateway. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of FindMetalGatewayById200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of FindMetalGatewayById200Response - * @throws IOException if the JSON string is invalid with respect to FindMetalGatewayById200Response - */ - public static FindMetalGatewayById200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FindMetalGatewayById200Response.class); - } - - /** - * Convert an instance of FindMetalGatewayById200Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindTrafficTimeframeParameter.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindTrafficTimeframeParameter.java deleted file mode 100644 index ebc7fc2a8..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FindTrafficTimeframeParameter.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * FindTrafficTimeframeParameter - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FindTrafficTimeframeParameter { - public static final String SERIALIZED_NAME_ENDED_AT = "ended_at"; - @SerializedName(SERIALIZED_NAME_ENDED_AT) - private OffsetDateTime endedAt; - - public static final String SERIALIZED_NAME_STARTED_AT = "started_at"; - @SerializedName(SERIALIZED_NAME_STARTED_AT) - private OffsetDateTime startedAt; - - public FindTrafficTimeframeParameter() { - } - - public FindTrafficTimeframeParameter endedAt(OffsetDateTime endedAt) { - - this.endedAt = endedAt; - return this; - } - - /** - * Get endedAt - * @return endedAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getEndedAt() { - return endedAt; - } - - - public void setEndedAt(OffsetDateTime endedAt) { - this.endedAt = endedAt; - } - - - public FindTrafficTimeframeParameter startedAt(OffsetDateTime startedAt) { - - this.startedAt = startedAt; - return this; - } - - /** - * Get startedAt - * @return startedAt - **/ - @javax.annotation.Nonnull - public OffsetDateTime getStartedAt() { - return startedAt; - } - - - public void setStartedAt(OffsetDateTime startedAt) { - this.startedAt = startedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the FindTrafficTimeframeParameter instance itself - */ - public FindTrafficTimeframeParameter putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FindTrafficTimeframeParameter findTrafficTimeframeParameter = (FindTrafficTimeframeParameter) o; - return Objects.equals(this.endedAt, findTrafficTimeframeParameter.endedAt) && - Objects.equals(this.startedAt, findTrafficTimeframeParameter.startedAt)&& - Objects.equals(this.additionalProperties, findTrafficTimeframeParameter.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(endedAt, startedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FindTrafficTimeframeParameter {\n"); - sb.append(" endedAt: ").append(toIndentedString(endedAt)).append("\n"); - sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ended_at"); - openapiFields.add("started_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ended_at"); - openapiRequiredFields.add("started_at"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FindTrafficTimeframeParameter - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FindTrafficTimeframeParameter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FindTrafficTimeframeParameter is not found in the empty JSON string", FindTrafficTimeframeParameter.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FindTrafficTimeframeParameter.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FindTrafficTimeframeParameter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FindTrafficTimeframeParameter' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FindTrafficTimeframeParameter.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FindTrafficTimeframeParameter value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public FindTrafficTimeframeParameter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FindTrafficTimeframeParameter instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FindTrafficTimeframeParameter given an JSON string - * - * @param jsonString JSON string - * @return An instance of FindTrafficTimeframeParameter - * @throws IOException if the JSON string is invalid with respect to FindTrafficTimeframeParameter - */ - public static FindTrafficTimeframeParameter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FindTrafficTimeframeParameter.class); - } - - /** - * Convert an instance of FindTrafficTimeframeParameter to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSet.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSet.java deleted file mode 100644 index fa69284f5..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSet.java +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Attribute; -import com.equinix.openapi.metal.v1.model.Component; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Represents a Firmware Set - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FirmwareSet { - public static final String SERIALIZED_NAME_UUID = "uuid"; - @SerializedName(SERIALIZED_NAME_UUID) - private UUID uuid; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private List attributes; - - public static final String SERIALIZED_NAME_COMPONENT_FIRMWARE = "component_firmware"; - @SerializedName(SERIALIZED_NAME_COMPONENT_FIRMWARE) - private List componentFirmware; - - public FirmwareSet() { - } - - - public FirmwareSet( - UUID uuid, - String name, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.uuid = uuid; - this.name = name; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - /** - * Firmware Set UUID - * @return uuid - **/ - @javax.annotation.Nonnull - public UUID getUuid() { - return uuid; - } - - - - - /** - * Firmware Set Name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - - - /** - * Datetime when the block was created. - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - - /** - * Datetime when the block was updated. - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - - public FirmwareSet attributes(List attributes) { - - this.attributes = attributes; - return this; - } - - public FirmwareSet addAttributesItem(Attribute attributesItem) { - if (this.attributes == null) { - this.attributes = new ArrayList<>(); - } - this.attributes.add(attributesItem); - return this; - } - - /** - * Represents a list of attributes - * @return attributes - **/ - @javax.annotation.Nullable - public List getAttributes() { - return attributes; - } - - - public void setAttributes(List attributes) { - this.attributes = attributes; - } - - - public FirmwareSet componentFirmware(List componentFirmware) { - - this.componentFirmware = componentFirmware; - return this; - } - - public FirmwareSet addComponentFirmwareItem(Component componentFirmwareItem) { - if (this.componentFirmware == null) { - this.componentFirmware = new ArrayList<>(); - } - this.componentFirmware.add(componentFirmwareItem); - return this; - } - - /** - * List of components versions - * @return componentFirmware - **/ - @javax.annotation.Nullable - public List getComponentFirmware() { - return componentFirmware; - } - - - public void setComponentFirmware(List componentFirmware) { - this.componentFirmware = componentFirmware; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the FirmwareSet instance itself - */ - public FirmwareSet putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FirmwareSet firmwareSet = (FirmwareSet) o; - return Objects.equals(this.uuid, firmwareSet.uuid) && - Objects.equals(this.name, firmwareSet.name) && - Objects.equals(this.createdAt, firmwareSet.createdAt) && - Objects.equals(this.updatedAt, firmwareSet.updatedAt) && - Objects.equals(this.attributes, firmwareSet.attributes) && - Objects.equals(this.componentFirmware, firmwareSet.componentFirmware)&& - Objects.equals(this.additionalProperties, firmwareSet.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, name, createdAt, updatedAt, attributes, componentFirmware, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FirmwareSet {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" componentFirmware: ").append(toIndentedString(componentFirmware)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("uuid"); - openapiFields.add("name"); - openapiFields.add("created_at"); - openapiFields.add("updated_at"); - openapiFields.add("attributes"); - openapiFields.add("component_firmware"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("uuid"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FirmwareSet - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FirmwareSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FirmwareSet is not found in the empty JSON string", FirmwareSet.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FirmwareSet.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("uuid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - JsonArray jsonArrayattributes = jsonObj.getAsJsonArray("attributes"); - if (jsonArrayattributes != null) { - // ensure the json data is an array - if (!jsonObj.get("attributes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `attributes` to be an array in the JSON string but got `%s`", jsonObj.get("attributes").toString())); - } - - // validate the optional field `attributes` (array) - for (int i = 0; i < jsonArrayattributes.size(); i++) { - Attribute.validateJsonElement(jsonArrayattributes.get(i)); - }; - } - } - if (jsonObj.get("component_firmware") != null && !jsonObj.get("component_firmware").isJsonNull()) { - JsonArray jsonArraycomponentFirmware = jsonObj.getAsJsonArray("component_firmware"); - if (jsonArraycomponentFirmware != null) { - // ensure the json data is an array - if (!jsonObj.get("component_firmware").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `component_firmware` to be an array in the JSON string but got `%s`", jsonObj.get("component_firmware").toString())); - } - - // validate the optional field `component_firmware` (array) - for (int i = 0; i < jsonArraycomponentFirmware.size(); i++) { - Component.validateJsonElement(jsonArraycomponentFirmware.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FirmwareSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FirmwareSet' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FirmwareSet.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FirmwareSet value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public FirmwareSet read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FirmwareSet instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FirmwareSet given an JSON string - * - * @param jsonString JSON string - * @return An instance of FirmwareSet - * @throws IOException if the JSON string is invalid with respect to FirmwareSet - */ - public static FirmwareSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FirmwareSet.class); - } - - /** - * Convert an instance of FirmwareSet to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSetListResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSetListResponse.java deleted file mode 100644 index 15d81cd57..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSetListResponse.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.FirmwareSet; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Represents collection of Firmware Sets - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FirmwareSetListResponse { - public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; - @SerializedName(SERIALIZED_NAME_PAGE_SIZE) - private Integer pageSize; - - public static final String SERIALIZED_NAME_PAGE = "page"; - @SerializedName(SERIALIZED_NAME_PAGE) - private Integer page; - - public static final String SERIALIZED_NAME_PAGE_COUNT = "page_count"; - @SerializedName(SERIALIZED_NAME_PAGE_COUNT) - private Integer pageCount; - - public static final String SERIALIZED_NAME_TOTAL_PAGES = "total_pages"; - @SerializedName(SERIALIZED_NAME_TOTAL_PAGES) - private Integer totalPages; - - public static final String SERIALIZED_NAME_TOTAL_RECORD_COUNT = "total_record_count"; - @SerializedName(SERIALIZED_NAME_TOTAL_RECORD_COUNT) - private Integer totalRecordCount; - - public static final String SERIALIZED_NAME_RECORDS = "records"; - @SerializedName(SERIALIZED_NAME_RECORDS) - private List records; - - public FirmwareSetListResponse() { - } - - public FirmwareSetListResponse pageSize(Integer pageSize) { - - this.pageSize = pageSize; - return this; - } - - /** - * Max number of items returned in a page - * @return pageSize - **/ - @javax.annotation.Nullable - public Integer getPageSize() { - return pageSize; - } - - - public void setPageSize(Integer pageSize) { - this.pageSize = pageSize; - } - - - public FirmwareSetListResponse page(Integer page) { - - this.page = page; - return this; - } - - /** - * Page returned - * @return page - **/ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - - public void setPage(Integer page) { - this.page = page; - } - - - public FirmwareSetListResponse pageCount(Integer pageCount) { - - this.pageCount = pageCount; - return this; - } - - /** - * Items returned in current page - * @return pageCount - **/ - @javax.annotation.Nullable - public Integer getPageCount() { - return pageCount; - } - - - public void setPageCount(Integer pageCount) { - this.pageCount = pageCount; - } - - - public FirmwareSetListResponse totalPages(Integer totalPages) { - - this.totalPages = totalPages; - return this; - } - - /** - * Total count of pages - * @return totalPages - **/ - @javax.annotation.Nullable - public Integer getTotalPages() { - return totalPages; - } - - - public void setTotalPages(Integer totalPages) { - this.totalPages = totalPages; - } - - - public FirmwareSetListResponse totalRecordCount(Integer totalRecordCount) { - - this.totalRecordCount = totalRecordCount; - return this; - } - - /** - * Total count of items - * @return totalRecordCount - **/ - @javax.annotation.Nullable - public Integer getTotalRecordCount() { - return totalRecordCount; - } - - - public void setTotalRecordCount(Integer totalRecordCount) { - this.totalRecordCount = totalRecordCount; - } - - - public FirmwareSetListResponse records(List records) { - - this.records = records; - return this; - } - - public FirmwareSetListResponse addRecordsItem(FirmwareSet recordsItem) { - if (this.records == null) { - this.records = new ArrayList<>(); - } - this.records.add(recordsItem); - return this; - } - - /** - * Represents a list of FirmwareSets - * @return records - **/ - @javax.annotation.Nullable - public List getRecords() { - return records; - } - - - public void setRecords(List records) { - this.records = records; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the FirmwareSetListResponse instance itself - */ - public FirmwareSetListResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FirmwareSetListResponse firmwareSetListResponse = (FirmwareSetListResponse) o; - return Objects.equals(this.pageSize, firmwareSetListResponse.pageSize) && - Objects.equals(this.page, firmwareSetListResponse.page) && - Objects.equals(this.pageCount, firmwareSetListResponse.pageCount) && - Objects.equals(this.totalPages, firmwareSetListResponse.totalPages) && - Objects.equals(this.totalRecordCount, firmwareSetListResponse.totalRecordCount) && - Objects.equals(this.records, firmwareSetListResponse.records)&& - Objects.equals(this.additionalProperties, firmwareSetListResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(pageSize, page, pageCount, totalPages, totalRecordCount, records, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FirmwareSetListResponse {\n"); - sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" pageCount: ").append(toIndentedString(pageCount)).append("\n"); - sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); - sb.append(" totalRecordCount: ").append(toIndentedString(totalRecordCount)).append("\n"); - sb.append(" records: ").append(toIndentedString(records)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("page_size"); - openapiFields.add("page"); - openapiFields.add("page_count"); - openapiFields.add("total_pages"); - openapiFields.add("total_record_count"); - openapiFields.add("records"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FirmwareSetListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FirmwareSetListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FirmwareSetListResponse is not found in the empty JSON string", FirmwareSetListResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("records") != null && !jsonObj.get("records").isJsonNull()) { - JsonArray jsonArrayrecords = jsonObj.getAsJsonArray("records"); - if (jsonArrayrecords != null) { - // ensure the json data is an array - if (!jsonObj.get("records").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `records` to be an array in the JSON string but got `%s`", jsonObj.get("records").toString())); - } - - // validate the optional field `records` (array) - for (int i = 0; i < jsonArrayrecords.size(); i++) { - FirmwareSet.validateJsonElement(jsonArrayrecords.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FirmwareSetListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FirmwareSetListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FirmwareSetListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FirmwareSetListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public FirmwareSetListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FirmwareSetListResponse instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FirmwareSetListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of FirmwareSetListResponse - * @throws IOException if the JSON string is invalid with respect to FirmwareSetListResponse - */ - public static FirmwareSetListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FirmwareSetListResponse.class); - } - - /** - * Convert an instance of FirmwareSetListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSetResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSetResponse.java deleted file mode 100644 index 922d454b3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/FirmwareSetResponse.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.FirmwareSet; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Represents single Firmware set response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FirmwareSetResponse { - public static final String SERIALIZED_NAME_RECORD = "record"; - @SerializedName(SERIALIZED_NAME_RECORD) - private FirmwareSet record; - - public FirmwareSetResponse() { - } - - public FirmwareSetResponse record(FirmwareSet record) { - - this.record = record; - return this; - } - - /** - * Get record - * @return record - **/ - @javax.annotation.Nullable - public FirmwareSet getRecord() { - return record; - } - - - public void setRecord(FirmwareSet record) { - this.record = record; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the FirmwareSetResponse instance itself - */ - public FirmwareSetResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FirmwareSetResponse firmwareSetResponse = (FirmwareSetResponse) o; - return Objects.equals(this.record, firmwareSetResponse.record)&& - Objects.equals(this.additionalProperties, firmwareSetResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(record, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FirmwareSetResponse {\n"); - sb.append(" record: ").append(toIndentedString(record)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("record"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FirmwareSetResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FirmwareSetResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FirmwareSetResponse is not found in the empty JSON string", FirmwareSetResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `record` - if (jsonObj.get("record") != null && !jsonObj.get("record").isJsonNull()) { - FirmwareSet.validateJsonElement(jsonObj.get("record")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FirmwareSetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FirmwareSetResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FirmwareSetResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FirmwareSetResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public FirmwareSetResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - FirmwareSetResponse instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FirmwareSetResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of FirmwareSetResponse - * @throws IOException if the JSON string is invalid with respect to FirmwareSetResponse - */ - public static FirmwareSetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FirmwareSetResponse.class); - } - - /** - * Convert an instance of FirmwareSetResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java deleted file mode 100644 index d207a8233..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRange.java +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * GlobalBgpRange - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class GlobalBgpRange { - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private Integer addressFamily; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public static final String SERIALIZED_NAME_RANGE = "range"; - @SerializedName(SERIALIZED_NAME_RANGE) - private String range; - - public GlobalBgpRange() { - } - - public GlobalBgpRange addressFamily(Integer addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Get addressFamily - * @return addressFamily - **/ - @javax.annotation.Nullable - public Integer getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(Integer addressFamily) { - this.addressFamily = addressFamily; - } - - - public GlobalBgpRange href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public GlobalBgpRange id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public GlobalBgpRange project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - - public GlobalBgpRange range(String range) { - - this.range = range; - return this; - } - - /** - * Get range - * @return range - **/ - @javax.annotation.Nullable - public String getRange() { - return range; - } - - - public void setRange(String range) { - this.range = range; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the GlobalBgpRange instance itself - */ - public GlobalBgpRange putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GlobalBgpRange globalBgpRange = (GlobalBgpRange) o; - return Objects.equals(this.addressFamily, globalBgpRange.addressFamily) && - Objects.equals(this.href, globalBgpRange.href) && - Objects.equals(this.id, globalBgpRange.id) && - Objects.equals(this.project, globalBgpRange.project) && - Objects.equals(this.range, globalBgpRange.range)&& - Objects.equals(this.additionalProperties, globalBgpRange.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(addressFamily, href, id, project, range, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GlobalBgpRange {\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" range: ").append(toIndentedString(range)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address_family"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("project"); - openapiFields.add("range"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GlobalBgpRange - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GlobalBgpRange.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GlobalBgpRange is not found in the empty JSON string", GlobalBgpRange.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("range") != null && !jsonObj.get("range").isJsonNull()) && !jsonObj.get("range").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `range` to be a primitive type in the JSON string but got `%s`", jsonObj.get("range").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GlobalBgpRange.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GlobalBgpRange' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GlobalBgpRange.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GlobalBgpRange value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public GlobalBgpRange read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - GlobalBgpRange instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GlobalBgpRange given an JSON string - * - * @param jsonString JSON string - * @return An instance of GlobalBgpRange - * @throws IOException if the JSON string is invalid with respect to GlobalBgpRange - */ - public static GlobalBgpRange fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GlobalBgpRange.class); - } - - /** - * Convert an instance of GlobalBgpRange to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java deleted file mode 100644 index b6d653874..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.GlobalBgpRange; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * GlobalBgpRangeList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class GlobalBgpRangeList { - public static final String SERIALIZED_NAME_GLOBAL_BGP_RANGES = "global_bgp_ranges"; - @SerializedName(SERIALIZED_NAME_GLOBAL_BGP_RANGES) - private List globalBgpRanges; - - public GlobalBgpRangeList() { - } - - public GlobalBgpRangeList globalBgpRanges(List globalBgpRanges) { - - this.globalBgpRanges = globalBgpRanges; - return this; - } - - public GlobalBgpRangeList addGlobalBgpRangesItem(GlobalBgpRange globalBgpRangesItem) { - if (this.globalBgpRanges == null) { - this.globalBgpRanges = new ArrayList<>(); - } - this.globalBgpRanges.add(globalBgpRangesItem); - return this; - } - - /** - * Get globalBgpRanges - * @return globalBgpRanges - **/ - @javax.annotation.Nullable - public List getGlobalBgpRanges() { - return globalBgpRanges; - } - - - public void setGlobalBgpRanges(List globalBgpRanges) { - this.globalBgpRanges = globalBgpRanges; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the GlobalBgpRangeList instance itself - */ - public GlobalBgpRangeList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GlobalBgpRangeList globalBgpRangeList = (GlobalBgpRangeList) o; - return Objects.equals(this.globalBgpRanges, globalBgpRangeList.globalBgpRanges)&& - Objects.equals(this.additionalProperties, globalBgpRangeList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(globalBgpRanges, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GlobalBgpRangeList {\n"); - sb.append(" globalBgpRanges: ").append(toIndentedString(globalBgpRanges)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("global_bgp_ranges"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GlobalBgpRangeList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GlobalBgpRangeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GlobalBgpRangeList is not found in the empty JSON string", GlobalBgpRangeList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("global_bgp_ranges") != null && !jsonObj.get("global_bgp_ranges").isJsonNull()) { - JsonArray jsonArrayglobalBgpRanges = jsonObj.getAsJsonArray("global_bgp_ranges"); - if (jsonArrayglobalBgpRanges != null) { - // ensure the json data is an array - if (!jsonObj.get("global_bgp_ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `global_bgp_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("global_bgp_ranges").toString())); - } - - // validate the optional field `global_bgp_ranges` (array) - for (int i = 0; i < jsonArrayglobalBgpRanges.size(); i++) { - GlobalBgpRange.validateJsonElement(jsonArrayglobalBgpRanges.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GlobalBgpRangeList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GlobalBgpRangeList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GlobalBgpRangeList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GlobalBgpRangeList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public GlobalBgpRangeList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - GlobalBgpRangeList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GlobalBgpRangeList given an JSON string - * - * @param jsonString JSON string - * @return An instance of GlobalBgpRangeList - * @throws IOException if the JSON string is invalid with respect to GlobalBgpRangeList - */ - public static GlobalBgpRangeList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GlobalBgpRangeList.class); - } - - /** - * Convert an instance of GlobalBgpRangeList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java deleted file mode 100644 index 9988b6285..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservation.java +++ /dev/null @@ -1,680 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Device; -import com.equinix.openapi.metal.v1.model.Facility; -import com.equinix.openapi.metal.v1.model.Plan; -import com.equinix.openapi.metal.v1.model.Project; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * HardwareReservation - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HardwareReservation { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CUSTOM_RATE = "custom_rate"; - @SerializedName(SERIALIZED_NAME_CUSTOM_RATE) - private Float customRate; - - public static final String SERIALIZED_NAME_DEVICE = "device"; - @SerializedName(SERIALIZED_NAME_DEVICE) - private Device device; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private Facility facility; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NEED_OF_SERVICE = "need_of_service"; - @SerializedName(SERIALIZED_NAME_NEED_OF_SERVICE) - private Boolean needOfService; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private Plan plan; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Project project; - - public static final String SERIALIZED_NAME_PROVISIONABLE = "provisionable"; - @SerializedName(SERIALIZED_NAME_PROVISIONABLE) - private Boolean provisionable; - - public static final String SERIALIZED_NAME_SHORT_ID = "short_id"; - @SerializedName(SERIALIZED_NAME_SHORT_ID) - private String shortId; - - public static final String SERIALIZED_NAME_SPARE = "spare"; - @SerializedName(SERIALIZED_NAME_SPARE) - private Boolean spare; - - public static final String SERIALIZED_NAME_SWITCH_UUID = "switch_uuid"; - @SerializedName(SERIALIZED_NAME_SWITCH_UUID) - private String switchUuid; - - public static final String SERIALIZED_NAME_TERMINATION_TIME = "termination_time"; - @SerializedName(SERIALIZED_NAME_TERMINATION_TIME) - private OffsetDateTime terminationTime; - - public HardwareReservation() { - } - - public HardwareReservation createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public HardwareReservation customRate(Float customRate) { - - this.customRate = customRate; - return this; - } - - /** - * Amount that will be charged for every billing_cycle. - * @return customRate - **/ - @javax.annotation.Nullable - public Float getCustomRate() { - return customRate; - } - - - public void setCustomRate(Float customRate) { - this.customRate = customRate; - } - - - public HardwareReservation device(Device device) { - - this.device = device; - return this; - } - - /** - * Get device - * @return device - **/ - @javax.annotation.Nullable - public Device getDevice() { - return device; - } - - - public void setDevice(Device device) { - this.device = device; - } - - - public HardwareReservation facility(Facility facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - **/ - @javax.annotation.Nullable - public Facility getFacility() { - return facility; - } - - - public void setFacility(Facility facility) { - this.facility = facility; - } - - - public HardwareReservation href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public HardwareReservation id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public HardwareReservation needOfService(Boolean needOfService) { - - this.needOfService = needOfService; - return this; - } - - /** - * Whether this Device requires assistance from Equinix Metal. - * @return needOfService - **/ - @javax.annotation.Nullable - public Boolean getNeedOfService() { - return needOfService; - } - - - public void setNeedOfService(Boolean needOfService) { - this.needOfService = needOfService; - } - - - public HardwareReservation plan(Plan plan) { - - this.plan = plan; - return this; - } - - /** - * Get plan - * @return plan - **/ - @javax.annotation.Nullable - public Plan getPlan() { - return plan; - } - - - public void setPlan(Plan plan) { - this.plan = plan; - } - - - public HardwareReservation project(Project project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Project getProject() { - return project; - } - - - public void setProject(Project project) { - this.project = project; - } - - - public HardwareReservation provisionable(Boolean provisionable) { - - this.provisionable = provisionable; - return this; - } - - /** - * Whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first. - * @return provisionable - **/ - @javax.annotation.Nullable - public Boolean getProvisionable() { - return provisionable; - } - - - public void setProvisionable(Boolean provisionable) { - this.provisionable = provisionable; - } - - - public HardwareReservation shortId(String shortId) { - - this.shortId = shortId; - return this; - } - - /** - * Short version of the ID. - * @return shortId - **/ - @javax.annotation.Nullable - public String getShortId() { - return shortId; - } - - - public void setShortId(String shortId) { - this.shortId = shortId; - } - - - public HardwareReservation spare(Boolean spare) { - - this.spare = spare; - return this; - } - - /** - * Whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Equinix Metal - * @return spare - **/ - @javax.annotation.Nullable - public Boolean getSpare() { - return spare; - } - - - public void setSpare(Boolean spare) { - this.spare = spare; - } - - - public HardwareReservation switchUuid(String switchUuid) { - - this.switchUuid = switchUuid; - return this; - } - - /** - * Switch short id. This can be used to determine if two devices are connected to the same switch, for example. - * @return switchUuid - **/ - @javax.annotation.Nullable - public String getSwitchUuid() { - return switchUuid; - } - - - public void setSwitchUuid(String switchUuid) { - this.switchUuid = switchUuid; - } - - - public HardwareReservation terminationTime(OffsetDateTime terminationTime) { - - this.terminationTime = terminationTime; - return this; - } - - /** - * Expiration date for the reservation. - * @return terminationTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getTerminationTime() { - return terminationTime; - } - - - public void setTerminationTime(OffsetDateTime terminationTime) { - this.terminationTime = terminationTime; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the HardwareReservation instance itself - */ - public HardwareReservation putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HardwareReservation hardwareReservation = (HardwareReservation) o; - return Objects.equals(this.createdAt, hardwareReservation.createdAt) && - Objects.equals(this.customRate, hardwareReservation.customRate) && - Objects.equals(this.device, hardwareReservation.device) && - Objects.equals(this.facility, hardwareReservation.facility) && - Objects.equals(this.href, hardwareReservation.href) && - Objects.equals(this.id, hardwareReservation.id) && - Objects.equals(this.needOfService, hardwareReservation.needOfService) && - Objects.equals(this.plan, hardwareReservation.plan) && - Objects.equals(this.project, hardwareReservation.project) && - Objects.equals(this.provisionable, hardwareReservation.provisionable) && - Objects.equals(this.shortId, hardwareReservation.shortId) && - Objects.equals(this.spare, hardwareReservation.spare) && - Objects.equals(this.switchUuid, hardwareReservation.switchUuid) && - Objects.equals(this.terminationTime, hardwareReservation.terminationTime)&& - Objects.equals(this.additionalProperties, hardwareReservation.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, customRate, device, facility, href, id, needOfService, plan, project, provisionable, shortId, spare, switchUuid, terminationTime, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HardwareReservation {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" customRate: ").append(toIndentedString(customRate)).append("\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" needOfService: ").append(toIndentedString(needOfService)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" provisionable: ").append(toIndentedString(provisionable)).append("\n"); - sb.append(" shortId: ").append(toIndentedString(shortId)).append("\n"); - sb.append(" spare: ").append(toIndentedString(spare)).append("\n"); - sb.append(" switchUuid: ").append(toIndentedString(switchUuid)).append("\n"); - sb.append(" terminationTime: ").append(toIndentedString(terminationTime)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("custom_rate"); - openapiFields.add("device"); - openapiFields.add("facility"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("need_of_service"); - openapiFields.add("plan"); - openapiFields.add("project"); - openapiFields.add("provisionable"); - openapiFields.add("short_id"); - openapiFields.add("spare"); - openapiFields.add("switch_uuid"); - openapiFields.add("termination_time"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HardwareReservation - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HardwareReservation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in HardwareReservation is not found in the empty JSON string", HardwareReservation.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `device` - if (jsonObj.get("device") != null && !jsonObj.get("device").isJsonNull()) { - Device.validateJsonElement(jsonObj.get("device")); - } - // validate the optional field `facility` - if (jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) { - Facility.validateJsonElement(jsonObj.get("facility")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `plan` - if (jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) { - Plan.validateJsonElement(jsonObj.get("plan")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Project.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("short_id") != null && !jsonObj.get("short_id").isJsonNull()) && !jsonObj.get("short_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("short_id").toString())); - } - if ((jsonObj.get("switch_uuid") != null && !jsonObj.get("switch_uuid").isJsonNull()) && !jsonObj.get("switch_uuid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `switch_uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("switch_uuid").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HardwareReservation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HardwareReservation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(HardwareReservation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, HardwareReservation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public HardwareReservation read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - HardwareReservation instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of HardwareReservation given an JSON string - * - * @param jsonString JSON string - * @return An instance of HardwareReservation - * @throws IOException if the JSON string is invalid with respect to HardwareReservation - */ - public static HardwareReservation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HardwareReservation.class); - } - - /** - * Convert an instance of HardwareReservation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java deleted file mode 100644 index f505e52ce..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/HardwareReservationList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.HardwareReservation; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * HardwareReservationList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HardwareReservationList { - public static final String SERIALIZED_NAME_HARDWARE_RESERVATIONS = "hardware_reservations"; - @SerializedName(SERIALIZED_NAME_HARDWARE_RESERVATIONS) - private List hardwareReservations; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public HardwareReservationList() { - } - - public HardwareReservationList hardwareReservations(List hardwareReservations) { - - this.hardwareReservations = hardwareReservations; - return this; - } - - public HardwareReservationList addHardwareReservationsItem(HardwareReservation hardwareReservationsItem) { - if (this.hardwareReservations == null) { - this.hardwareReservations = new ArrayList<>(); - } - this.hardwareReservations.add(hardwareReservationsItem); - return this; - } - - /** - * Get hardwareReservations - * @return hardwareReservations - **/ - @javax.annotation.Nullable - public List getHardwareReservations() { - return hardwareReservations; - } - - - public void setHardwareReservations(List hardwareReservations) { - this.hardwareReservations = hardwareReservations; - } - - - public HardwareReservationList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the HardwareReservationList instance itself - */ - public HardwareReservationList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HardwareReservationList hardwareReservationList = (HardwareReservationList) o; - return Objects.equals(this.hardwareReservations, hardwareReservationList.hardwareReservations) && - Objects.equals(this.meta, hardwareReservationList.meta)&& - Objects.equals(this.additionalProperties, hardwareReservationList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(hardwareReservations, meta, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HardwareReservationList {\n"); - sb.append(" hardwareReservations: ").append(toIndentedString(hardwareReservations)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("hardware_reservations"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HardwareReservationList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HardwareReservationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in HardwareReservationList is not found in the empty JSON string", HardwareReservationList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("hardware_reservations") != null && !jsonObj.get("hardware_reservations").isJsonNull()) { - JsonArray jsonArrayhardwareReservations = jsonObj.getAsJsonArray("hardware_reservations"); - if (jsonArrayhardwareReservations != null) { - // ensure the json data is an array - if (!jsonObj.get("hardware_reservations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `hardware_reservations` to be an array in the JSON string but got `%s`", jsonObj.get("hardware_reservations").toString())); - } - - // validate the optional field `hardware_reservations` (array) - for (int i = 0; i < jsonArrayhardwareReservations.size(); i++) { - HardwareReservation.validateJsonElement(jsonArrayhardwareReservations.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HardwareReservationList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HardwareReservationList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(HardwareReservationList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, HardwareReservationList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public HardwareReservationList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - HardwareReservationList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of HardwareReservationList given an JSON string - * - * @param jsonString JSON string - * @return An instance of HardwareReservationList - * @throws IOException if the JSON string is invalid with respect to HardwareReservationList - */ - public static HardwareReservationList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HardwareReservationList.class); - } - - /** - * Convert an instance of HardwareReservationList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java deleted file mode 100644 index 9e3be98a3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Href.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Href - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Href { - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public Href() { - } - - public Href href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nonnull - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Href href = (Href) o; - return Objects.equals(this.href, href.href); - } - - @Override - public int hashCode() { - return Objects.hash(href); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Href {\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("href"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("href"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Href - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Href.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Href is not found in the empty JSON string", Href.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!Href.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Href` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Href.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Href.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Href' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Href.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Href value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Href read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Href given an JSON string - * - * @param jsonString JSON string - * @return An instance of Href - * @throws IOException if the JSON string is invalid with respect to Href - */ - public static Href fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Href.class); - } - - /** - * Convert an instance of Href to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAddress.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAddress.java deleted file mode 100644 index 15329d04b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAddress.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPAddress - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPAddress { - /** - * Address Family for IP Address - */ - @JsonAdapter(AddressFamilyEnum.Adapter.class) - public enum AddressFamilyEnum { - NUMBER_4(4), - - NUMBER_6(6); - - private Integer value; - - AddressFamilyEnum(Integer value) { - this.value = value; - } - - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static AddressFamilyEnum fromValue(Integer value) { - for (AddressFamilyEnum b : AddressFamilyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final AddressFamilyEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public AddressFamilyEnum read(final JsonReader jsonReader) throws IOException { - Integer value = jsonReader.nextInt(); - return AddressFamilyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - Integer value = jsonElement.getAsInt(); - AddressFamilyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private AddressFamilyEnum addressFamily; - - public static final String SERIALIZED_NAME_CIDR = "cidr"; - @SerializedName(SERIALIZED_NAME_CIDR) - private Integer cidr; - - public static final String SERIALIZED_NAME_IP_RESERVATIONS = "ip_reservations"; - @SerializedName(SERIALIZED_NAME_IP_RESERVATIONS) - private List ipReservations; - - public static final String SERIALIZED_NAME_PUBLIC = "public"; - @SerializedName(SERIALIZED_NAME_PUBLIC) - private Boolean _public = true; - - public IPAddress() { - } - - public IPAddress addressFamily(AddressFamilyEnum addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Address Family for IP Address - * @return addressFamily - **/ - @javax.annotation.Nullable - public AddressFamilyEnum getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(AddressFamilyEnum addressFamily) { - this.addressFamily = addressFamily; - } - - - public IPAddress cidr(Integer cidr) { - - this.cidr = cidr; - return this; - } - - /** - * Cidr Size for the IP Block created. Valid values depends on the operating system being provisioned. (28..32 for IPv4 addresses, 124..127 for IPv6 addresses) - * @return cidr - **/ - @javax.annotation.Nullable - public Integer getCidr() { - return cidr; - } - - - public void setCidr(Integer cidr) { - this.cidr = cidr; - } - - - public IPAddress ipReservations(List ipReservations) { - - this.ipReservations = ipReservations; - return this; - } - - public IPAddress addIpReservationsItem(String ipReservationsItem) { - if (this.ipReservations == null) { - this.ipReservations = new ArrayList<>(); - } - this.ipReservations.add(ipReservationsItem); - return this; - } - - /** - * UUIDs of any IP reservations to use when assigning IPs - * @return ipReservations - **/ - @javax.annotation.Nullable - public List getIpReservations() { - return ipReservations; - } - - - public void setIpReservations(List ipReservations) { - this.ipReservations = ipReservations; - } - - - public IPAddress _public(Boolean _public) { - - this._public = _public; - return this; - } - - /** - * Address Type for IP Address - * @return _public - **/ - @javax.annotation.Nullable - public Boolean getPublic() { - return _public; - } - - - public void setPublic(Boolean _public) { - this._public = _public; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPAddress instance itself - */ - public IPAddress putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPAddress ipAddress = (IPAddress) o; - return Objects.equals(this.addressFamily, ipAddress.addressFamily) && - Objects.equals(this.cidr, ipAddress.cidr) && - Objects.equals(this.ipReservations, ipAddress.ipReservations) && - Objects.equals(this._public, ipAddress._public)&& - Objects.equals(this.additionalProperties, ipAddress.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(addressFamily, cidr, ipReservations, _public, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPAddress {\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" cidr: ").append(toIndentedString(cidr)).append("\n"); - sb.append(" ipReservations: ").append(toIndentedString(ipReservations)).append("\n"); - sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address_family"); - openapiFields.add("cidr"); - openapiFields.add("ip_reservations"); - openapiFields.add("public"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPAddress - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPAddress is not found in the empty JSON string", IPAddress.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `address_family` - if (jsonObj.get("address_family") != null && !jsonObj.get("address_family").isJsonNull()) { - AddressFamilyEnum.validateJsonElement(jsonObj.get("address_family")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ip_reservations") != null && !jsonObj.get("ip_reservations").isJsonNull() && !jsonObj.get("ip_reservations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_reservations` to be an array in the JSON string but got `%s`", jsonObj.get("ip_reservations").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPAddress.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPAddress' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPAddress.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPAddress value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPAddress read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPAddress instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPAddress given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPAddress - * @throws IOException if the JSON string is invalid with respect to IPAddress - */ - public static IPAddress fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPAddress.class); - } - - /** - * Convert an instance of IPAddress to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java deleted file mode 100644 index a9d220a07..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignment.java +++ /dev/null @@ -1,885 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignmentMetro; -import com.equinix.openapi.metal.v1.model.ParentBlock; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPAssignment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPAssignment { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private Integer addressFamily; - - public static final String SERIALIZED_NAME_ASSIGNED_TO = "assigned_to"; - @SerializedName(SERIALIZED_NAME_ASSIGNED_TO) - private Href assignedTo; - - public static final String SERIALIZED_NAME_CIDR = "cidr"; - @SerializedName(SERIALIZED_NAME_CIDR) - private Integer cidr; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - @SerializedName(SERIALIZED_NAME_ENABLED) - private Boolean enabled; - - public static final String SERIALIZED_NAME_GATEWAY = "gateway"; - @SerializedName(SERIALIZED_NAME_GATEWAY) - private String gateway; - - public static final String SERIALIZED_NAME_GLOBAL_IP = "global_ip"; - @SerializedName(SERIALIZED_NAME_GLOBAL_IP) - private Boolean globalIp; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_MANAGEABLE = "manageable"; - @SerializedName(SERIALIZED_NAME_MANAGEABLE) - private Boolean manageable; - - public static final String SERIALIZED_NAME_MANAGEMENT = "management"; - @SerializedName(SERIALIZED_NAME_MANAGEMENT) - private Boolean management; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private IPAssignmentMetro metro; - - public static final String SERIALIZED_NAME_NETMASK = "netmask"; - @SerializedName(SERIALIZED_NAME_NETMASK) - private String netmask; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private String network; - - public static final String SERIALIZED_NAME_PARENT_BLOCK = "parent_block"; - @SerializedName(SERIALIZED_NAME_PARENT_BLOCK) - private ParentBlock parentBlock; - - public static final String SERIALIZED_NAME_PUBLIC = "public"; - @SerializedName(SERIALIZED_NAME_PUBLIC) - private Boolean _public; - - /** - * Only set when this is a Metal Gateway Elastic IP Assignment. Describes the current configuration state of this IP on the network. - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - PENDING("pending"), - - ACTIVE("active"), - - DELETING("deleting"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_NEXT_HOP = "next_hop"; - @SerializedName(SERIALIZED_NAME_NEXT_HOP) - private String nextHop; - - public IPAssignment() { - } - - public IPAssignment address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public IPAssignment addressFamily(Integer addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Get addressFamily - * @return addressFamily - **/ - @javax.annotation.Nullable - public Integer getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(Integer addressFamily) { - this.addressFamily = addressFamily; - } - - - public IPAssignment assignedTo(Href assignedTo) { - - this.assignedTo = assignedTo; - return this; - } - - /** - * Get assignedTo - * @return assignedTo - **/ - @javax.annotation.Nullable - public Href getAssignedTo() { - return assignedTo; - } - - - public void setAssignedTo(Href assignedTo) { - this.assignedTo = assignedTo; - } - - - public IPAssignment cidr(Integer cidr) { - - this.cidr = cidr; - return this; - } - - /** - * Get cidr - * @return cidr - **/ - @javax.annotation.Nullable - public Integer getCidr() { - return cidr; - } - - - public void setCidr(Integer cidr) { - this.cidr = cidr; - } - - - public IPAssignment createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public IPAssignment enabled(Boolean enabled) { - - this.enabled = enabled; - return this; - } - - /** - * Get enabled - * @return enabled - **/ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; - } - - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - - public IPAssignment gateway(String gateway) { - - this.gateway = gateway; - return this; - } - - /** - * Get gateway - * @return gateway - **/ - @javax.annotation.Nullable - public String getGateway() { - return gateway; - } - - - public void setGateway(String gateway) { - this.gateway = gateway; - } - - - public IPAssignment globalIp(Boolean globalIp) { - - this.globalIp = globalIp; - return this; - } - - /** - * Get globalIp - * @return globalIp - **/ - @javax.annotation.Nullable - public Boolean getGlobalIp() { - return globalIp; - } - - - public void setGlobalIp(Boolean globalIp) { - this.globalIp = globalIp; - } - - - public IPAssignment href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public IPAssignment id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public IPAssignment manageable(Boolean manageable) { - - this.manageable = manageable; - return this; - } - - /** - * Get manageable - * @return manageable - **/ - @javax.annotation.Nullable - public Boolean getManageable() { - return manageable; - } - - - public void setManageable(Boolean manageable) { - this.manageable = manageable; - } - - - public IPAssignment management(Boolean management) { - - this.management = management; - return this; - } - - /** - * Get management - * @return management - **/ - @javax.annotation.Nullable - public Boolean getManagement() { - return management; - } - - - public void setManagement(Boolean management) { - this.management = management; - } - - - public IPAssignment metro(IPAssignmentMetro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public IPAssignmentMetro getMetro() { - return metro; - } - - - public void setMetro(IPAssignmentMetro metro) { - this.metro = metro; - } - - - public IPAssignment netmask(String netmask) { - - this.netmask = netmask; - return this; - } - - /** - * Get netmask - * @return netmask - **/ - @javax.annotation.Nullable - public String getNetmask() { - return netmask; - } - - - public void setNetmask(String netmask) { - this.netmask = netmask; - } - - - public IPAssignment network(String network) { - - this.network = network; - return this; - } - - /** - * Get network - * @return network - **/ - @javax.annotation.Nullable - public String getNetwork() { - return network; - } - - - public void setNetwork(String network) { - this.network = network; - } - - - public IPAssignment parentBlock(ParentBlock parentBlock) { - - this.parentBlock = parentBlock; - return this; - } - - /** - * Get parentBlock - * @return parentBlock - **/ - @javax.annotation.Nullable - public ParentBlock getParentBlock() { - return parentBlock; - } - - - public void setParentBlock(ParentBlock parentBlock) { - this.parentBlock = parentBlock; - } - - - public IPAssignment _public(Boolean _public) { - - this._public = _public; - return this; - } - - /** - * Get _public - * @return _public - **/ - @javax.annotation.Nullable - public Boolean getPublic() { - return _public; - } - - - public void setPublic(Boolean _public) { - this._public = _public; - } - - - public IPAssignment state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * Only set when this is a Metal Gateway Elastic IP Assignment. Describes the current configuration state of this IP on the network. - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public IPAssignment nextHop(String nextHop) { - - this.nextHop = nextHop; - return this; - } - - /** - * Only set when this is a Metal Gateway Elastic IP Assignment. The IP address within the Metal Gateway to which requests to the Elastic IP are forwarded. - * @return nextHop - **/ - @javax.annotation.Nullable - public String getNextHop() { - return nextHop; - } - - - public void setNextHop(String nextHop) { - this.nextHop = nextHop; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPAssignment instance itself - */ - public IPAssignment putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPAssignment ipAssignment = (IPAssignment) o; - return Objects.equals(this.address, ipAssignment.address) && - Objects.equals(this.addressFamily, ipAssignment.addressFamily) && - Objects.equals(this.assignedTo, ipAssignment.assignedTo) && - Objects.equals(this.cidr, ipAssignment.cidr) && - Objects.equals(this.createdAt, ipAssignment.createdAt) && - Objects.equals(this.enabled, ipAssignment.enabled) && - Objects.equals(this.gateway, ipAssignment.gateway) && - Objects.equals(this.globalIp, ipAssignment.globalIp) && - Objects.equals(this.href, ipAssignment.href) && - Objects.equals(this.id, ipAssignment.id) && - Objects.equals(this.manageable, ipAssignment.manageable) && - Objects.equals(this.management, ipAssignment.management) && - Objects.equals(this.metro, ipAssignment.metro) && - Objects.equals(this.netmask, ipAssignment.netmask) && - Objects.equals(this.network, ipAssignment.network) && - Objects.equals(this.parentBlock, ipAssignment.parentBlock) && - Objects.equals(this._public, ipAssignment._public) && - Objects.equals(this.state, ipAssignment.state) && - Objects.equals(this.nextHop, ipAssignment.nextHop)&& - Objects.equals(this.additionalProperties, ipAssignment.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, addressFamily, assignedTo, cidr, createdAt, enabled, gateway, globalIp, href, id, manageable, management, metro, netmask, network, parentBlock, _public, state, nextHop, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPAssignment {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" assignedTo: ").append(toIndentedString(assignedTo)).append("\n"); - sb.append(" cidr: ").append(toIndentedString(cidr)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); - sb.append(" globalIp: ").append(toIndentedString(globalIp)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" manageable: ").append(toIndentedString(manageable)).append("\n"); - sb.append(" management: ").append(toIndentedString(management)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" netmask: ").append(toIndentedString(netmask)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" parentBlock: ").append(toIndentedString(parentBlock)).append("\n"); - sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" nextHop: ").append(toIndentedString(nextHop)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("address_family"); - openapiFields.add("assigned_to"); - openapiFields.add("cidr"); - openapiFields.add("created_at"); - openapiFields.add("enabled"); - openapiFields.add("gateway"); - openapiFields.add("global_ip"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("manageable"); - openapiFields.add("management"); - openapiFields.add("metro"); - openapiFields.add("netmask"); - openapiFields.add("network"); - openapiFields.add("parent_block"); - openapiFields.add("public"); - openapiFields.add("state"); - openapiFields.add("next_hop"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPAssignment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPAssignment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignment is not found in the empty JSON string", IPAssignment.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - // validate the optional field `assigned_to` - if (jsonObj.get("assigned_to") != null && !jsonObj.get("assigned_to").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("assigned_to")); - } - if ((jsonObj.get("gateway") != null && !jsonObj.get("gateway").isJsonNull()) && !jsonObj.get("gateway").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `gateway` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gateway").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - IPAssignmentMetro.validateJsonElement(jsonObj.get("metro")); - } - if ((jsonObj.get("netmask") != null && !jsonObj.get("netmask").isJsonNull()) && !jsonObj.get("netmask").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `netmask` to be a primitive type in the JSON string but got `%s`", jsonObj.get("netmask").toString())); - } - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); - } - // validate the optional field `parent_block` - if (jsonObj.get("parent_block") != null && !jsonObj.get("parent_block").isJsonNull()) { - ParentBlock.validateJsonElement(jsonObj.get("parent_block")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - if ((jsonObj.get("next_hop") != null && !jsonObj.get("next_hop").isJsonNull()) && !jsonObj.get("next_hop").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `next_hop` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next_hop").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPAssignment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPAssignment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPAssignment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPAssignment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPAssignment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPAssignment instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPAssignment given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPAssignment - * @throws IOException if the JSON string is invalid with respect to IPAssignment - */ - public static IPAssignment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPAssignment.class); - } - - /** - * Convert an instance of IPAssignment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java deleted file mode 100644 index f4065bec4..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentInput.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPAssignmentInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPAssignmentInput { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public IPAssignmentInput() { - } - - public IPAssignmentInput address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nonnull - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public IPAssignmentInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPAssignmentInput instance itself - */ - public IPAssignmentInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPAssignmentInput ipAssignmentInput = (IPAssignmentInput) o; - return Objects.equals(this.address, ipAssignmentInput.address) && - Objects.equals(this.customdata, ipAssignmentInput.customdata)&& - Objects.equals(this.additionalProperties, ipAssignmentInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, customdata, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPAssignmentInput {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("customdata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPAssignmentInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPAssignmentInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignmentInput is not found in the empty JSON string", IPAssignmentInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IPAssignmentInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPAssignmentInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPAssignmentInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPAssignmentInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPAssignmentInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPAssignmentInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPAssignmentInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPAssignmentInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPAssignmentInput - * @throws IOException if the JSON string is invalid with respect to IPAssignmentInput - */ - public static IPAssignmentInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPAssignmentInput.class); - } - - /** - * Convert an instance of IPAssignmentInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java deleted file mode 100644 index a58eba4b3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPAssignmentList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPAssignmentList { - public static final String SERIALIZED_NAME_IP_ADDRESSES = "ip_addresses"; - @SerializedName(SERIALIZED_NAME_IP_ADDRESSES) - private List ipAddresses; - - public IPAssignmentList() { - } - - public IPAssignmentList ipAddresses(List ipAddresses) { - - this.ipAddresses = ipAddresses; - return this; - } - - public IPAssignmentList addIpAddressesItem(IPAssignment ipAddressesItem) { - if (this.ipAddresses == null) { - this.ipAddresses = new ArrayList<>(); - } - this.ipAddresses.add(ipAddressesItem); - return this; - } - - /** - * Get ipAddresses - * @return ipAddresses - **/ - @javax.annotation.Nullable - public List getIpAddresses() { - return ipAddresses; - } - - - public void setIpAddresses(List ipAddresses) { - this.ipAddresses = ipAddresses; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPAssignmentList instance itself - */ - public IPAssignmentList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPAssignmentList ipAssignmentList = (IPAssignmentList) o; - return Objects.equals(this.ipAddresses, ipAssignmentList.ipAddresses)&& - Objects.equals(this.additionalProperties, ipAssignmentList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(ipAddresses, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPAssignmentList {\n"); - sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ip_addresses"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPAssignmentList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPAssignmentList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignmentList is not found in the empty JSON string", IPAssignmentList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { - JsonArray jsonArrayipAddresses = jsonObj.getAsJsonArray("ip_addresses"); - if (jsonArrayipAddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("ip_addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_addresses` to be an array in the JSON string but got `%s`", jsonObj.get("ip_addresses").toString())); - } - - // validate the optional field `ip_addresses` (array) - for (int i = 0; i < jsonArrayipAddresses.size(); i++) { - IPAssignment.validateJsonElement(jsonArrayipAddresses.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPAssignmentList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPAssignmentList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPAssignmentList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPAssignmentList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPAssignmentList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPAssignmentList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPAssignmentList given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPAssignmentList - * @throws IOException if the JSON string is invalid with respect to IPAssignmentList - */ - public static IPAssignmentList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPAssignmentList.class); - } - - /** - * Convert an instance of IPAssignmentList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java deleted file mode 100644 index 2e4c71664..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetro.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPAssignmentMetro - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPAssignmentMetro { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public IPAssignmentMetro() { - } - - public IPAssignmentMetro code(String code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - - public void setCode(String code) { - this.code = code; - } - - - public IPAssignmentMetro country(String country) { - - this.country = country; - return this; - } - - /** - * Get country - * @return country - **/ - @javax.annotation.Nullable - public String getCountry() { - return country; - } - - - public void setCountry(String country) { - this.country = country; - } - - - public IPAssignmentMetro id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public IPAssignmentMetro name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPAssignmentMetro instance itself - */ - public IPAssignmentMetro putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPAssignmentMetro ipAssignmentMetro = (IPAssignmentMetro) o; - return Objects.equals(this.code, ipAssignmentMetro.code) && - Objects.equals(this.country, ipAssignmentMetro.country) && - Objects.equals(this.id, ipAssignmentMetro.id) && - Objects.equals(this.name, ipAssignmentMetro.name)&& - Objects.equals(this.additionalProperties, ipAssignmentMetro.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(code, country, id, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPAssignmentMetro {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("country"); - openapiFields.add("id"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPAssignmentMetro - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPAssignmentMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignmentMetro is not found in the empty JSON string", IPAssignmentMetro.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); - } - if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPAssignmentMetro.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPAssignmentMetro' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPAssignmentMetro.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPAssignmentMetro value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPAssignmentMetro read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPAssignmentMetro instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPAssignmentMetro given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPAssignmentMetro - * @throws IOException if the JSON string is invalid with respect to IPAssignmentMetro - */ - public static IPAssignmentMetro fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPAssignmentMetro.class); - } - - /** - * Convert an instance of IPAssignmentMetro to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentUpdateInput.java deleted file mode 100644 index 588e31892..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAssignmentUpdateInput.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPAssignmentUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPAssignmentUpdateInput { - public static final String SERIALIZED_NAME_DETAILS = "details"; - @SerializedName(SERIALIZED_NAME_DETAILS) - private String details; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public IPAssignmentUpdateInput() { - } - - public IPAssignmentUpdateInput details(String details) { - - this.details = details; - return this; - } - - /** - * Get details - * @return details - **/ - @javax.annotation.Nullable - public String getDetails() { - return details; - } - - - public void setDetails(String details) { - this.details = details; - } - - - public IPAssignmentUpdateInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public IPAssignmentUpdateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public IPAssignmentUpdateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPAssignmentUpdateInput instance itself - */ - public IPAssignmentUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPAssignmentUpdateInput ipAssignmentUpdateInput = (IPAssignmentUpdateInput) o; - return Objects.equals(this.details, ipAssignmentUpdateInput.details) && - Objects.equals(this.customdata, ipAssignmentUpdateInput.customdata) && - Objects.equals(this.tags, ipAssignmentUpdateInput.tags)&& - Objects.equals(this.additionalProperties, ipAssignmentUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(details, customdata, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPAssignmentUpdateInput {\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("details"); - openapiFields.add("customdata"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPAssignmentUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPAssignmentUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPAssignmentUpdateInput is not found in the empty JSON string", IPAssignmentUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPAssignmentUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPAssignmentUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPAssignmentUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPAssignmentUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPAssignmentUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPAssignmentUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPAssignmentUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPAssignmentUpdateInput - * @throws IOException if the JSON string is invalid with respect to IPAssignmentUpdateInput - */ - public static IPAssignmentUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPAssignmentUpdateInput.class); - } - - /** - * Convert an instance of IPAssignmentUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java deleted file mode 100644 index 0220c1e73..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesList.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPAvailabilitiesList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPAvailabilitiesList { - public static final String SERIALIZED_NAME_AVAILABLE = "available"; - @SerializedName(SERIALIZED_NAME_AVAILABLE) - private List available; - - public IPAvailabilitiesList() { - } - - public IPAvailabilitiesList available(List available) { - - this.available = available; - return this; - } - - public IPAvailabilitiesList addAvailableItem(String availableItem) { - if (this.available == null) { - this.available = new ArrayList<>(); - } - this.available.add(availableItem); - return this; - } - - /** - * Get available - * @return available - **/ - @javax.annotation.Nullable - public List getAvailable() { - return available; - } - - - public void setAvailable(List available) { - this.available = available; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPAvailabilitiesList instance itself - */ - public IPAvailabilitiesList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPAvailabilitiesList ipAvailabilitiesList = (IPAvailabilitiesList) o; - return Objects.equals(this.available, ipAvailabilitiesList.available)&& - Objects.equals(this.additionalProperties, ipAvailabilitiesList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(available, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPAvailabilitiesList {\n"); - sb.append(" available: ").append(toIndentedString(available)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("available"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPAvailabilitiesList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPAvailabilitiesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPAvailabilitiesList is not found in the empty JSON string", IPAvailabilitiesList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("available") != null && !jsonObj.get("available").isJsonNull() && !jsonObj.get("available").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `available` to be an array in the JSON string but got `%s`", jsonObj.get("available").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPAvailabilitiesList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPAvailabilitiesList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPAvailabilitiesList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPAvailabilitiesList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPAvailabilitiesList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPAvailabilitiesList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPAvailabilitiesList given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPAvailabilitiesList - * @throws IOException if the JSON string is invalid with respect to IPAvailabilitiesList - */ - public static IPAvailabilitiesList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPAvailabilitiesList.class); - } - - /** - * Convert an instance of IPAvailabilitiesList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java deleted file mode 100644 index c36d0dffc..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservation.java +++ /dev/null @@ -1,1154 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.IPReservationMetro; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Project; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPReservation - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPReservation { - public static final String SERIALIZED_NAME_ADDON = "addon"; - @SerializedName(SERIALIZED_NAME_ADDON) - private Boolean addon; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private Integer addressFamily; - - public static final String SERIALIZED_NAME_ASSIGNMENTS = "assignments"; - @SerializedName(SERIALIZED_NAME_ASSIGNMENTS) - private List assignments; - - public static final String SERIALIZED_NAME_AVAILABLE = "available"; - @SerializedName(SERIALIZED_NAME_AVAILABLE) - private String available; - - public static final String SERIALIZED_NAME_BILL = "bill"; - @SerializedName(SERIALIZED_NAME_BILL) - private Boolean bill; - - public static final String SERIALIZED_NAME_CIDR = "cidr"; - @SerializedName(SERIALIZED_NAME_CIDR) - private Integer cidr; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - @SerializedName(SERIALIZED_NAME_ENABLED) - private Boolean enabled; - - public static final String SERIALIZED_NAME_DETAILS = "details"; - @SerializedName(SERIALIZED_NAME_DETAILS) - private String details; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private IPReservationFacility facility; - - public static final String SERIALIZED_NAME_GATEWAY = "gateway"; - @SerializedName(SERIALIZED_NAME_GATEWAY) - private String gateway; - - public static final String SERIALIZED_NAME_GLOBAL_IP = "global_ip"; - @SerializedName(SERIALIZED_NAME_GLOBAL_IP) - private Boolean globalIp; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_MANAGEABLE = "manageable"; - @SerializedName(SERIALIZED_NAME_MANAGEABLE) - private Boolean manageable; - - public static final String SERIALIZED_NAME_MANAGEMENT = "management"; - @SerializedName(SERIALIZED_NAME_MANAGEMENT) - private Boolean management; - - public static final String SERIALIZED_NAME_METAL_GATEWAY = "metal_gateway"; - @SerializedName(SERIALIZED_NAME_METAL_GATEWAY) - private MetalGatewayLite metalGateway; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private IPReservationMetro metro; - - public static final String SERIALIZED_NAME_NETMASK = "netmask"; - @SerializedName(SERIALIZED_NAME_NETMASK) - private String netmask; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private String network; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Project project; - - public static final String SERIALIZED_NAME_PROJECT_LITE = "project_lite"; - @SerializedName(SERIALIZED_NAME_PROJECT_LITE) - private Href projectLite; - - public static final String SERIALIZED_NAME_REQUESTED_BY = "requested_by"; - @SerializedName(SERIALIZED_NAME_REQUESTED_BY) - private Href requestedBy; - - public static final String SERIALIZED_NAME_PUBLIC = "public"; - @SerializedName(SERIALIZED_NAME_PUBLIC) - private Boolean _public; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - GLOBAL_IPV4("global_ipv4"), - - PUBLIC_IPV4("public_ipv4"), - - PRIVATE_IPV4("private_ipv4"), - - PUBLIC_IPV6("public_ipv6"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public IPReservation() { - } - - public IPReservation addon(Boolean addon) { - - this.addon = addon; - return this; - } - - /** - * Get addon - * @return addon - **/ - @javax.annotation.Nullable - public Boolean getAddon() { - return addon; - } - - - public void setAddon(Boolean addon) { - this.addon = addon; - } - - - public IPReservation address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public IPReservation addressFamily(Integer addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Get addressFamily - * @return addressFamily - **/ - @javax.annotation.Nullable - public Integer getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(Integer addressFamily) { - this.addressFamily = addressFamily; - } - - - public IPReservation assignments(List assignments) { - - this.assignments = assignments; - return this; - } - - public IPReservation addAssignmentsItem(IPAssignment assignmentsItem) { - if (this.assignments == null) { - this.assignments = new ArrayList<>(); - } - this.assignments.add(assignmentsItem); - return this; - } - - /** - * Get assignments - * @return assignments - **/ - @javax.annotation.Nullable - public List getAssignments() { - return assignments; - } - - - public void setAssignments(List assignments) { - this.assignments = assignments; - } - - - public IPReservation available(String available) { - - this.available = available; - return this; - } - - /** - * Get available - * @return available - **/ - @javax.annotation.Nullable - public String getAvailable() { - return available; - } - - - public void setAvailable(String available) { - this.available = available; - } - - - public IPReservation bill(Boolean bill) { - - this.bill = bill; - return this; - } - - /** - * Get bill - * @return bill - **/ - @javax.annotation.Nullable - public Boolean getBill() { - return bill; - } - - - public void setBill(Boolean bill) { - this.bill = bill; - } - - - public IPReservation cidr(Integer cidr) { - - this.cidr = cidr; - return this; - } - - /** - * Get cidr - * @return cidr - **/ - @javax.annotation.Nullable - public Integer getCidr() { - return cidr; - } - - - public void setCidr(Integer cidr) { - this.cidr = cidr; - } - - - public IPReservation createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public IPReservation customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public IPReservation enabled(Boolean enabled) { - - this.enabled = enabled; - return this; - } - - /** - * Get enabled - * @return enabled - **/ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; - } - - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - - public IPReservation details(String details) { - - this.details = details; - return this; - } - - /** - * Get details - * @return details - **/ - @javax.annotation.Nullable - public String getDetails() { - return details; - } - - - public void setDetails(String details) { - this.details = details; - } - - - public IPReservation facility(IPReservationFacility facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - **/ - @javax.annotation.Nullable - public IPReservationFacility getFacility() { - return facility; - } - - - public void setFacility(IPReservationFacility facility) { - this.facility = facility; - } - - - public IPReservation gateway(String gateway) { - - this.gateway = gateway; - return this; - } - - /** - * Get gateway - * @return gateway - **/ - @javax.annotation.Nullable - public String getGateway() { - return gateway; - } - - - public void setGateway(String gateway) { - this.gateway = gateway; - } - - - public IPReservation globalIp(Boolean globalIp) { - - this.globalIp = globalIp; - return this; - } - - /** - * Get globalIp - * @return globalIp - **/ - @javax.annotation.Nullable - public Boolean getGlobalIp() { - return globalIp; - } - - - public void setGlobalIp(Boolean globalIp) { - this.globalIp = globalIp; - } - - - public IPReservation href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public IPReservation id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public IPReservation manageable(Boolean manageable) { - - this.manageable = manageable; - return this; - } - - /** - * Get manageable - * @return manageable - **/ - @javax.annotation.Nullable - public Boolean getManageable() { - return manageable; - } - - - public void setManageable(Boolean manageable) { - this.manageable = manageable; - } - - - public IPReservation management(Boolean management) { - - this.management = management; - return this; - } - - /** - * Get management - * @return management - **/ - @javax.annotation.Nullable - public Boolean getManagement() { - return management; - } - - - public void setManagement(Boolean management) { - this.management = management; - } - - - public IPReservation metalGateway(MetalGatewayLite metalGateway) { - - this.metalGateway = metalGateway; - return this; - } - - /** - * Get metalGateway - * @return metalGateway - **/ - @javax.annotation.Nullable - public MetalGatewayLite getMetalGateway() { - return metalGateway; - } - - - public void setMetalGateway(MetalGatewayLite metalGateway) { - this.metalGateway = metalGateway; - } - - - public IPReservation metro(IPReservationMetro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public IPReservationMetro getMetro() { - return metro; - } - - - public void setMetro(IPReservationMetro metro) { - this.metro = metro; - } - - - public IPReservation netmask(String netmask) { - - this.netmask = netmask; - return this; - } - - /** - * Get netmask - * @return netmask - **/ - @javax.annotation.Nullable - public String getNetmask() { - return netmask; - } - - - public void setNetmask(String netmask) { - this.netmask = netmask; - } - - - public IPReservation network(String network) { - - this.network = network; - return this; - } - - /** - * Get network - * @return network - **/ - @javax.annotation.Nullable - public String getNetwork() { - return network; - } - - - public void setNetwork(String network) { - this.network = network; - } - - - public IPReservation project(Project project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Project getProject() { - return project; - } - - - public void setProject(Project project) { - this.project = project; - } - - - public IPReservation projectLite(Href projectLite) { - - this.projectLite = projectLite; - return this; - } - - /** - * Get projectLite - * @return projectLite - **/ - @javax.annotation.Nullable - public Href getProjectLite() { - return projectLite; - } - - - public void setProjectLite(Href projectLite) { - this.projectLite = projectLite; - } - - - public IPReservation requestedBy(Href requestedBy) { - - this.requestedBy = requestedBy; - return this; - } - - /** - * Get requestedBy - * @return requestedBy - **/ - @javax.annotation.Nullable - public Href getRequestedBy() { - return requestedBy; - } - - - public void setRequestedBy(Href requestedBy) { - this.requestedBy = requestedBy; - } - - - public IPReservation _public(Boolean _public) { - - this._public = _public; - return this; - } - - /** - * Get _public - * @return _public - **/ - @javax.annotation.Nullable - public Boolean getPublic() { - return _public; - } - - - public void setPublic(Boolean _public) { - this._public = _public; - } - - - public IPReservation state(String state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public String getState() { - return state; - } - - - public void setState(String state) { - this.state = state; - } - - - public IPReservation tags(List tags) { - - this.tags = tags; - return this; - } - - public IPReservation addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public IPReservation type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPReservation ipReservation = (IPReservation) o; - return Objects.equals(this.addon, ipReservation.addon) && - Objects.equals(this.address, ipReservation.address) && - Objects.equals(this.addressFamily, ipReservation.addressFamily) && - Objects.equals(this.assignments, ipReservation.assignments) && - Objects.equals(this.available, ipReservation.available) && - Objects.equals(this.bill, ipReservation.bill) && - Objects.equals(this.cidr, ipReservation.cidr) && - Objects.equals(this.createdAt, ipReservation.createdAt) && - Objects.equals(this.customdata, ipReservation.customdata) && - Objects.equals(this.enabled, ipReservation.enabled) && - Objects.equals(this.details, ipReservation.details) && - Objects.equals(this.facility, ipReservation.facility) && - Objects.equals(this.gateway, ipReservation.gateway) && - Objects.equals(this.globalIp, ipReservation.globalIp) && - Objects.equals(this.href, ipReservation.href) && - Objects.equals(this.id, ipReservation.id) && - Objects.equals(this.manageable, ipReservation.manageable) && - Objects.equals(this.management, ipReservation.management) && - Objects.equals(this.metalGateway, ipReservation.metalGateway) && - Objects.equals(this.metro, ipReservation.metro) && - Objects.equals(this.netmask, ipReservation.netmask) && - Objects.equals(this.network, ipReservation.network) && - Objects.equals(this.project, ipReservation.project) && - Objects.equals(this.projectLite, ipReservation.projectLite) && - Objects.equals(this.requestedBy, ipReservation.requestedBy) && - Objects.equals(this._public, ipReservation._public) && - Objects.equals(this.state, ipReservation.state) && - Objects.equals(this.tags, ipReservation.tags) && - Objects.equals(this.type, ipReservation.type); - } - - @Override - public int hashCode() { - return Objects.hash(addon, address, addressFamily, assignments, available, bill, cidr, createdAt, customdata, enabled, details, facility, gateway, globalIp, href, id, manageable, management, metalGateway, metro, netmask, network, project, projectLite, requestedBy, _public, state, tags, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPReservation {\n"); - sb.append(" addon: ").append(toIndentedString(addon)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" assignments: ").append(toIndentedString(assignments)).append("\n"); - sb.append(" available: ").append(toIndentedString(available)).append("\n"); - sb.append(" bill: ").append(toIndentedString(bill)).append("\n"); - sb.append(" cidr: ").append(toIndentedString(cidr)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); - sb.append(" globalIp: ").append(toIndentedString(globalIp)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" manageable: ").append(toIndentedString(manageable)).append("\n"); - sb.append(" management: ").append(toIndentedString(management)).append("\n"); - sb.append(" metalGateway: ").append(toIndentedString(metalGateway)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" netmask: ").append(toIndentedString(netmask)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" projectLite: ").append(toIndentedString(projectLite)).append("\n"); - sb.append(" requestedBy: ").append(toIndentedString(requestedBy)).append("\n"); - sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("addon"); - openapiFields.add("address"); - openapiFields.add("address_family"); - openapiFields.add("assignments"); - openapiFields.add("available"); - openapiFields.add("bill"); - openapiFields.add("cidr"); - openapiFields.add("created_at"); - openapiFields.add("customdata"); - openapiFields.add("enabled"); - openapiFields.add("details"); - openapiFields.add("facility"); - openapiFields.add("gateway"); - openapiFields.add("global_ip"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("manageable"); - openapiFields.add("management"); - openapiFields.add("metal_gateway"); - openapiFields.add("metro"); - openapiFields.add("netmask"); - openapiFields.add("network"); - openapiFields.add("project"); - openapiFields.add("project_lite"); - openapiFields.add("requested_by"); - openapiFields.add("public"); - openapiFields.add("state"); - openapiFields.add("tags"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPReservation - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPReservation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPReservation is not found in the empty JSON string", IPReservation.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!IPReservation.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IPReservation` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IPReservation.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if (jsonObj.get("assignments") != null && !jsonObj.get("assignments").isJsonNull()) { - JsonArray jsonArrayassignments = jsonObj.getAsJsonArray("assignments"); - if (jsonArrayassignments != null) { - // ensure the json data is an array - if (!jsonObj.get("assignments").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `assignments` to be an array in the JSON string but got `%s`", jsonObj.get("assignments").toString())); - } - - // validate the optional field `assignments` (array) - for (int i = 0; i < jsonArrayassignments.size(); i++) { - IPAssignment.validateJsonElement(jsonArrayassignments.get(i)); - }; - } - } - if ((jsonObj.get("available") != null && !jsonObj.get("available").isJsonNull()) && !jsonObj.get("available").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `available` to be a primitive type in the JSON string but got `%s`", jsonObj.get("available").toString())); - } - if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); - } - // validate the optional field `facility` - if (jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) { - IPReservationFacility.validateJsonElement(jsonObj.get("facility")); - } - if ((jsonObj.get("gateway") != null && !jsonObj.get("gateway").isJsonNull()) && !jsonObj.get("gateway").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `gateway` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gateway").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `metal_gateway` - if (jsonObj.get("metal_gateway") != null && !jsonObj.get("metal_gateway").isJsonNull()) { - MetalGatewayLite.validateJsonElement(jsonObj.get("metal_gateway")); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - IPReservationMetro.validateJsonElement(jsonObj.get("metro")); - } - if ((jsonObj.get("netmask") != null && !jsonObj.get("netmask").isJsonNull()) && !jsonObj.get("netmask").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `netmask` to be a primitive type in the JSON string but got `%s`", jsonObj.get("netmask").toString())); - } - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Project.validateJsonElement(jsonObj.get("project")); - } - // validate the optional field `project_lite` - if (jsonObj.get("project_lite") != null && !jsonObj.get("project_lite").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project_lite")); - } - // validate the optional field `requested_by` - if (jsonObj.get("requested_by") != null && !jsonObj.get("requested_by").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("requested_by")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPReservation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPReservation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPReservation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPReservation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IPReservation read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPReservation given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPReservation - * @throws IOException if the JSON string is invalid with respect to IPReservation - */ - public static IPReservation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPReservation.class); - } - - /** - * Convert an instance of IPReservation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationFacility.java deleted file mode 100644 index 23d2030dc..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationFacility.java +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Address; -import com.equinix.openapi.metal.v1.model.DeviceMetro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPReservationFacility - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPReservationFacility { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - /** - * Gets or Sets features - */ - @JsonAdapter(FeaturesEnum.Adapter.class) - public enum FeaturesEnum { - BAREMETAL("baremetal"), - - BACKEND_TRANSFER("backend_transfer"), - - LAYER_2("layer_2"), - - GLOBAL_IPV4("global_ipv4"), - - IBX("ibx"); - - private String value; - - FeaturesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FeaturesEnum fromValue(String value) { - for (FeaturesEnum b : FeaturesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FeaturesEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FeaturesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FeaturesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FeaturesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FEATURES = "features"; - @SerializedName(SERIALIZED_NAME_FEATURES) - private List features; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_IP_RANGES = "ip_ranges"; - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private DeviceMetro metro; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public IPReservationFacility() { - } - - public IPReservationFacility address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public IPReservationFacility code(String code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - - public void setCode(String code) { - this.code = code; - } - - - public IPReservationFacility features(List features) { - - this.features = features; - return this; - } - - public IPReservationFacility addFeaturesItem(FeaturesEnum featuresItem) { - if (this.features == null) { - this.features = new ArrayList<>(); - } - this.features.add(featuresItem); - return this; - } - - /** - * Get features - * @return features - **/ - @javax.annotation.Nullable - public List getFeatures() { - return features; - } - - - public void setFeatures(List features) { - this.features = features; - } - - - public IPReservationFacility id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public IPReservationFacility ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public IPReservationFacility addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * IP ranges registered in facility. Can be used for GeoIP location - * @return ipRanges - **/ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - - public IPReservationFacility metro(DeviceMetro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public DeviceMetro getMetro() { - return metro; - } - - - public void setMetro(DeviceMetro metro) { - this.metro = metro; - } - - - public IPReservationFacility name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPReservationFacility instance itself - */ - public IPReservationFacility putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPReservationFacility ipReservationFacility = (IPReservationFacility) o; - return Objects.equals(this.address, ipReservationFacility.address) && - Objects.equals(this.code, ipReservationFacility.code) && - Objects.equals(this.features, ipReservationFacility.features) && - Objects.equals(this.id, ipReservationFacility.id) && - Objects.equals(this.ipRanges, ipReservationFacility.ipRanges) && - Objects.equals(this.metro, ipReservationFacility.metro) && - Objects.equals(this.name, ipReservationFacility.name)&& - Objects.equals(this.additionalProperties, ipReservationFacility.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, code, features, id, ipRanges, metro, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPReservationFacility {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" features: ").append(toIndentedString(features)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("code"); - openapiFields.add("features"); - openapiFields.add("id"); - openapiFields.add("ip_ranges"); - openapiFields.add("metro"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPReservationFacility - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPReservationFacility.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPReservationFacility is not found in the empty JSON string", IPReservationFacility.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull() && !jsonObj.get("features").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull() && !jsonObj.get("ip_ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - DeviceMetro.validateJsonElement(jsonObj.get("metro")); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPReservationFacility.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPReservationFacility' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPReservationFacility.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPReservationFacility value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPReservationFacility read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPReservationFacility instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPReservationFacility given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPReservationFacility - * @throws IOException if the JSON string is invalid with respect to IPReservationFacility - */ - public static IPReservationFacility fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPReservationFacility.class); - } - - /** - * Convert an instance of IPReservationFacility to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java deleted file mode 100644 index d12e8515b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.IPReservationListIpAddressesInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPReservationList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPReservationList { - public static final String SERIALIZED_NAME_IP_ADDRESSES = "ip_addresses"; - @SerializedName(SERIALIZED_NAME_IP_ADDRESSES) - private List ipAddresses; - - public IPReservationList() { - } - - public IPReservationList ipAddresses(List ipAddresses) { - - this.ipAddresses = ipAddresses; - return this; - } - - public IPReservationList addIpAddressesItem(IPReservationListIpAddressesInner ipAddressesItem) { - if (this.ipAddresses == null) { - this.ipAddresses = new ArrayList<>(); - } - this.ipAddresses.add(ipAddressesItem); - return this; - } - - /** - * Get ipAddresses - * @return ipAddresses - **/ - @javax.annotation.Nullable - public List getIpAddresses() { - return ipAddresses; - } - - - public void setIpAddresses(List ipAddresses) { - this.ipAddresses = ipAddresses; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPReservationList instance itself - */ - public IPReservationList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPReservationList ipReservationList = (IPReservationList) o; - return Objects.equals(this.ipAddresses, ipReservationList.ipAddresses)&& - Objects.equals(this.additionalProperties, ipReservationList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(ipAddresses, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPReservationList {\n"); - sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ip_addresses"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPReservationList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPReservationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPReservationList is not found in the empty JSON string", IPReservationList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { - JsonArray jsonArrayipAddresses = jsonObj.getAsJsonArray("ip_addresses"); - if (jsonArrayipAddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("ip_addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_addresses` to be an array in the JSON string but got `%s`", jsonObj.get("ip_addresses").toString())); - } - - // validate the optional field `ip_addresses` (array) - for (int i = 0; i < jsonArrayipAddresses.size(); i++) { - IPReservationListIpAddressesInner.validateJsonElement(jsonArrayipAddresses.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPReservationList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPReservationList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPReservationList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPReservationList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPReservationList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPReservationList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPReservationList given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPReservationList - * @throws IOException if the JSON string is invalid with respect to IPReservationList - */ - public static IPReservationList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPReservationList.class); - } - - /** - * Convert an instance of IPReservationList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationListIpAddressesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationListIpAddressesInner.java deleted file mode 100644 index 8fe66410d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationListIpAddressesInner.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservation; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPReservationListIpAddressesInner extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IPReservationListIpAddressesInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPReservationListIpAddressesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPReservationListIpAddressesInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterIPReservation = gson.getDelegateAdapter(this, TypeToken.get(IPReservation.class)); - final TypeAdapter adapterVrfIpReservation = gson.getDelegateAdapter(this, TypeToken.get(VrfIpReservation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPReservationListIpAddressesInner value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `IPReservation` - if (value.getActualInstance() instanceof IPReservation) { - JsonElement element = adapterIPReservation.toJsonTree((IPReservation)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfIpReservation` - if (value.getActualInstance() instanceof VrfIpReservation) { - JsonElement element = adapterVrfIpReservation.toJsonTree((VrfIpReservation)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match anyOf schemae: IPReservation, VrfIpReservation"); - } - - @Override - public IPReservationListIpAddressesInner read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize IPReservation - try { - // validate the JSON object to see if any exception is thrown - IPReservation.validateJsonElement(jsonElement); - actualAdapter = adapterIPReservation; - IPReservationListIpAddressesInner ret = new IPReservationListIpAddressesInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for IPReservation failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'IPReservation'", e); - } - // deserialize VrfIpReservation - try { - // validate the JSON object to see if any exception is thrown - VrfIpReservation.validateJsonElement(jsonElement); - actualAdapter = adapterVrfIpReservation; - IPReservationListIpAddressesInner ret = new IPReservationListIpAddressesInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfIpReservation failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfIpReservation'", e); - } - - throw new IOException(String.format("Failed deserialization for IPReservationListIpAddressesInner: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in anyOf - public static final Map> schemas = new HashMap>(); - - public IPReservationListIpAddressesInner() { - super("anyOf", Boolean.FALSE); - } - - public IPReservationListIpAddressesInner(IPReservation o) { - super("anyOf", Boolean.FALSE); - setActualInstance(o); - } - - public IPReservationListIpAddressesInner(VrfIpReservation o) { - super("anyOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("IPReservation", IPReservation.class); - schemas.put("VrfIpReservation", VrfIpReservation.class); - } - - @Override - public Map> getSchemas() { - return IPReservationListIpAddressesInner.schemas; - } - - /** - * Set the instance that matches the anyOf child schema, check - * the instance parameter is valid against the anyOf child schemas: - * IPReservation, VrfIpReservation - * - * It could be an instance of the 'anyOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof IPReservation) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfIpReservation) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be IPReservation, VrfIpReservation"); - } - - /** - * Get the actual instance, which can be the following: - * IPReservation, VrfIpReservation - * - * @return The actual instance (IPReservation, VrfIpReservation) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IPReservation`. If the actual instance is not `IPReservation`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `IPReservation` - * @throws ClassCastException if the instance is not `IPReservation` - */ - public IPReservation getIPReservation() throws ClassCastException { - return (IPReservation)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfIpReservation`. If the actual instance is not `VrfIpReservation`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfIpReservation` - * @throws ClassCastException if the instance is not `VrfIpReservation` - */ - public VrfIpReservation getVrfIpReservation() throws ClassCastException { - return (VrfIpReservation)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPReservationListIpAddressesInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate anyOf schemas one by one - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with IPReservation - try { - IPReservation.validateJsonElement(jsonElement); - return; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for IPReservation failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfIpReservation - try { - VrfIpReservation.validateJsonElement(jsonElement); - return; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfIpReservation failed with `%s`.", e.getMessage())); - // continue to the next one - } - throw new IOException(String.format("The JSON string is invalid for IPReservationListIpAddressesInner with anyOf schemas: IPReservation, VrfIpReservation. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); - - } - - /** - * Create an instance of IPReservationListIpAddressesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPReservationListIpAddressesInner - * @throws IOException if the JSON string is invalid with respect to IPReservationListIpAddressesInner - */ - public static IPReservationListIpAddressesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPReservationListIpAddressesInner.class); - } - - /** - * Convert an instance of IPReservationListIpAddressesInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java deleted file mode 100644 index c684ecedb..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationMetro.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPReservationMetro - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPReservationMetro { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public IPReservationMetro() { - } - - public IPReservationMetro code(String code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - - public void setCode(String code) { - this.code = code; - } - - - public IPReservationMetro country(String country) { - - this.country = country; - return this; - } - - /** - * Get country - * @return country - **/ - @javax.annotation.Nullable - public String getCountry() { - return country; - } - - - public void setCountry(String country) { - this.country = country; - } - - - public IPReservationMetro id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public IPReservationMetro name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPReservationMetro instance itself - */ - public IPReservationMetro putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPReservationMetro ipReservationMetro = (IPReservationMetro) o; - return Objects.equals(this.code, ipReservationMetro.code) && - Objects.equals(this.country, ipReservationMetro.country) && - Objects.equals(this.id, ipReservationMetro.id) && - Objects.equals(this.name, ipReservationMetro.name)&& - Objects.equals(this.additionalProperties, ipReservationMetro.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(code, country, id, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPReservationMetro {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("country"); - openapiFields.add("id"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPReservationMetro - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPReservationMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPReservationMetro is not found in the empty JSON string", IPReservationMetro.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); - } - if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPReservationMetro.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPReservationMetro' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPReservationMetro.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPReservationMetro value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPReservationMetro read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPReservationMetro instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPReservationMetro given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPReservationMetro - * @throws IOException if the JSON string is invalid with respect to IPReservationMetro - */ - public static IPReservationMetro fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPReservationMetro.class); - } - - /** - * Convert an instance of IPReservationMetro to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationOrHref.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationOrHref.java deleted file mode 100644 index e2f9c39e9..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationOrHref.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservation; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.IPReservationMetro; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Project; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPReservationOrHref extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IPReservationOrHref.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPReservationOrHref.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPReservationOrHref' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterIPReservation = gson.getDelegateAdapter(this, TypeToken.get(IPReservation.class)); - final TypeAdapter adapterHref = gson.getDelegateAdapter(this, TypeToken.get(Href.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPReservationOrHref value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `IPReservation` - if (value.getActualInstance() instanceof IPReservation) { - JsonElement element = adapterIPReservation.toJsonTree((IPReservation)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Href` - if (value.getActualInstance() instanceof Href) { - JsonElement element = adapterHref.toJsonTree((Href)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match anyOf schemae: Href, IPReservation"); - } - - @Override - public IPReservationOrHref read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize IPReservation - try { - // validate the JSON object to see if any exception is thrown - IPReservation.validateJsonElement(jsonElement); - actualAdapter = adapterIPReservation; - IPReservationOrHref ret = new IPReservationOrHref(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for IPReservation failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'IPReservation'", e); - } - // deserialize Href - try { - // validate the JSON object to see if any exception is thrown - Href.validateJsonElement(jsonElement); - actualAdapter = adapterHref; - IPReservationOrHref ret = new IPReservationOrHref(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Href failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Href'", e); - } - - throw new IOException(String.format("Failed deserialization for IPReservationOrHref: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in anyOf - public static final Map> schemas = new HashMap>(); - - public IPReservationOrHref() { - super("anyOf", Boolean.FALSE); - } - - public IPReservationOrHref(Href o) { - super("anyOf", Boolean.FALSE); - setActualInstance(o); - } - - public IPReservationOrHref(IPReservation o) { - super("anyOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("IPReservation", IPReservation.class); - schemas.put("Href", Href.class); - } - - @Override - public Map> getSchemas() { - return IPReservationOrHref.schemas; - } - - /** - * Set the instance that matches the anyOf child schema, check - * the instance parameter is valid against the anyOf child schemas: - * Href, IPReservation - * - * It could be an instance of the 'anyOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof IPReservation) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Href) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Href, IPReservation"); - } - - /** - * Get the actual instance, which can be the following: - * Href, IPReservation - * - * @return The actual instance (Href, IPReservation) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IPReservation`. If the actual instance is not `IPReservation`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `IPReservation` - * @throws ClassCastException if the instance is not `IPReservation` - */ - public IPReservation getIPReservation() throws ClassCastException { - return (IPReservation)super.getActualInstance(); - } - /** - * Get the actual instance of `Href`. If the actual instance is not `Href`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Href` - * @throws ClassCastException if the instance is not `Href` - */ - public Href getHref() throws ClassCastException { - return (Href)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPReservationOrHref - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate anyOf schemas one by one - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with IPReservation - try { - IPReservation.validateJsonElement(jsonElement); - return; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for IPReservation failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Href - try { - Href.validateJsonElement(jsonElement); - return; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Href failed with `%s`.", e.getMessage())); - // continue to the next one - } - throw new IOException(String.format("The JSON string is invalid for IPReservationOrHref with anyOf schemas: Href, IPReservation. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); - - } - - /** - * Create an instance of IPReservationOrHref given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPReservationOrHref - * @throws IOException if the JSON string is invalid with respect to IPReservationOrHref - */ - public static IPReservationOrHref fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPReservationOrHref.class); - } - - /** - * Convert an instance of IPReservationOrHref to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationRequestInput.java deleted file mode 100644 index 96ebf687d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/IPReservationRequestInput.java +++ /dev/null @@ -1,544 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * IPReservationRequestInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class IPReservationRequestInput { - public static final String SERIALIZED_NAME_COMMENTS = "comments"; - @SerializedName(SERIALIZED_NAME_COMMENTS) - private String comments; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DETAILS = "details"; - @SerializedName(SERIALIZED_NAME_DETAILS) - private String details; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private String facility; - - public static final String SERIALIZED_NAME_FAIL_ON_APPROVAL_REQUIRED = "fail_on_approval_required"; - @SerializedName(SERIALIZED_NAME_FAIL_ON_APPROVAL_REQUIRED) - private Boolean failOnApprovalRequired; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private Integer quantity; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public IPReservationRequestInput() { - } - - public IPReservationRequestInput comments(String comments) { - - this.comments = comments; - return this; - } - - /** - * Get comments - * @return comments - **/ - @javax.annotation.Nullable - public String getComments() { - return comments; - } - - - public void setComments(String comments) { - this.comments = comments; - } - - - public IPReservationRequestInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public IPReservationRequestInput details(String details) { - - this.details = details; - return this; - } - - /** - * Get details - * @return details - **/ - @javax.annotation.Nullable - public String getDetails() { - return details; - } - - - public void setDetails(String details) { - this.details = details; - } - - - public IPReservationRequestInput facility(String facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - **/ - @javax.annotation.Nullable - public String getFacility() { - return facility; - } - - - public void setFacility(String facility) { - this.facility = facility; - } - - - public IPReservationRequestInput failOnApprovalRequired(Boolean failOnApprovalRequired) { - - this.failOnApprovalRequired = failOnApprovalRequired; - return this; - } - - /** - * Get failOnApprovalRequired - * @return failOnApprovalRequired - **/ - @javax.annotation.Nullable - public Boolean getFailOnApprovalRequired() { - return failOnApprovalRequired; - } - - - public void setFailOnApprovalRequired(Boolean failOnApprovalRequired) { - this.failOnApprovalRequired = failOnApprovalRequired; - } - - - public IPReservationRequestInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * The code of the metro you are requesting the IP reservation in. - * @return metro - **/ - @javax.annotation.Nullable - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public IPReservationRequestInput quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nonnull - public Integer getQuantity() { - return quantity; - } - - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public IPReservationRequestInput tags(List tags) { - - this.tags = tags; - return this; - } - - public IPReservationRequestInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public IPReservationRequestInput type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the IPReservationRequestInput instance itself - */ - public IPReservationRequestInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IPReservationRequestInput ipReservationRequestInput = (IPReservationRequestInput) o; - return Objects.equals(this.comments, ipReservationRequestInput.comments) && - Objects.equals(this.customdata, ipReservationRequestInput.customdata) && - Objects.equals(this.details, ipReservationRequestInput.details) && - Objects.equals(this.facility, ipReservationRequestInput.facility) && - Objects.equals(this.failOnApprovalRequired, ipReservationRequestInput.failOnApprovalRequired) && - Objects.equals(this.metro, ipReservationRequestInput.metro) && - Objects.equals(this.quantity, ipReservationRequestInput.quantity) && - Objects.equals(this.tags, ipReservationRequestInput.tags) && - Objects.equals(this.type, ipReservationRequestInput.type)&& - Objects.equals(this.additionalProperties, ipReservationRequestInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(comments, customdata, details, facility, failOnApprovalRequired, metro, quantity, tags, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IPReservationRequestInput {\n"); - sb.append(" comments: ").append(toIndentedString(comments)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" failOnApprovalRequired: ").append(toIndentedString(failOnApprovalRequired)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("comments"); - openapiFields.add("customdata"); - openapiFields.add("details"); - openapiFields.add("facility"); - openapiFields.add("fail_on_approval_required"); - openapiFields.add("metro"); - openapiFields.add("quantity"); - openapiFields.add("tags"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("quantity"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IPReservationRequestInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IPReservationRequestInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IPReservationRequestInput is not found in the empty JSON string", IPReservationRequestInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : IPReservationRequestInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("comments") != null && !jsonObj.get("comments").isJsonNull()) && !jsonObj.get("comments").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comments` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comments").toString())); - } - if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); - } - if ((jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) && !jsonObj.get("facility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IPReservationRequestInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IPReservationRequestInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IPReservationRequestInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IPReservationRequestInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public IPReservationRequestInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - IPReservationRequestInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IPReservationRequestInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of IPReservationRequestInput - * @throws IOException if the JSON string is invalid with respect to IPReservationRequestInput - */ - public static IPReservationRequestInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IPReservationRequestInput.class); - } - - /** - * Convert an instance of IPReservationRequestInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java deleted file mode 100644 index 1448907bd..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInput.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.InstancesBatchCreateInputBatchesInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InstancesBatchCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InstancesBatchCreateInput { - public static final String SERIALIZED_NAME_BATCHES = "batches"; - @SerializedName(SERIALIZED_NAME_BATCHES) - private List batches; - - public InstancesBatchCreateInput() { - } - - public InstancesBatchCreateInput batches(List batches) { - - this.batches = batches; - return this; - } - - public InstancesBatchCreateInput addBatchesItem(InstancesBatchCreateInputBatchesInner batchesItem) { - if (this.batches == null) { - this.batches = new ArrayList<>(); - } - this.batches.add(batchesItem); - return this; - } - - /** - * Get batches - * @return batches - **/ - @javax.annotation.Nullable - public List getBatches() { - return batches; - } - - - public void setBatches(List batches) { - this.batches = batches; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InstancesBatchCreateInput instance itself - */ - public InstancesBatchCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InstancesBatchCreateInput instancesBatchCreateInput = (InstancesBatchCreateInput) o; - return Objects.equals(this.batches, instancesBatchCreateInput.batches)&& - Objects.equals(this.additionalProperties, instancesBatchCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(batches, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InstancesBatchCreateInput {\n"); - sb.append(" batches: ").append(toIndentedString(batches)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("batches"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InstancesBatchCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InstancesBatchCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InstancesBatchCreateInput is not found in the empty JSON string", InstancesBatchCreateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("batches") != null && !jsonObj.get("batches").isJsonNull()) { - JsonArray jsonArraybatches = jsonObj.getAsJsonArray("batches"); - if (jsonArraybatches != null) { - // ensure the json data is an array - if (!jsonObj.get("batches").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `batches` to be an array in the JSON string but got `%s`", jsonObj.get("batches").toString())); - } - - // validate the optional field `batches` (array) - for (int i = 0; i < jsonArraybatches.size(); i++) { - InstancesBatchCreateInputBatchesInner.validateJsonElement(jsonArraybatches.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InstancesBatchCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InstancesBatchCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InstancesBatchCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InstancesBatchCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InstancesBatchCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InstancesBatchCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InstancesBatchCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of InstancesBatchCreateInput - * @throws IOException if the JSON string is invalid with respect to InstancesBatchCreateInput - */ - public static InstancesBatchCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InstancesBatchCreateInput.class); - } - - /** - * Convert an instance of InstancesBatchCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java deleted file mode 100644 index 58c6b0c08..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInner.java +++ /dev/null @@ -1,1308 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InstancesBatchCreateInputBatchesInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InstancesBatchCreateInputBatchesInner { - public static final String SERIALIZED_NAME_HOSTNAMES = "hostnames"; - @SerializedName(SERIALIZED_NAME_HOSTNAMES) - private List hostnames; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private Integer quantity; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_ALWAYS_PXE = "always_pxe"; - @SerializedName(SERIALIZED_NAME_ALWAYS_PXE) - private Boolean alwaysPxe = false; - - /** - * The billing cycle of the device. - */ - @JsonAdapter(BillingCycleEnum.Adapter.class) - public enum BillingCycleEnum { - HOURLY("hourly"), - - DAILY("daily"), - - MONTHLY("monthly"), - - YEARLY("yearly"); - - private String value; - - BillingCycleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static BillingCycleEnum fromValue(String value) { - for (BillingCycleEnum b : BillingCycleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BillingCycleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public BillingCycleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BillingCycleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - BillingCycleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_BILLING_CYCLE = "billing_cycle"; - @SerializedName(SERIALIZED_NAME_BILLING_CYCLE) - private BillingCycleEnum billingCycle; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Map customdata = new HashMap<>(); - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FEATURES = "features"; - @SerializedName(SERIALIZED_NAME_FEATURES) - private List features; - - public static final String SERIALIZED_NAME_HARDWARE_RESERVATION_ID = "hardware_reservation_id"; - @SerializedName(SERIALIZED_NAME_HARDWARE_RESERVATION_ID) - private String hardwareReservationId = ""; - - public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; - @SerializedName(SERIALIZED_NAME_HOSTNAME) - private String hostname; - - public static final String SERIALIZED_NAME_IP_ADDRESSES = "ip_addresses"; - @SerializedName(SERIALIZED_NAME_IP_ADDRESSES) - private List ipAddresses; - - public static final String SERIALIZED_NAME_IPXE_SCRIPT_URL = "ipxe_script_url"; - @SerializedName(SERIALIZED_NAME_IPXE_SCRIPT_URL) - private String ipxeScriptUrl; - - public static final String SERIALIZED_NAME_LOCKED = "locked"; - @SerializedName(SERIALIZED_NAME_LOCKED) - private Boolean locked = false; - - public static final String SERIALIZED_NAME_NETWORK_FROZEN = "network_frozen"; - @SerializedName(SERIALIZED_NAME_NETWORK_FROZEN) - private Boolean networkFrozen; - - public static final String SERIALIZED_NAME_NO_SSH_KEYS = "no_ssh_keys"; - @SerializedName(SERIALIZED_NAME_NO_SSH_KEYS) - private Boolean noSshKeys = false; - - public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operating_system"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) - private String operatingSystem; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE = "private_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE) - private Integer privateIpv4SubnetSize = 28; - - public static final String SERIALIZED_NAME_PROJECT_SSH_KEYS = "project_ssh_keys"; - @SerializedName(SERIALIZED_NAME_PROJECT_SSH_KEYS) - private List projectSshKeys; - - public static final String SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE = "public_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE) - private Integer publicIpv4SubnetSize = 31; - - public static final String SERIALIZED_NAME_SPOT_INSTANCE = "spot_instance"; - @SerializedName(SERIALIZED_NAME_SPOT_INSTANCE) - private Boolean spotInstance; - - public static final String SERIALIZED_NAME_SPOT_PRICE_MAX = "spot_price_max"; - @SerializedName(SERIALIZED_NAME_SPOT_PRICE_MAX) - private Float spotPriceMax; - - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - public static final String SERIALIZED_NAME_STORAGE = "storage"; - @SerializedName(SERIALIZED_NAME_STORAGE) - private Storage storage; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TERMINATION_TIME = "termination_time"; - @SerializedName(SERIALIZED_NAME_TERMINATION_TIME) - private OffsetDateTime terminationTime; - - public static final String SERIALIZED_NAME_USER_SSH_KEYS = "user_ssh_keys"; - @SerializedName(SERIALIZED_NAME_USER_SSH_KEYS) - private List userSshKeys; - - public static final String SERIALIZED_NAME_USERDATA = "userdata"; - @SerializedName(SERIALIZED_NAME_USERDATA) - private String userdata; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @Deprecated - @SerializedName(SERIALIZED_NAME_FACILITY) - private List facility = new ArrayList<>(); - - public InstancesBatchCreateInputBatchesInner() { - } - - public InstancesBatchCreateInputBatchesInner hostnames(List hostnames) { - - this.hostnames = hostnames; - return this; - } - - public InstancesBatchCreateInputBatchesInner addHostnamesItem(String hostnamesItem) { - if (this.hostnames == null) { - this.hostnames = new ArrayList<>(); - } - this.hostnames.add(hostnamesItem); - return this; - } - - /** - * Get hostnames - * @return hostnames - **/ - @javax.annotation.Nullable - public List getHostnames() { - return hostnames; - } - - - public void setHostnames(List hostnames) { - this.hostnames = hostnames; - } - - - public InstancesBatchCreateInputBatchesInner quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * The number of devices to create in this batch. The hostname may contain an `{{index}}` placeholder, which will be replaced with the index of the device in the batch. For example, if the hostname is `device-{{index}}`, the first device in the batch will have the hostname `device-01`, the second device will have the hostname `device-02`, and so on. - * @return quantity - **/ - @javax.annotation.Nullable - public Integer getQuantity() { - return quantity; - } - - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public InstancesBatchCreateInputBatchesInner metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * Metro code or ID of where the instance should be provisioned in. Either metro or facility must be provided. - * @return metro - **/ - @javax.annotation.Nonnull - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public InstancesBatchCreateInputBatchesInner alwaysPxe(Boolean alwaysPxe) { - - this.alwaysPxe = alwaysPxe; - return this; - } - - /** - * When true, devices with a `custom_ipxe` OS will always boot to iPXE. The default setting of false ensures that iPXE will be used on only the first boot. - * @return alwaysPxe - **/ - @javax.annotation.Nullable - public Boolean getAlwaysPxe() { - return alwaysPxe; - } - - - public void setAlwaysPxe(Boolean alwaysPxe) { - this.alwaysPxe = alwaysPxe; - } - - - public InstancesBatchCreateInputBatchesInner billingCycle(BillingCycleEnum billingCycle) { - - this.billingCycle = billingCycle; - return this; - } - - /** - * The billing cycle of the device. - * @return billingCycle - **/ - @javax.annotation.Nullable - public BillingCycleEnum getBillingCycle() { - return billingCycle; - } - - - public void setBillingCycle(BillingCycleEnum billingCycle) { - this.billingCycle = billingCycle; - } - - - public InstancesBatchCreateInputBatchesInner customdata(Map customdata) { - - this.customdata = customdata; - return this; - } - - public InstancesBatchCreateInputBatchesInner putCustomdataItem(String key, Object customdataItem) { - if (this.customdata == null) { - this.customdata = new HashMap<>(); - } - this.customdata.put(key, customdataItem); - return this; - } - - /** - * Customdata is an arbitrary JSON value that can be accessed via the metadata service. - * @return customdata - **/ - @javax.annotation.Nullable - public Map getCustomdata() { - return customdata; - } - - - public void setCustomdata(Map customdata) { - this.customdata = customdata; - } - - - public InstancesBatchCreateInputBatchesInner description(String description) { - - this.description = description; - return this; - } - - /** - * Any description of the device or how it will be used. This may be used to inform other API consumers with project access. - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public InstancesBatchCreateInputBatchesInner features(List features) { - - this.features = features; - return this; - } - - public InstancesBatchCreateInputBatchesInner addFeaturesItem(String featuresItem) { - if (this.features == null) { - this.features = new ArrayList<>(); - } - this.features.add(featuresItem); - return this; - } - - /** - * The features attribute allows you to optionally specify what features your server should have. In the API shorthand syntax, all features listed are `required`: ``` { \"features\": [\"tpm\"] } ``` Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a `preferred` value. The request will not fail if we have no servers with that feature in our inventory. The API offers an alternative syntax for mixing preferred and required features: ``` { \"features\": { \"tpm\": \"required\", \"raid\": \"preferred\" } } ``` The request will only fail if there are no available servers matching the required `tpm` criteria. - * @return features - **/ - @javax.annotation.Nullable - public List getFeatures() { - return features; - } - - - public void setFeatures(List features) { - this.features = features; - } - - - public InstancesBatchCreateInputBatchesInner hardwareReservationId(String hardwareReservationId) { - - this.hardwareReservationId = hardwareReservationId; - return this; - } - - /** - * The Hardware Reservation UUID to provision. Alternatively, `next-available` can be specified to select from any of the available hardware reservations. An error will be returned if the requested reservation option is not available. See [Reserved Hardware](https://metal.equinix.com/developers/docs/deploy/reserved/) for more details. - * @return hardwareReservationId - **/ - @javax.annotation.Nullable - public String getHardwareReservationId() { - return hardwareReservationId; - } - - - public void setHardwareReservationId(String hardwareReservationId) { - this.hardwareReservationId = hardwareReservationId; - } - - - public InstancesBatchCreateInputBatchesInner hostname(String hostname) { - - this.hostname = hostname; - return this; - } - - /** - * The hostname to use within the operating system. The same hostname may be used on multiple devices within a project. - * @return hostname - **/ - @javax.annotation.Nullable - public String getHostname() { - return hostname; - } - - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - - public InstancesBatchCreateInputBatchesInner ipAddresses(List ipAddresses) { - - this.ipAddresses = ipAddresses; - return this; - } - - public InstancesBatchCreateInputBatchesInner addIpAddressesItem(IPAddress ipAddressesItem) { - if (this.ipAddresses == null) { - this.ipAddresses = new ArrayList<>(); - } - this.ipAddresses.add(ipAddressesItem); - return this; - } - - /** - * The `ip_addresses attribute will allow you to specify the addresses you want created with your device. The default value configures public IPv4, public IPv6, and private IPv4. Private IPv4 address is required. When specifying `ip_addresses`, one of the array items must enable private IPv4. Some operating systems require public IPv4 address. In those cases you will receive an error message if public IPv4 is not enabled. For example, to only configure your server with a private IPv4 address, you can send `{ \"ip_addresses\": [{ \"address_family\": 4, \"public\": false }] }`. It is possible to request a subnet size larger than a `/30` by assigning addresses using the UUID(s) of ip_reservations in your project. For example, `{ \"ip_addresses\": [..., {\"address_family\": 4, \"public\": true, \"ip_reservations\": [\"uuid1\", \"uuid2\"]}] }` To access a server without public IPs, you can use our Out-of-Band console access (SOS) or proxy through another server in the project with public IPs enabled. - * @return ipAddresses - **/ - @javax.annotation.Nullable - public List getIpAddresses() { - return ipAddresses; - } - - - public void setIpAddresses(List ipAddresses) { - this.ipAddresses = ipAddresses; - } - - - public InstancesBatchCreateInputBatchesInner ipxeScriptUrl(String ipxeScriptUrl) { - - this.ipxeScriptUrl = ipxeScriptUrl; - return this; - } - - /** - * When set, the device will chainload an iPXE Script at boot fetched from the supplied URL. See [Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/) for more details. - * @return ipxeScriptUrl - **/ - @javax.annotation.Nullable - public String getIpxeScriptUrl() { - return ipxeScriptUrl; - } - - - public void setIpxeScriptUrl(String ipxeScriptUrl) { - this.ipxeScriptUrl = ipxeScriptUrl; - } - - - public InstancesBatchCreateInputBatchesInner locked(Boolean locked) { - - this.locked = locked; - return this; - } - - /** - * Whether the device should be locked, preventing accidental deletion. - * @return locked - **/ - @javax.annotation.Nullable - public Boolean getLocked() { - return locked; - } - - - public void setLocked(Boolean locked) { - this.locked = locked; - } - - - public InstancesBatchCreateInputBatchesInner networkFrozen(Boolean networkFrozen) { - - this.networkFrozen = networkFrozen; - return this; - } - - /** - * If true, this instance can not be converted to a different network type. - * @return networkFrozen - **/ - @javax.annotation.Nullable - public Boolean getNetworkFrozen() { - return networkFrozen; - } - - - public void setNetworkFrozen(Boolean networkFrozen) { - this.networkFrozen = networkFrozen; - } - - - public InstancesBatchCreateInputBatchesInner noSshKeys(Boolean noSshKeys) { - - this.noSshKeys = noSshKeys; - return this; - } - - /** - * Overrides default behaviour of attaching all of the organization members ssh keys and project ssh keys to device if no specific keys specified - * @return noSshKeys - **/ - @javax.annotation.Nullable - public Boolean getNoSshKeys() { - return noSshKeys; - } - - - public void setNoSshKeys(Boolean noSshKeys) { - this.noSshKeys = noSshKeys; - } - - - public InstancesBatchCreateInputBatchesInner operatingSystem(String operatingSystem) { - - this.operatingSystem = operatingSystem; - return this; - } - - /** - * The slug of the operating system to provision. Check the Equinix Metal operating system documentation for rules that may be imposed per operating system, including restrictions on IP address options and device plans. - * @return operatingSystem - **/ - @javax.annotation.Nonnull - public String getOperatingSystem() { - return operatingSystem; - } - - - public void setOperatingSystem(String operatingSystem) { - this.operatingSystem = operatingSystem; - } - - - public InstancesBatchCreateInputBatchesInner plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * The slug of the device plan to provision. - * @return plan - **/ - @javax.annotation.Nonnull - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public InstancesBatchCreateInputBatchesInner privateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - return this; - } - - /** - * Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. - * @return privateIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPrivateIpv4SubnetSize() { - return privateIpv4SubnetSize; - } - - - public void setPrivateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - } - - - public InstancesBatchCreateInputBatchesInner projectSshKeys(List projectSshKeys) { - - this.projectSshKeys = projectSshKeys; - return this; - } - - public InstancesBatchCreateInputBatchesInner addProjectSshKeysItem(UUID projectSshKeysItem) { - if (this.projectSshKeys == null) { - this.projectSshKeys = new ArrayList<>(); - } - this.projectSshKeys.add(projectSshKeysItem); - return this; - } - - /** - * A list of UUIDs identifying the device parent project that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. - * @return projectSshKeys - **/ - @javax.annotation.Nullable - public List getProjectSshKeys() { - return projectSshKeys; - } - - - public void setProjectSshKeys(List projectSshKeys) { - this.projectSshKeys = projectSshKeys; - } - - - public InstancesBatchCreateInputBatchesInner publicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - return this; - } - - /** - * Deprecated. Use ip_addresses. Subnet range for addresses allocated to this device. Your project must have addresses available for a non-default request. - * @return publicIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPublicIpv4SubnetSize() { - return publicIpv4SubnetSize; - } - - - public void setPublicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - } - - - public InstancesBatchCreateInputBatchesInner spotInstance(Boolean spotInstance) { - - this.spotInstance = spotInstance; - return this; - } - - /** - * Create a spot instance. Spot instances are created with a maximum bid price. If the bid price is not met, the spot instance will be terminated as indicated by the `termination_time` field. - * @return spotInstance - **/ - @javax.annotation.Nullable - public Boolean getSpotInstance() { - return spotInstance; - } - - - public void setSpotInstance(Boolean spotInstance) { - this.spotInstance = spotInstance; - } - - - public InstancesBatchCreateInputBatchesInner spotPriceMax(Float spotPriceMax) { - - this.spotPriceMax = spotPriceMax; - return this; - } - - /** - * The maximum amount to bid for a spot instance. - * @return spotPriceMax - **/ - @javax.annotation.Nullable - public Float getSpotPriceMax() { - return spotPriceMax; - } - - - public void setSpotPriceMax(Float spotPriceMax) { - this.spotPriceMax = spotPriceMax; - } - - - public InstancesBatchCreateInputBatchesInner sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public InstancesBatchCreateInputBatchesInner addSshKeysItem(SSHKeyInput sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * A list of new or existing project ssh_keys that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. These keys are added in addition to any keys defined by `project_ssh_keys` and `user_ssh_keys`. - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - - public InstancesBatchCreateInputBatchesInner storage(Storage storage) { - - this.storage = storage; - return this; - } - - /** - * Get storage - * @return storage - **/ - @javax.annotation.Nullable - public Storage getStorage() { - return storage; - } - - - public void setStorage(Storage storage) { - this.storage = storage; - } - - - public InstancesBatchCreateInputBatchesInner tags(List tags) { - - this.tags = tags; - return this; - } - - public InstancesBatchCreateInputBatchesInner addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public InstancesBatchCreateInputBatchesInner terminationTime(OffsetDateTime terminationTime) { - - this.terminationTime = terminationTime; - return this; - } - - /** - * When the device will be terminated. If you don't supply timezone info, the timestamp is assumed to be in UTC. This is commonly set in advance for ephemeral spot market instances but this field may also be set with on-demand and reservation instances to automatically delete the resource at a given time. The termination time can also be used to release a hardware reservation instance at a given time, keeping the reservation open for other uses. On a spot market device, the termination time will be set automatically when outbid. - * @return terminationTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getTerminationTime() { - return terminationTime; - } - - - public void setTerminationTime(OffsetDateTime terminationTime) { - this.terminationTime = terminationTime; - } - - - public InstancesBatchCreateInputBatchesInner userSshKeys(List userSshKeys) { - - this.userSshKeys = userSshKeys; - return this; - } - - public InstancesBatchCreateInputBatchesInner addUserSshKeysItem(UUID userSshKeysItem) { - if (this.userSshKeys == null) { - this.userSshKeys = new ArrayList<>(); - } - this.userSshKeys.add(userSshKeysItem); - return this; - } - - /** - * A list of UUIDs identifying the users that should be authorized to access this device (typically via /root/.ssh/authorized_keys). These keys will also appear in the device metadata. The users must be members of the project or organization. If no SSH keys are specified (`user_ssh_keys`, `project_ssh_keys`, and `ssh_keys` are all empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. This behaviour can be changed with 'no_ssh_keys' option to omit any SSH key being added. - * @return userSshKeys - **/ - @javax.annotation.Nullable - public List getUserSshKeys() { - return userSshKeys; - } - - - public void setUserSshKeys(List userSshKeys) { - this.userSshKeys = userSshKeys; - } - - - public InstancesBatchCreateInputBatchesInner userdata(String userdata) { - - this.userdata = userdata; - return this; - } - - /** - * The userdata presented in the metadata service for this device. Userdata is fetched and interpreted by the operating system installed on the device. Acceptable formats are determined by the operating system, with the exception of a special iPXE enabling syntax which is handled before the operating system starts. See [Server User Data](https://metal.equinix.com/developers/docs/servers/user-data/) and [Provisioning with Custom iPXE](https://metal.equinix.com/developers/docs/operating-systems/custom-ipxe/#provisioning-with-custom-ipxe) for more details. - * @return userdata - **/ - @javax.annotation.Nullable - public String getUserdata() { - return userdata; - } - - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - - - @Deprecated - public InstancesBatchCreateInputBatchesInner facility(List facility) { - - this.facility = facility; - return this; - } - - public InstancesBatchCreateInputBatchesInner addFacilityItem(String facilityItem) { - if (this.facility == null) { - this.facility = new ArrayList<>(); - } - this.facility.add(facilityItem); - return this; - } - - /** - * The datacenter where the device should be created. Either metro or facility must be provided. The API will accept either a single facility `{ \"facility\": \"f1\" }`, or it can be instructed to create the device in the best available datacenter `{ \"facility\": \"any\" }`. Additionally it is possible to set a prioritized location selection. For example `{ \"facility\": [\"f3\", \"f2\", \"any\"] }` can be used to prioritize `f3` and then `f2` before accepting `any` facility. If none of the facilities provided have availability for the requested device the request will fail. - * @return facility - * @deprecated - **/ - @Deprecated - @javax.annotation.Nonnull - public List getFacility() { - return facility; - } - - - @Deprecated - public void setFacility(List facility) { - this.facility = facility; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InstancesBatchCreateInputBatchesInner instance itself - */ - public InstancesBatchCreateInputBatchesInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InstancesBatchCreateInputBatchesInner instancesBatchCreateInputBatchesInner = (InstancesBatchCreateInputBatchesInner) o; - return Objects.equals(this.hostnames, instancesBatchCreateInputBatchesInner.hostnames) && - Objects.equals(this.quantity, instancesBatchCreateInputBatchesInner.quantity) && - Objects.equals(this.metro, instancesBatchCreateInputBatchesInner.metro) && - Objects.equals(this.alwaysPxe, instancesBatchCreateInputBatchesInner.alwaysPxe) && - Objects.equals(this.billingCycle, instancesBatchCreateInputBatchesInner.billingCycle) && - Objects.equals(this.customdata, instancesBatchCreateInputBatchesInner.customdata) && - Objects.equals(this.description, instancesBatchCreateInputBatchesInner.description) && - Objects.equals(this.features, instancesBatchCreateInputBatchesInner.features) && - Objects.equals(this.hardwareReservationId, instancesBatchCreateInputBatchesInner.hardwareReservationId) && - Objects.equals(this.hostname, instancesBatchCreateInputBatchesInner.hostname) && - Objects.equals(this.ipAddresses, instancesBatchCreateInputBatchesInner.ipAddresses) && - Objects.equals(this.ipxeScriptUrl, instancesBatchCreateInputBatchesInner.ipxeScriptUrl) && - Objects.equals(this.locked, instancesBatchCreateInputBatchesInner.locked) && - Objects.equals(this.networkFrozen, instancesBatchCreateInputBatchesInner.networkFrozen) && - Objects.equals(this.noSshKeys, instancesBatchCreateInputBatchesInner.noSshKeys) && - Objects.equals(this.operatingSystem, instancesBatchCreateInputBatchesInner.operatingSystem) && - Objects.equals(this.plan, instancesBatchCreateInputBatchesInner.plan) && - Objects.equals(this.privateIpv4SubnetSize, instancesBatchCreateInputBatchesInner.privateIpv4SubnetSize) && - Objects.equals(this.projectSshKeys, instancesBatchCreateInputBatchesInner.projectSshKeys) && - Objects.equals(this.publicIpv4SubnetSize, instancesBatchCreateInputBatchesInner.publicIpv4SubnetSize) && - Objects.equals(this.spotInstance, instancesBatchCreateInputBatchesInner.spotInstance) && - Objects.equals(this.spotPriceMax, instancesBatchCreateInputBatchesInner.spotPriceMax) && - Objects.equals(this.sshKeys, instancesBatchCreateInputBatchesInner.sshKeys) && - Objects.equals(this.storage, instancesBatchCreateInputBatchesInner.storage) && - Objects.equals(this.tags, instancesBatchCreateInputBatchesInner.tags) && - Objects.equals(this.terminationTime, instancesBatchCreateInputBatchesInner.terminationTime) && - Objects.equals(this.userSshKeys, instancesBatchCreateInputBatchesInner.userSshKeys) && - Objects.equals(this.userdata, instancesBatchCreateInputBatchesInner.userdata) && - Objects.equals(this.facility, instancesBatchCreateInputBatchesInner.facility)&& - Objects.equals(this.additionalProperties, instancesBatchCreateInputBatchesInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(hostnames, quantity, metro, alwaysPxe, billingCycle, customdata, description, features, hardwareReservationId, hostname, ipAddresses, ipxeScriptUrl, locked, networkFrozen, noSshKeys, operatingSystem, plan, privateIpv4SubnetSize, projectSshKeys, publicIpv4SubnetSize, spotInstance, spotPriceMax, sshKeys, storage, tags, terminationTime, userSshKeys, userdata, facility, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InstancesBatchCreateInputBatchesInner {\n"); - sb.append(" hostnames: ").append(toIndentedString(hostnames)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" alwaysPxe: ").append(toIndentedString(alwaysPxe)).append("\n"); - sb.append(" billingCycle: ").append(toIndentedString(billingCycle)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" features: ").append(toIndentedString(features)).append("\n"); - sb.append(" hardwareReservationId: ").append(toIndentedString(hardwareReservationId)).append("\n"); - sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); - sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); - sb.append(" ipxeScriptUrl: ").append(toIndentedString(ipxeScriptUrl)).append("\n"); - sb.append(" locked: ").append(toIndentedString(locked)).append("\n"); - sb.append(" networkFrozen: ").append(toIndentedString(networkFrozen)).append("\n"); - sb.append(" noSshKeys: ").append(toIndentedString(noSshKeys)).append("\n"); - sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" privateIpv4SubnetSize: ").append(toIndentedString(privateIpv4SubnetSize)).append("\n"); - sb.append(" projectSshKeys: ").append(toIndentedString(projectSshKeys)).append("\n"); - sb.append(" publicIpv4SubnetSize: ").append(toIndentedString(publicIpv4SubnetSize)).append("\n"); - sb.append(" spotInstance: ").append(toIndentedString(spotInstance)).append("\n"); - sb.append(" spotPriceMax: ").append(toIndentedString(spotPriceMax)).append("\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" storage: ").append(toIndentedString(storage)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" terminationTime: ").append(toIndentedString(terminationTime)).append("\n"); - sb.append(" userSshKeys: ").append(toIndentedString(userSshKeys)).append("\n"); - sb.append(" userdata: ").append(toIndentedString(userdata)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("hostnames"); - openapiFields.add("quantity"); - openapiFields.add("metro"); - openapiFields.add("always_pxe"); - openapiFields.add("billing_cycle"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("features"); - openapiFields.add("hardware_reservation_id"); - openapiFields.add("hostname"); - openapiFields.add("ip_addresses"); - openapiFields.add("ipxe_script_url"); - openapiFields.add("locked"); - openapiFields.add("network_frozen"); - openapiFields.add("no_ssh_keys"); - openapiFields.add("operating_system"); - openapiFields.add("plan"); - openapiFields.add("private_ipv4_subnet_size"); - openapiFields.add("project_ssh_keys"); - openapiFields.add("public_ipv4_subnet_size"); - openapiFields.add("spot_instance"); - openapiFields.add("spot_price_max"); - openapiFields.add("ssh_keys"); - openapiFields.add("storage"); - openapiFields.add("tags"); - openapiFields.add("termination_time"); - openapiFields.add("user_ssh_keys"); - openapiFields.add("userdata"); - openapiFields.add("facility"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metro"); - openapiRequiredFields.add("operating_system"); - openapiRequiredFields.add("plan"); - openapiRequiredFields.add("facility"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InstancesBatchCreateInputBatchesInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InstancesBatchCreateInputBatchesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InstancesBatchCreateInputBatchesInner is not found in the empty JSON string", InstancesBatchCreateInputBatchesInner.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InstancesBatchCreateInputBatchesInner.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("hostnames") != null && !jsonObj.get("hostnames").isJsonNull() && !jsonObj.get("hostnames").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `hostnames` to be an array in the JSON string but got `%s`", jsonObj.get("hostnames").toString())); - } - if (!jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - if ((jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) && !jsonObj.get("billing_cycle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billing_cycle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billing_cycle").toString())); - } - // validate the optional field `billing_cycle` - if (jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) { - BillingCycleEnum.validateJsonElement(jsonObj.get("billing_cycle")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull() && !jsonObj.get("features").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); - } - if ((jsonObj.get("hardware_reservation_id") != null && !jsonObj.get("hardware_reservation_id").isJsonNull()) && !jsonObj.get("hardware_reservation_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hardware_reservation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hardware_reservation_id").toString())); - } - if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); - } - if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { - JsonArray jsonArrayipAddresses = jsonObj.getAsJsonArray("ip_addresses"); - if (jsonArrayipAddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("ip_addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_addresses` to be an array in the JSON string but got `%s`", jsonObj.get("ip_addresses").toString())); - } - - // validate the optional field `ip_addresses` (array) - for (int i = 0; i < jsonArrayipAddresses.size(); i++) { - IPAddress.validateJsonElement(jsonArrayipAddresses.get(i)); - }; - } - } - if ((jsonObj.get("ipxe_script_url") != null && !jsonObj.get("ipxe_script_url").isJsonNull()) && !jsonObj.get("ipxe_script_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ipxe_script_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ipxe_script_url").toString())); - } - if (!jsonObj.get("operating_system").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operating_system` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operating_system").toString())); - } - if (!jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonNull() && !jsonObj.get("project_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); - } - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { - JsonArray jsonArraysshKeys = jsonObj.getAsJsonArray("ssh_keys"); - if (jsonArraysshKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - - // validate the optional field `ssh_keys` (array) - for (int i = 0; i < jsonArraysshKeys.size(); i++) { - SSHKeyInput.validateJsonElement(jsonArraysshKeys.get(i)); - }; - } - } - // validate the optional field `storage` - if (jsonObj.get("storage") != null && !jsonObj.get("storage").isJsonNull()) { - Storage.validateJsonElement(jsonObj.get("storage")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonNull() && !jsonObj.get("user_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); - } - if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userdata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userdata").toString())); - } - // ensure the required json array is present - if (jsonObj.get("facility") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("facility").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be an array in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InstancesBatchCreateInputBatchesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InstancesBatchCreateInputBatchesInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InstancesBatchCreateInputBatchesInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InstancesBatchCreateInputBatchesInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InstancesBatchCreateInputBatchesInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InstancesBatchCreateInputBatchesInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InstancesBatchCreateInputBatchesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of InstancesBatchCreateInputBatchesInner - * @throws IOException if the JSON string is invalid with respect to InstancesBatchCreateInputBatchesInner - */ - public static InstancesBatchCreateInputBatchesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InstancesBatchCreateInputBatchesInner.class); - } - - /** - * Convert an instance of InstancesBatchCreateInputBatchesInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java deleted file mode 100644 index 5d762b97d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Interconnection.java +++ /dev/null @@ -1,1061 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.FabricServiceToken; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.InterconnectionPort; -import com.equinix.openapi.metal.v1.model.Metro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Interconnection - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Interconnection { - public static final String SERIALIZED_NAME_CONTACT_EMAIL = "contact_email"; - @SerializedName(SERIALIZED_NAME_CONTACT_EMAIL) - private String contactEmail; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private Href facility; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private Metro metro; - - /** - * The mode of the interconnection (only relevant to Dedicated Ports). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - */ - @JsonAdapter(ModeEnum.Adapter.class) - public enum ModeEnum { - STANDARD("standard"), - - TUNNEL("tunnel"); - - private String value; - - ModeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ModeEnum fromValue(String value) { - for (ModeEnum b : ModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ModeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ModeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ModeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ModeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_MODE = "mode"; - @SerializedName(SERIALIZED_NAME_MODE) - private ModeEnum mode; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION) - private Href organization; - - public static final String SERIALIZED_NAME_PORTS = "ports"; - @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; - - /** - * Either 'primary', meaning a single interconnection, or 'redundant', meaning a redundant interconnection. - */ - @JsonAdapter(RedundancyEnum.Adapter.class) - public enum RedundancyEnum { - PRIMARY("primary"), - - REDUNDANT("redundant"); - - private String value; - - RedundancyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RedundancyEnum fromValue(String value) { - for (RedundancyEnum b : RedundancyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RedundancyEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RedundancyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RedundancyEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - RedundancyEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_REDUNDANCY = "redundancy"; - @SerializedName(SERIALIZED_NAME_REDUNDANCY) - private RedundancyEnum redundancy; - - public static final String SERIALIZED_NAME_SERVICE_TOKENS = "service_tokens"; - @SerializedName(SERIALIZED_NAME_SERVICE_TOKENS) - private List serviceTokens; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TOKEN = "token"; - @SerializedName(SERIALIZED_NAME_TOKEN) - private UUID token; - - /** - * The 'shared' type of interconnection refers to shared connections, or later also known as Fabric Virtual Connections (or Fabric VCs). The 'dedicated' type of interconnection refers to interconnections created with Dedicated Ports. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - SHARED("shared"), - - DEDICATED("dedicated"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_REQUESTED_BY = "requested_by"; - @SerializedName(SERIALIZED_NAME_REQUESTED_BY) - private Href requestedBy; - - public Interconnection() { - } - - public Interconnection contactEmail(String contactEmail) { - - this.contactEmail = contactEmail; - return this; - } - - /** - * Get contactEmail - * @return contactEmail - **/ - @javax.annotation.Nullable - public String getContactEmail() { - return contactEmail; - } - - - public void setContactEmail(String contactEmail) { - this.contactEmail = contactEmail; - } - - - public Interconnection description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public Interconnection facility(Href facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - **/ - @javax.annotation.Nullable - public Href getFacility() { - return facility; - } - - - public void setFacility(Href facility) { - this.facility = facility; - } - - - public Interconnection id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Interconnection metro(Metro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public Metro getMetro() { - return metro; - } - - - public void setMetro(Metro metro) { - this.metro = metro; - } - - - public Interconnection mode(ModeEnum mode) { - - this.mode = mode; - return this; - } - - /** - * The mode of the interconnection (only relevant to Dedicated Ports). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - * @return mode - **/ - @javax.annotation.Nullable - public ModeEnum getMode() { - return mode; - } - - - public void setMode(ModeEnum mode) { - this.mode = mode; - } - - - public Interconnection name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Interconnection organization(Href organization) { - - this.organization = organization; - return this; - } - - /** - * Get organization - * @return organization - **/ - @javax.annotation.Nullable - public Href getOrganization() { - return organization; - } - - - public void setOrganization(Href organization) { - this.organization = organization; - } - - - public Interconnection ports(List ports) { - - this.ports = ports; - return this; - } - - public Interconnection addPortsItem(InterconnectionPort portsItem) { - if (this.ports == null) { - this.ports = new ArrayList<>(); - } - this.ports.add(portsItem); - return this; - } - - /** - * For Fabric VCs, these represent Virtual Port(s) created for the interconnection. For dedicated interconnections, these represent the Dedicated Port(s). - * @return ports - **/ - @javax.annotation.Nullable - public List getPorts() { - return ports; - } - - - public void setPorts(List ports) { - this.ports = ports; - } - - - public Interconnection redundancy(RedundancyEnum redundancy) { - - this.redundancy = redundancy; - return this; - } - - /** - * Either 'primary', meaning a single interconnection, or 'redundant', meaning a redundant interconnection. - * @return redundancy - **/ - @javax.annotation.Nullable - public RedundancyEnum getRedundancy() { - return redundancy; - } - - - public void setRedundancy(RedundancyEnum redundancy) { - this.redundancy = redundancy; - } - - - public Interconnection serviceTokens(List serviceTokens) { - - this.serviceTokens = serviceTokens; - return this; - } - - public Interconnection addServiceTokensItem(FabricServiceToken serviceTokensItem) { - if (this.serviceTokens == null) { - this.serviceTokens = new ArrayList<>(); - } - this.serviceTokens.add(serviceTokensItem); - return this; - } - - /** - * For Fabric VCs (Metal Billed), this will show details of the A-Side service tokens issued for the interconnection. For Fabric VCs (Fabric Billed), this will show the details of the Z-Side service tokens issued for the interconnection. Dedicated interconnections will not have any service tokens issued. There will be one per interconnection, so for redundant interconnections, there should be two service tokens issued. - * @return serviceTokens - **/ - @javax.annotation.Nullable - public List getServiceTokens() { - return serviceTokens; - } - - - public void setServiceTokens(List serviceTokens) { - this.serviceTokens = serviceTokens; - } - - - public Interconnection speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * For interconnections on Dedicated Ports and shared connections, this represents the interconnection's speed in bps. For Fabric VCs, this field refers to the maximum speed of the interconnection in bps. This value will default to 10Gbps for Fabric VCs (Fabric Billed). - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public Interconnection status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public Interconnection tags(List tags) { - - this.tags = tags; - return this; - } - - public Interconnection addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public Interconnection token(UUID token) { - - this.token = token; - return this; - } - - /** - * This token is used for shared interconnections to be used as the Fabric Token. This field is entirely deprecated. - * @return token - **/ - @javax.annotation.Nullable - public UUID getToken() { - return token; - } - - - public void setToken(UUID token) { - this.token = token; - } - - - public Interconnection type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * The 'shared' type of interconnection refers to shared connections, or later also known as Fabric Virtual Connections (or Fabric VCs). The 'dedicated' type of interconnection refers to interconnections created with Dedicated Ports. - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Interconnection createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Interconnection updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Interconnection requestedBy(Href requestedBy) { - - this.requestedBy = requestedBy; - return this; - } - - /** - * Get requestedBy - * @return requestedBy - **/ - @javax.annotation.Nullable - public Href getRequestedBy() { - return requestedBy; - } - - - public void setRequestedBy(Href requestedBy) { - this.requestedBy = requestedBy; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Interconnection instance itself - */ - public Interconnection putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Interconnection interconnection = (Interconnection) o; - return Objects.equals(this.contactEmail, interconnection.contactEmail) && - Objects.equals(this.description, interconnection.description) && - Objects.equals(this.facility, interconnection.facility) && - Objects.equals(this.id, interconnection.id) && - Objects.equals(this.metro, interconnection.metro) && - Objects.equals(this.mode, interconnection.mode) && - Objects.equals(this.name, interconnection.name) && - Objects.equals(this.organization, interconnection.organization) && - Objects.equals(this.ports, interconnection.ports) && - Objects.equals(this.redundancy, interconnection.redundancy) && - Objects.equals(this.serviceTokens, interconnection.serviceTokens) && - Objects.equals(this.speed, interconnection.speed) && - Objects.equals(this.status, interconnection.status) && - Objects.equals(this.tags, interconnection.tags) && - Objects.equals(this.token, interconnection.token) && - Objects.equals(this.type, interconnection.type) && - Objects.equals(this.createdAt, interconnection.createdAt) && - Objects.equals(this.updatedAt, interconnection.updatedAt) && - Objects.equals(this.requestedBy, interconnection.requestedBy)&& - Objects.equals(this.additionalProperties, interconnection.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(contactEmail, description, facility, id, metro, mode, name, organization, ports, redundancy, serviceTokens, speed, status, tags, token, type, createdAt, updatedAt, requestedBy, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Interconnection {\n"); - sb.append(" contactEmail: ").append(toIndentedString(contactEmail)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append(" ports: ").append(toIndentedString(ports)).append("\n"); - sb.append(" redundancy: ").append(toIndentedString(redundancy)).append("\n"); - sb.append(" serviceTokens: ").append(toIndentedString(serviceTokens)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" token: ").append(toIndentedString(token)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" requestedBy: ").append(toIndentedString(requestedBy)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contact_email"); - openapiFields.add("description"); - openapiFields.add("facility"); - openapiFields.add("id"); - openapiFields.add("metro"); - openapiFields.add("mode"); - openapiFields.add("name"); - openapiFields.add("organization"); - openapiFields.add("ports"); - openapiFields.add("redundancy"); - openapiFields.add("service_tokens"); - openapiFields.add("speed"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("token"); - openapiFields.add("type"); - openapiFields.add("created_at"); - openapiFields.add("updated_at"); - openapiFields.add("requested_by"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Interconnection - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Interconnection.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Interconnection is not found in the empty JSON string", Interconnection.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("contact_email") != null && !jsonObj.get("contact_email").isJsonNull()) && !jsonObj.get("contact_email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contact_email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact_email").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // validate the optional field `facility` - if (jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("facility")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - Metro.validateJsonElement(jsonObj.get("metro")); - } - if ((jsonObj.get("mode") != null && !jsonObj.get("mode").isJsonNull()) && !jsonObj.get("mode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mode").toString())); - } - // validate the optional field `mode` - if (jsonObj.get("mode") != null && !jsonObj.get("mode").isJsonNull()) { - ModeEnum.validateJsonElement(jsonObj.get("mode")); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `organization` - if (jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("organization")); - } - if (jsonObj.get("ports") != null && !jsonObj.get("ports").isJsonNull()) { - JsonArray jsonArrayports = jsonObj.getAsJsonArray("ports"); - if (jsonArrayports != null) { - // ensure the json data is an array - if (!jsonObj.get("ports").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ports` to be an array in the JSON string but got `%s`", jsonObj.get("ports").toString())); - } - - // validate the optional field `ports` (array) - for (int i = 0; i < jsonArrayports.size(); i++) { - InterconnectionPort.validateJsonElement(jsonArrayports.get(i)); - }; - } - } - if ((jsonObj.get("redundancy") != null && !jsonObj.get("redundancy").isJsonNull()) && !jsonObj.get("redundancy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redundancy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redundancy").toString())); - } - // validate the optional field `redundancy` - if (jsonObj.get("redundancy") != null && !jsonObj.get("redundancy").isJsonNull()) { - RedundancyEnum.validateJsonElement(jsonObj.get("redundancy")); - } - if (jsonObj.get("service_tokens") != null && !jsonObj.get("service_tokens").isJsonNull()) { - JsonArray jsonArrayserviceTokens = jsonObj.getAsJsonArray("service_tokens"); - if (jsonArrayserviceTokens != null) { - // ensure the json data is an array - if (!jsonObj.get("service_tokens").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `service_tokens` to be an array in the JSON string but got `%s`", jsonObj.get("service_tokens").toString())); - } - - // validate the optional field `service_tokens` (array) - for (int i = 0; i < jsonArrayserviceTokens.size(); i++) { - FabricServiceToken.validateJsonElement(jsonArrayserviceTokens.get(i)); - }; - } - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if ((jsonObj.get("token") != null && !jsonObj.get("token").isJsonNull()) && !jsonObj.get("token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `requested_by` - if (jsonObj.get("requested_by") != null && !jsonObj.get("requested_by").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("requested_by")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Interconnection.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Interconnection' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Interconnection.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Interconnection value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Interconnection read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Interconnection instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Interconnection given an JSON string - * - * @param jsonString JSON string - * @return An instance of Interconnection - * @throws IOException if the JSON string is invalid with respect to Interconnection - */ - public static Interconnection fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Interconnection.class); - } - - /** - * Convert an instance of Interconnection to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java deleted file mode 100644 index 103c7867a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Interconnection; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InterconnectionList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InterconnectionList { - public static final String SERIALIZED_NAME_INTERCONNECTIONS = "interconnections"; - @SerializedName(SERIALIZED_NAME_INTERCONNECTIONS) - private List interconnections; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public InterconnectionList() { - } - - public InterconnectionList interconnections(List interconnections) { - - this.interconnections = interconnections; - return this; - } - - public InterconnectionList addInterconnectionsItem(Interconnection interconnectionsItem) { - if (this.interconnections == null) { - this.interconnections = new ArrayList<>(); - } - this.interconnections.add(interconnectionsItem); - return this; - } - - /** - * Get interconnections - * @return interconnections - **/ - @javax.annotation.Nullable - public List getInterconnections() { - return interconnections; - } - - - public void setInterconnections(List interconnections) { - this.interconnections = interconnections; - } - - - public InterconnectionList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InterconnectionList instance itself - */ - public InterconnectionList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InterconnectionList interconnectionList = (InterconnectionList) o; - return Objects.equals(this.interconnections, interconnectionList.interconnections) && - Objects.equals(this.meta, interconnectionList.meta)&& - Objects.equals(this.additionalProperties, interconnectionList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(interconnections, meta, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InterconnectionList {\n"); - sb.append(" interconnections: ").append(toIndentedString(interconnections)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("interconnections"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InterconnectionList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InterconnectionList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionList is not found in the empty JSON string", InterconnectionList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("interconnections") != null && !jsonObj.get("interconnections").isJsonNull()) { - JsonArray jsonArrayinterconnections = jsonObj.getAsJsonArray("interconnections"); - if (jsonArrayinterconnections != null) { - // ensure the json data is an array - if (!jsonObj.get("interconnections").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `interconnections` to be an array in the JSON string but got `%s`", jsonObj.get("interconnections").toString())); - } - - // validate the optional field `interconnections` (array) - for (int i = 0; i < jsonArrayinterconnections.size(); i++) { - Interconnection.validateJsonElement(jsonArrayinterconnections.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InterconnectionList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InterconnectionList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InterconnectionList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InterconnectionList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InterconnectionList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InterconnectionList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InterconnectionList given an JSON string - * - * @param jsonString JSON string - * @return An instance of InterconnectionList - * @throws IOException if the JSON string is invalid with respect to InterconnectionList - */ - public static InterconnectionList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InterconnectionList.class); - } - - /** - * Convert an instance of InterconnectionList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java deleted file mode 100644 index ce8e6d71a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPort.java +++ /dev/null @@ -1,704 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.VirtualCircuit; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InterconnectionPort - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InterconnectionPort { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION) - private Href organization; - - /** - * Either 'primary' or 'secondary'. - */ - @JsonAdapter(RoleEnum.Adapter.class) - public enum RoleEnum { - PRIMARY("primary"), - - SECONDARY("secondary"); - - private String value; - - RoleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RoleEnum fromValue(String value) { - for (RoleEnum b : RoleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RoleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RoleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - RoleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ROLE = "role"; - @SerializedName(SERIALIZED_NAME_ROLE) - private RoleEnum role; - - /** - * For both Fabric VCs and Dedicated Ports, this will be 'requested' on creation and 'deleting' on deletion. Once the Fabric VC has found its corresponding Fabric connection, this will turn to 'active'. For Dedicated Ports, once the dedicated port is associated, this will also turn to 'active'. For Fabric VCs, this can turn into an 'expired' state if the service token associated is expired. - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - REQUESTED("requested"), - - ACTIVE("active"), - - DELETING("deleting"), - - EXPIRED("expired"), - - DELETE_FAILED("delete_failed"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_SWITCH_ID = "switch_id"; - @SerializedName(SERIALIZED_NAME_SWITCH_ID) - private String switchId; - - public static final String SERIALIZED_NAME_VIRTUAL_CIRCUITS = "virtual_circuits"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_CIRCUITS) - private List virtualCircuits; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - public static final String SERIALIZED_NAME_LINK_STATUS = "link_status"; - @SerializedName(SERIALIZED_NAME_LINK_STATUS) - private String linkStatus; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public InterconnectionPort() { - } - - public InterconnectionPort id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public InterconnectionPort organization(Href organization) { - - this.organization = organization; - return this; - } - - /** - * Get organization - * @return organization - **/ - @javax.annotation.Nullable - public Href getOrganization() { - return organization; - } - - - public void setOrganization(Href organization) { - this.organization = organization; - } - - - public InterconnectionPort role(RoleEnum role) { - - this.role = role; - return this; - } - - /** - * Either 'primary' or 'secondary'. - * @return role - **/ - @javax.annotation.Nullable - public RoleEnum getRole() { - return role; - } - - - public void setRole(RoleEnum role) { - this.role = role; - } - - - public InterconnectionPort status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * For both Fabric VCs and Dedicated Ports, this will be 'requested' on creation and 'deleting' on deletion. Once the Fabric VC has found its corresponding Fabric connection, this will turn to 'active'. For Dedicated Ports, once the dedicated port is associated, this will also turn to 'active'. For Fabric VCs, this can turn into an 'expired' state if the service token associated is expired. - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public InterconnectionPort switchId(String switchId) { - - this.switchId = switchId; - return this; - } - - /** - * A switch 'short ID' - * @return switchId - **/ - @javax.annotation.Nullable - public String getSwitchId() { - return switchId; - } - - - public void setSwitchId(String switchId) { - this.switchId = switchId; - } - - - public InterconnectionPort virtualCircuits(List virtualCircuits) { - - this.virtualCircuits = virtualCircuits; - return this; - } - - public InterconnectionPort addVirtualCircuitsItem(VirtualCircuit virtualCircuitsItem) { - if (this.virtualCircuits == null) { - this.virtualCircuits = new ArrayList<>(); - } - this.virtualCircuits.add(virtualCircuitsItem); - return this; - } - - /** - * Get virtualCircuits - * @return virtualCircuits - **/ - @javax.annotation.Nullable - public List getVirtualCircuits() { - return virtualCircuits; - } - - - public void setVirtualCircuits(List virtualCircuits) { - this.virtualCircuits = virtualCircuits; - } - - - public InterconnectionPort name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public InterconnectionPort speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * Get speed - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public InterconnectionPort linkStatus(String linkStatus) { - - this.linkStatus = linkStatus; - return this; - } - - /** - * Get linkStatus - * @return linkStatus - **/ - @javax.annotation.Nullable - public String getLinkStatus() { - return linkStatus; - } - - - public void setLinkStatus(String linkStatus) { - this.linkStatus = linkStatus; - } - - - public InterconnectionPort href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InterconnectionPort instance itself - */ - public InterconnectionPort putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InterconnectionPort interconnectionPort = (InterconnectionPort) o; - return Objects.equals(this.id, interconnectionPort.id) && - Objects.equals(this.organization, interconnectionPort.organization) && - Objects.equals(this.role, interconnectionPort.role) && - Objects.equals(this.status, interconnectionPort.status) && - Objects.equals(this.switchId, interconnectionPort.switchId) && - Objects.equals(this.virtualCircuits, interconnectionPort.virtualCircuits) && - Objects.equals(this.name, interconnectionPort.name) && - Objects.equals(this.speed, interconnectionPort.speed) && - Objects.equals(this.linkStatus, interconnectionPort.linkStatus) && - Objects.equals(this.href, interconnectionPort.href)&& - Objects.equals(this.additionalProperties, interconnectionPort.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, organization, role, status, switchId, virtualCircuits, name, speed, linkStatus, href, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InterconnectionPort {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" switchId: ").append(toIndentedString(switchId)).append("\n"); - sb.append(" virtualCircuits: ").append(toIndentedString(virtualCircuits)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" linkStatus: ").append(toIndentedString(linkStatus)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("organization"); - openapiFields.add("role"); - openapiFields.add("status"); - openapiFields.add("switch_id"); - openapiFields.add("virtual_circuits"); - openapiFields.add("name"); - openapiFields.add("speed"); - openapiFields.add("link_status"); - openapiFields.add("href"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InterconnectionPort - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InterconnectionPort.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionPort is not found in the empty JSON string", InterconnectionPort.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `organization` - if (jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("organization")); - } - if ((jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) && !jsonObj.get("role").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); - } - // validate the optional field `role` - if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull()) { - RoleEnum.validateJsonElement(jsonObj.get("role")); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - if ((jsonObj.get("switch_id") != null && !jsonObj.get("switch_id").isJsonNull()) && !jsonObj.get("switch_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `switch_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("switch_id").toString())); - } - if (jsonObj.get("virtual_circuits") != null && !jsonObj.get("virtual_circuits").isJsonNull()) { - JsonArray jsonArrayvirtualCircuits = jsonObj.getAsJsonArray("virtual_circuits"); - if (jsonArrayvirtualCircuits != null) { - // ensure the json data is an array - if (!jsonObj.get("virtual_circuits").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `virtual_circuits` to be an array in the JSON string but got `%s`", jsonObj.get("virtual_circuits").toString())); - } - - // validate the optional field `virtual_circuits` (array) - for (int i = 0; i < jsonArrayvirtualCircuits.size(); i++) { - VirtualCircuit.validateJsonElement(jsonArrayvirtualCircuits.get(i)); - }; - } - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("link_status") != null && !jsonObj.get("link_status").isJsonNull()) && !jsonObj.get("link_status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `link_status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link_status").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InterconnectionPort.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InterconnectionPort' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InterconnectionPort.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InterconnectionPort value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InterconnectionPort read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InterconnectionPort instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InterconnectionPort given an JSON string - * - * @param jsonString JSON string - * @return An instance of InterconnectionPort - * @throws IOException if the JSON string is invalid with respect to InterconnectionPort - */ - public static InterconnectionPort fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InterconnectionPort.class); - } - - /** - * Convert an instance of InterconnectionPort to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java deleted file mode 100644 index b57b06f26..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionPortList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.InterconnectionPort; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InterconnectionPortList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InterconnectionPortList { - public static final String SERIALIZED_NAME_PORTS = "ports"; - @SerializedName(SERIALIZED_NAME_PORTS) - private List ports; - - public InterconnectionPortList() { - } - - public InterconnectionPortList ports(List ports) { - - this.ports = ports; - return this; - } - - public InterconnectionPortList addPortsItem(InterconnectionPort portsItem) { - if (this.ports == null) { - this.ports = new ArrayList<>(); - } - this.ports.add(portsItem); - return this; - } - - /** - * Get ports - * @return ports - **/ - @javax.annotation.Nullable - public List getPorts() { - return ports; - } - - - public void setPorts(List ports) { - this.ports = ports; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InterconnectionPortList instance itself - */ - public InterconnectionPortList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InterconnectionPortList interconnectionPortList = (InterconnectionPortList) o; - return Objects.equals(this.ports, interconnectionPortList.ports)&& - Objects.equals(this.additionalProperties, interconnectionPortList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(ports, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InterconnectionPortList {\n"); - sb.append(" ports: ").append(toIndentedString(ports)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ports"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InterconnectionPortList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InterconnectionPortList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionPortList is not found in the empty JSON string", InterconnectionPortList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("ports") != null && !jsonObj.get("ports").isJsonNull()) { - JsonArray jsonArrayports = jsonObj.getAsJsonArray("ports"); - if (jsonArrayports != null) { - // ensure the json data is an array - if (!jsonObj.get("ports").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ports` to be an array in the JSON string but got `%s`", jsonObj.get("ports").toString())); - } - - // validate the optional field `ports` (array) - for (int i = 0; i < jsonArrayports.size(); i++) { - InterconnectionPort.validateJsonElement(jsonArrayports.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InterconnectionPortList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InterconnectionPortList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InterconnectionPortList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InterconnectionPortList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InterconnectionPortList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InterconnectionPortList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InterconnectionPortList given an JSON string - * - * @param jsonString JSON string - * @return An instance of InterconnectionPortList - * @throws IOException if the JSON string is invalid with respect to InterconnectionPortList - */ - public static InterconnectionPortList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InterconnectionPortList.class); - } - - /** - * Convert an instance of InterconnectionPortList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java deleted file mode 100644 index 4b55c2b76..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInput.java +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InterconnectionUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InterconnectionUpdateInput { - public static final String SERIALIZED_NAME_CONTACT_EMAIL = "contact_email"; - @SerializedName(SERIALIZED_NAME_CONTACT_EMAIL) - private String contactEmail; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - /** - * The mode of the interconnection (only relevant to Dedicated Ports). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - */ - @JsonAdapter(ModeEnum.Adapter.class) - public enum ModeEnum { - STANDARD("standard"), - - TUNNEL("tunnel"); - - private String value; - - ModeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ModeEnum fromValue(String value) { - for (ModeEnum b : ModeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ModeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ModeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ModeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ModeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_MODE = "mode"; - @SerializedName(SERIALIZED_NAME_MODE) - private ModeEnum mode; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_REDUNDANCY = "redundancy"; - @SerializedName(SERIALIZED_NAME_REDUNDANCY) - private String redundancy; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public InterconnectionUpdateInput() { - } - - public InterconnectionUpdateInput contactEmail(String contactEmail) { - - this.contactEmail = contactEmail; - return this; - } - - /** - * Get contactEmail - * @return contactEmail - **/ - @javax.annotation.Nullable - public String getContactEmail() { - return contactEmail; - } - - - public void setContactEmail(String contactEmail) { - this.contactEmail = contactEmail; - } - - - public InterconnectionUpdateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public InterconnectionUpdateInput mode(ModeEnum mode) { - - this.mode = mode; - return this; - } - - /** - * The mode of the interconnection (only relevant to Dedicated Ports). Shared connections won't have this field. Can be either 'standard' or 'tunnel'. The default mode of an interconnection on a Dedicated Port is 'standard'. The mode can only be changed when there are no associated virtual circuits on the interconnection. In tunnel mode, an 802.1q tunnel is added to a port to send/receive double tagged packets from server instances. - * @return mode - **/ - @javax.annotation.Nullable - public ModeEnum getMode() { - return mode; - } - - - public void setMode(ModeEnum mode) { - this.mode = mode; - } - - - public InterconnectionUpdateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public InterconnectionUpdateInput redundancy(String redundancy) { - - this.redundancy = redundancy; - return this; - } - - /** - * Updating from 'redundant' to 'primary' will remove a secondary port, while updating from 'primary' to 'redundant' will add one. - * @return redundancy - **/ - @javax.annotation.Nullable - public String getRedundancy() { - return redundancy; - } - - - public void setRedundancy(String redundancy) { - this.redundancy = redundancy; - } - - - public InterconnectionUpdateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public InterconnectionUpdateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InterconnectionUpdateInput instance itself - */ - public InterconnectionUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InterconnectionUpdateInput interconnectionUpdateInput = (InterconnectionUpdateInput) o; - return Objects.equals(this.contactEmail, interconnectionUpdateInput.contactEmail) && - Objects.equals(this.description, interconnectionUpdateInput.description) && - Objects.equals(this.mode, interconnectionUpdateInput.mode) && - Objects.equals(this.name, interconnectionUpdateInput.name) && - Objects.equals(this.redundancy, interconnectionUpdateInput.redundancy) && - Objects.equals(this.tags, interconnectionUpdateInput.tags)&& - Objects.equals(this.additionalProperties, interconnectionUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(contactEmail, description, mode, name, redundancy, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InterconnectionUpdateInput {\n"); - sb.append(" contactEmail: ").append(toIndentedString(contactEmail)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" redundancy: ").append(toIndentedString(redundancy)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contact_email"); - openapiFields.add("description"); - openapiFields.add("mode"); - openapiFields.add("name"); - openapiFields.add("redundancy"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InterconnectionUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InterconnectionUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InterconnectionUpdateInput is not found in the empty JSON string", InterconnectionUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("contact_email") != null && !jsonObj.get("contact_email").isJsonNull()) && !jsonObj.get("contact_email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contact_email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact_email").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("mode") != null && !jsonObj.get("mode").isJsonNull()) && !jsonObj.get("mode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mode").toString())); - } - // validate the optional field `mode` - if (jsonObj.get("mode") != null && !jsonObj.get("mode").isJsonNull()) { - ModeEnum.validateJsonElement(jsonObj.get("mode")); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("redundancy") != null && !jsonObj.get("redundancy").isJsonNull()) && !jsonObj.get("redundancy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redundancy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redundancy").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InterconnectionUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InterconnectionUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InterconnectionUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InterconnectionUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InterconnectionUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InterconnectionUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InterconnectionUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of InterconnectionUpdateInput - * @throws IOException if the JSON string is invalid with respect to InterconnectionUpdateInput - */ - public static InterconnectionUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InterconnectionUpdateInput.class); - } - - /** - * Convert an instance of InterconnectionUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java deleted file mode 100644 index cd15bfc4a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invitation.java +++ /dev/null @@ -1,681 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Invitation - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Invitation { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_INVITATION = "invitation"; - @SerializedName(SERIALIZED_NAME_INVITATION) - private Href invitation; - - public static final String SERIALIZED_NAME_INVITED_BY = "invited_by"; - @SerializedName(SERIALIZED_NAME_INVITED_BY) - private Href invitedBy; - - public static final String SERIALIZED_NAME_INVITEE = "invitee"; - @SerializedName(SERIALIZED_NAME_INVITEE) - private String invitee; - - public static final String SERIALIZED_NAME_NONCE = "nonce"; - @SerializedName(SERIALIZED_NAME_NONCE) - private String nonce; - - public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION) - private Href organization; - - public static final String SERIALIZED_NAME_PROJECTS = "projects"; - @SerializedName(SERIALIZED_NAME_PROJECTS) - private List projects; - - /** - * Gets or Sets roles - */ - @JsonAdapter(RolesEnum.Adapter.class) - public enum RolesEnum { - ADMIN("admin"), - - BILLING("billing"), - - COLLABORATOR("collaborator"), - - LIMITED_COLLABORATOR("limited_collaborator"); - - private String value; - - RolesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RolesEnum fromValue(String value) { - for (RolesEnum b : RolesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RolesEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RolesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RolesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - RolesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ROLES = "roles"; - @SerializedName(SERIALIZED_NAME_ROLES) - private List roles; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public Invitation() { - } - - public Invitation createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Invitation href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public Invitation id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Invitation invitation(Href invitation) { - - this.invitation = invitation; - return this; - } - - /** - * Get invitation - * @return invitation - **/ - @javax.annotation.Nullable - public Href getInvitation() { - return invitation; - } - - - public void setInvitation(Href invitation) { - this.invitation = invitation; - } - - - public Invitation invitedBy(Href invitedBy) { - - this.invitedBy = invitedBy; - return this; - } - - /** - * Get invitedBy - * @return invitedBy - **/ - @javax.annotation.Nullable - public Href getInvitedBy() { - return invitedBy; - } - - - public void setInvitedBy(Href invitedBy) { - this.invitedBy = invitedBy; - } - - - public Invitation invitee(String invitee) { - - this.invitee = invitee; - return this; - } - - /** - * Get invitee - * @return invitee - **/ - @javax.annotation.Nullable - public String getInvitee() { - return invitee; - } - - - public void setInvitee(String invitee) { - this.invitee = invitee; - } - - - public Invitation nonce(String nonce) { - - this.nonce = nonce; - return this; - } - - /** - * Get nonce - * @return nonce - **/ - @javax.annotation.Nullable - public String getNonce() { - return nonce; - } - - - public void setNonce(String nonce) { - this.nonce = nonce; - } - - - public Invitation organization(Href organization) { - - this.organization = organization; - return this; - } - - /** - * Get organization - * @return organization - **/ - @javax.annotation.Nullable - public Href getOrganization() { - return organization; - } - - - public void setOrganization(Href organization) { - this.organization = organization; - } - - - public Invitation projects(List projects) { - - this.projects = projects; - return this; - } - - public Invitation addProjectsItem(Href projectsItem) { - if (this.projects == null) { - this.projects = new ArrayList<>(); - } - this.projects.add(projectsItem); - return this; - } - - /** - * Get projects - * @return projects - **/ - @javax.annotation.Nullable - public List getProjects() { - return projects; - } - - - public void setProjects(List projects) { - this.projects = projects; - } - - - public Invitation roles(List roles) { - - this.roles = roles; - return this; - } - - public Invitation addRolesItem(RolesEnum rolesItem) { - if (this.roles == null) { - this.roles = new ArrayList<>(); - } - this.roles.add(rolesItem); - return this; - } - - /** - * Get roles - * @return roles - **/ - @javax.annotation.Nullable - public List getRoles() { - return roles; - } - - - public void setRoles(List roles) { - this.roles = roles; - } - - - public Invitation updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Invitation instance itself - */ - public Invitation putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Invitation invitation = (Invitation) o; - return Objects.equals(this.createdAt, invitation.createdAt) && - Objects.equals(this.href, invitation.href) && - Objects.equals(this.id, invitation.id) && - Objects.equals(this.invitation, invitation.invitation) && - Objects.equals(this.invitedBy, invitation.invitedBy) && - Objects.equals(this.invitee, invitation.invitee) && - Objects.equals(this.nonce, invitation.nonce) && - Objects.equals(this.organization, invitation.organization) && - Objects.equals(this.projects, invitation.projects) && - Objects.equals(this.roles, invitation.roles) && - Objects.equals(this.updatedAt, invitation.updatedAt)&& - Objects.equals(this.additionalProperties, invitation.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, href, id, invitation, invitedBy, invitee, nonce, organization, projects, roles, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Invitation {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" invitation: ").append(toIndentedString(invitation)).append("\n"); - sb.append(" invitedBy: ").append(toIndentedString(invitedBy)).append("\n"); - sb.append(" invitee: ").append(toIndentedString(invitee)).append("\n"); - sb.append(" nonce: ").append(toIndentedString(nonce)).append("\n"); - sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append(" projects: ").append(toIndentedString(projects)).append("\n"); - sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("invitation"); - openapiFields.add("invited_by"); - openapiFields.add("invitee"); - openapiFields.add("nonce"); - openapiFields.add("organization"); - openapiFields.add("projects"); - openapiFields.add("roles"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Invitation - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Invitation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Invitation is not found in the empty JSON string", Invitation.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `invitation` - if (jsonObj.get("invitation") != null && !jsonObj.get("invitation").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("invitation")); - } - // validate the optional field `invited_by` - if (jsonObj.get("invited_by") != null && !jsonObj.get("invited_by").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("invited_by")); - } - if ((jsonObj.get("invitee") != null && !jsonObj.get("invitee").isJsonNull()) && !jsonObj.get("invitee").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `invitee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invitee").toString())); - } - if ((jsonObj.get("nonce") != null && !jsonObj.get("nonce").isJsonNull()) && !jsonObj.get("nonce").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonce` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonce").toString())); - } - // validate the optional field `organization` - if (jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("organization")); - } - if (jsonObj.get("projects") != null && !jsonObj.get("projects").isJsonNull()) { - JsonArray jsonArrayprojects = jsonObj.getAsJsonArray("projects"); - if (jsonArrayprojects != null) { - // ensure the json data is an array - if (!jsonObj.get("projects").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `projects` to be an array in the JSON string but got `%s`", jsonObj.get("projects").toString())); - } - - // validate the optional field `projects` (array) - for (int i = 0; i < jsonArrayprojects.size(); i++) { - Href.validateJsonElement(jsonArrayprojects.get(i)); - }; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull() && !jsonObj.get("roles").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Invitation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Invitation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Invitation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Invitation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Invitation read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Invitation instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Invitation given an JSON string - * - * @param jsonString JSON string - * @return An instance of Invitation - * @throws IOException if the JSON string is invalid with respect to Invitation - */ - public static Invitation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Invitation.class); - } - - /** - * Convert an instance of Invitation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java deleted file mode 100644 index a40013ba0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationInput.java +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InvitationInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InvitationInput { - public static final String SERIALIZED_NAME_INVITEE = "invitee"; - @SerializedName(SERIALIZED_NAME_INVITEE) - private String invitee; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organization_id"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) - private UUID organizationId; - - public static final String SERIALIZED_NAME_PROJECTS_IDS = "projects_ids"; - @SerializedName(SERIALIZED_NAME_PROJECTS_IDS) - private List projectsIds; - - /** - * Gets or Sets roles - */ - @JsonAdapter(RolesEnum.Adapter.class) - public enum RolesEnum { - ADMIN("admin"), - - BILLING("billing"), - - COLLABORATOR("collaborator"), - - LIMITED_COLLABORATOR("limited_collaborator"); - - private String value; - - RolesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RolesEnum fromValue(String value) { - for (RolesEnum b : RolesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RolesEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RolesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RolesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - RolesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ROLES = "roles"; - @SerializedName(SERIALIZED_NAME_ROLES) - private List roles; - - public InvitationInput() { - } - - public InvitationInput invitee(String invitee) { - - this.invitee = invitee; - return this; - } - - /** - * Get invitee - * @return invitee - **/ - @javax.annotation.Nonnull - public String getInvitee() { - return invitee; - } - - - public void setInvitee(String invitee) { - this.invitee = invitee; - } - - - public InvitationInput message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public InvitationInput organizationId(UUID organizationId) { - - this.organizationId = organizationId; - return this; - } - - /** - * Get organizationId - * @return organizationId - **/ - @javax.annotation.Nullable - public UUID getOrganizationId() { - return organizationId; - } - - - public void setOrganizationId(UUID organizationId) { - this.organizationId = organizationId; - } - - - public InvitationInput projectsIds(List projectsIds) { - - this.projectsIds = projectsIds; - return this; - } - - public InvitationInput addProjectsIdsItem(UUID projectsIdsItem) { - if (this.projectsIds == null) { - this.projectsIds = new ArrayList<>(); - } - this.projectsIds.add(projectsIdsItem); - return this; - } - - /** - * Get projectsIds - * @return projectsIds - **/ - @javax.annotation.Nullable - public List getProjectsIds() { - return projectsIds; - } - - - public void setProjectsIds(List projectsIds) { - this.projectsIds = projectsIds; - } - - - public InvitationInput roles(List roles) { - - this.roles = roles; - return this; - } - - public InvitationInput addRolesItem(RolesEnum rolesItem) { - if (this.roles == null) { - this.roles = new ArrayList<>(); - } - this.roles.add(rolesItem); - return this; - } - - /** - * Get roles - * @return roles - **/ - @javax.annotation.Nullable - public List getRoles() { - return roles; - } - - - public void setRoles(List roles) { - this.roles = roles; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InvitationInput instance itself - */ - public InvitationInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InvitationInput invitationInput = (InvitationInput) o; - return Objects.equals(this.invitee, invitationInput.invitee) && - Objects.equals(this.message, invitationInput.message) && - Objects.equals(this.organizationId, invitationInput.organizationId) && - Objects.equals(this.projectsIds, invitationInput.projectsIds) && - Objects.equals(this.roles, invitationInput.roles)&& - Objects.equals(this.additionalProperties, invitationInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(invitee, message, organizationId, projectsIds, roles, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InvitationInput {\n"); - sb.append(" invitee: ").append(toIndentedString(invitee)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n"); - sb.append(" projectsIds: ").append(toIndentedString(projectsIds)).append("\n"); - sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("invitee"); - openapiFields.add("message"); - openapiFields.add("organization_id"); - openapiFields.add("projects_ids"); - openapiFields.add("roles"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("invitee"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InvitationInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InvitationInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationInput is not found in the empty JSON string", InvitationInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InvitationInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("invitee").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `invitee` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invitee").toString())); - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if ((jsonObj.get("organization_id") != null && !jsonObj.get("organization_id").isJsonNull()) && !jsonObj.get("organization_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_id").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("projects_ids") != null && !jsonObj.get("projects_ids").isJsonNull() && !jsonObj.get("projects_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `projects_ids` to be an array in the JSON string but got `%s`", jsonObj.get("projects_ids").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull() && !jsonObj.get("roles").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InvitationInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InvitationInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InvitationInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InvitationInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InvitationInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InvitationInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InvitationInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvitationInput - * @throws IOException if the JSON string is invalid with respect to InvitationInput - */ - public static InvitationInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InvitationInput.class); - } - - /** - * Convert an instance of InvitationInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java deleted file mode 100644 index d353d9de2..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvitationList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Membership; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InvitationList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InvitationList { - public static final String SERIALIZED_NAME_INVITATIONS = "invitations"; - @SerializedName(SERIALIZED_NAME_INVITATIONS) - private List invitations; - - public InvitationList() { - } - - public InvitationList invitations(List invitations) { - - this.invitations = invitations; - return this; - } - - public InvitationList addInvitationsItem(Membership invitationsItem) { - if (this.invitations == null) { - this.invitations = new ArrayList<>(); - } - this.invitations.add(invitationsItem); - return this; - } - - /** - * Get invitations - * @return invitations - **/ - @javax.annotation.Nullable - public List getInvitations() { - return invitations; - } - - - public void setInvitations(List invitations) { - this.invitations = invitations; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InvitationList instance itself - */ - public InvitationList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InvitationList invitationList = (InvitationList) o; - return Objects.equals(this.invitations, invitationList.invitations)&& - Objects.equals(this.additionalProperties, invitationList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(invitations, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InvitationList {\n"); - sb.append(" invitations: ").append(toIndentedString(invitations)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("invitations"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InvitationList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InvitationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InvitationList is not found in the empty JSON string", InvitationList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("invitations") != null && !jsonObj.get("invitations").isJsonNull()) { - JsonArray jsonArrayinvitations = jsonObj.getAsJsonArray("invitations"); - if (jsonArrayinvitations != null) { - // ensure the json data is an array - if (!jsonObj.get("invitations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `invitations` to be an array in the JSON string but got `%s`", jsonObj.get("invitations").toString())); - } - - // validate the optional field `invitations` (array) - for (int i = 0; i < jsonArrayinvitations.size(); i++) { - Membership.validateJsonElement(jsonArrayinvitations.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InvitationList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InvitationList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InvitationList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InvitationList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InvitationList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InvitationList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InvitationList given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvitationList - * @throws IOException if the JSON string is invalid with respect to InvitationList - */ - public static InvitationList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InvitationList.class); - } - - /** - * Convert an instance of InvitationList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invoice.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invoice.java deleted file mode 100644 index 9a4333b1d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Invoice.java +++ /dev/null @@ -1,693 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.LineItem; -import com.equinix.openapi.metal.v1.model.ProjectIdName; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Invoice - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Invoice { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Float amount; - - public static final String SERIALIZED_NAME_BALANCE = "balance"; - @SerializedName(SERIALIZED_NAME_BALANCE) - private Float balance; - - public static final String SERIALIZED_NAME_CREATED_ON = "created_on"; - @SerializedName(SERIALIZED_NAME_CREATED_ON) - private LocalDate createdOn; - - public static final String SERIALIZED_NAME_CREDIT_AMOUNT = "credit_amount"; - @SerializedName(SERIALIZED_NAME_CREDIT_AMOUNT) - private Float creditAmount; - - public static final String SERIALIZED_NAME_CREDITS_APPLIED = "credits_applied"; - @SerializedName(SERIALIZED_NAME_CREDITS_APPLIED) - private Float creditsApplied; - - public static final String SERIALIZED_NAME_CURRENCY = "currency"; - @SerializedName(SERIALIZED_NAME_CURRENCY) - private String currency; - - public static final String SERIALIZED_NAME_DUE_ON = "due_on"; - @SerializedName(SERIALIZED_NAME_DUE_ON) - private LocalDate dueOn; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_ITEMS = "items"; - @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; - - public static final String SERIALIZED_NAME_NUMBER = "number"; - @SerializedName(SERIALIZED_NAME_NUMBER) - private String number; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private ProjectIdName project; - - public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "reference_number"; - @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) - private String referenceNumber; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_TARGET_DATE = "target_date"; - @SerializedName(SERIALIZED_NAME_TARGET_DATE) - private LocalDate targetDate; - - public Invoice() { - } - - public Invoice amount(Float amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nullable - public Float getAmount() { - return amount; - } - - - public void setAmount(Float amount) { - this.amount = amount; - } - - - public Invoice balance(Float balance) { - - this.balance = balance; - return this; - } - - /** - * Get balance - * @return balance - **/ - @javax.annotation.Nullable - public Float getBalance() { - return balance; - } - - - public void setBalance(Float balance) { - this.balance = balance; - } - - - public Invoice createdOn(LocalDate createdOn) { - - this.createdOn = createdOn; - return this; - } - - /** - * Get createdOn - * @return createdOn - **/ - @javax.annotation.Nullable - public LocalDate getCreatedOn() { - return createdOn; - } - - - public void setCreatedOn(LocalDate createdOn) { - this.createdOn = createdOn; - } - - - public Invoice creditAmount(Float creditAmount) { - - this.creditAmount = creditAmount; - return this; - } - - /** - * Get creditAmount - * @return creditAmount - **/ - @javax.annotation.Nullable - public Float getCreditAmount() { - return creditAmount; - } - - - public void setCreditAmount(Float creditAmount) { - this.creditAmount = creditAmount; - } - - - public Invoice creditsApplied(Float creditsApplied) { - - this.creditsApplied = creditsApplied; - return this; - } - - /** - * Get creditsApplied - * @return creditsApplied - **/ - @javax.annotation.Nullable - public Float getCreditsApplied() { - return creditsApplied; - } - - - public void setCreditsApplied(Float creditsApplied) { - this.creditsApplied = creditsApplied; - } - - - public Invoice currency(String currency) { - - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @javax.annotation.Nullable - public String getCurrency() { - return currency; - } - - - public void setCurrency(String currency) { - this.currency = currency; - } - - - public Invoice dueOn(LocalDate dueOn) { - - this.dueOn = dueOn; - return this; - } - - /** - * Get dueOn - * @return dueOn - **/ - @javax.annotation.Nullable - public LocalDate getDueOn() { - return dueOn; - } - - - public void setDueOn(LocalDate dueOn) { - this.dueOn = dueOn; - } - - - public Invoice id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Invoice items(List items) { - - this.items = items; - return this; - } - - public Invoice addItemsItem(LineItem itemsItem) { - if (this.items == null) { - this.items = new ArrayList<>(); - } - this.items.add(itemsItem); - return this; - } - - /** - * Get items - * @return items - **/ - @javax.annotation.Nullable - public List getItems() { - return items; - } - - - public void setItems(List items) { - this.items = items; - } - - - public Invoice number(String number) { - - this.number = number; - return this; - } - - /** - * Get number - * @return number - **/ - @javax.annotation.Nullable - public String getNumber() { - return number; - } - - - public void setNumber(String number) { - this.number = number; - } - - - public Invoice project(ProjectIdName project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public ProjectIdName getProject() { - return project; - } - - - public void setProject(ProjectIdName project) { - this.project = project; - } - - - public Invoice referenceNumber(String referenceNumber) { - - this.referenceNumber = referenceNumber; - return this; - } - - /** - * Get referenceNumber - * @return referenceNumber - **/ - @javax.annotation.Nullable - public String getReferenceNumber() { - return referenceNumber; - } - - - public void setReferenceNumber(String referenceNumber) { - this.referenceNumber = referenceNumber; - } - - - public Invoice status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public Invoice targetDate(LocalDate targetDate) { - - this.targetDate = targetDate; - return this; - } - - /** - * Get targetDate - * @return targetDate - **/ - @javax.annotation.Nullable - public LocalDate getTargetDate() { - return targetDate; - } - - - public void setTargetDate(LocalDate targetDate) { - this.targetDate = targetDate; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Invoice instance itself - */ - public Invoice putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Invoice invoice = (Invoice) o; - return Objects.equals(this.amount, invoice.amount) && - Objects.equals(this.balance, invoice.balance) && - Objects.equals(this.createdOn, invoice.createdOn) && - Objects.equals(this.creditAmount, invoice.creditAmount) && - Objects.equals(this.creditsApplied, invoice.creditsApplied) && - Objects.equals(this.currency, invoice.currency) && - Objects.equals(this.dueOn, invoice.dueOn) && - Objects.equals(this.id, invoice.id) && - Objects.equals(this.items, invoice.items) && - Objects.equals(this.number, invoice.number) && - Objects.equals(this.project, invoice.project) && - Objects.equals(this.referenceNumber, invoice.referenceNumber) && - Objects.equals(this.status, invoice.status) && - Objects.equals(this.targetDate, invoice.targetDate)&& - Objects.equals(this.additionalProperties, invoice.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(amount, balance, createdOn, creditAmount, creditsApplied, currency, dueOn, id, items, number, project, referenceNumber, status, targetDate, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Invoice {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" balance: ").append(toIndentedString(balance)).append("\n"); - sb.append(" createdOn: ").append(toIndentedString(createdOn)).append("\n"); - sb.append(" creditAmount: ").append(toIndentedString(creditAmount)).append("\n"); - sb.append(" creditsApplied: ").append(toIndentedString(creditsApplied)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" dueOn: ").append(toIndentedString(dueOn)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" items: ").append(toIndentedString(items)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" targetDate: ").append(toIndentedString(targetDate)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("balance"); - openapiFields.add("created_on"); - openapiFields.add("credit_amount"); - openapiFields.add("credits_applied"); - openapiFields.add("currency"); - openapiFields.add("due_on"); - openapiFields.add("id"); - openapiFields.add("items"); - openapiFields.add("number"); - openapiFields.add("project"); - openapiFields.add("reference_number"); - openapiFields.add("status"); - openapiFields.add("target_date"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Invoice - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Invoice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Invoice is not found in the empty JSON string", Invoice.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("currency") != null && !jsonObj.get("currency").isJsonNull()) && !jsonObj.get("currency").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - LineItem.validateJsonElement(jsonArrayitems.get(i)); - }; - } - } - if ((jsonObj.get("number") != null && !jsonObj.get("number").isJsonNull()) && !jsonObj.get("number").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("number").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - ProjectIdName.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("reference_number") != null && !jsonObj.get("reference_number").isJsonNull()) && !jsonObj.get("reference_number").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reference_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference_number").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Invoice.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Invoice' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Invoice.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Invoice value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Invoice read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Invoice instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Invoice given an JSON string - * - * @param jsonString JSON string - * @return An instance of Invoice - * @throws IOException if the JSON string is invalid with respect to Invoice - */ - public static Invoice fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Invoice.class); - } - - /** - * Convert an instance of Invoice to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvoiceList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvoiceList.java deleted file mode 100644 index 83f79b96f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/InvoiceList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Invoice; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * InvoiceList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InvoiceList { - public static final String SERIALIZED_NAME_INVOICES = "invoices"; - @SerializedName(SERIALIZED_NAME_INVOICES) - private List invoices; - - public InvoiceList() { - } - - public InvoiceList invoices(List invoices) { - - this.invoices = invoices; - return this; - } - - public InvoiceList addInvoicesItem(Invoice invoicesItem) { - if (this.invoices == null) { - this.invoices = new ArrayList<>(); - } - this.invoices.add(invoicesItem); - return this; - } - - /** - * Get invoices - * @return invoices - **/ - @javax.annotation.Nullable - public List getInvoices() { - return invoices; - } - - - public void setInvoices(List invoices) { - this.invoices = invoices; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the InvoiceList instance itself - */ - public InvoiceList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - InvoiceList invoiceList = (InvoiceList) o; - return Objects.equals(this.invoices, invoiceList.invoices)&& - Objects.equals(this.additionalProperties, invoiceList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(invoices, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InvoiceList {\n"); - sb.append(" invoices: ").append(toIndentedString(invoices)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("invoices"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to InvoiceList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!InvoiceList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InvoiceList is not found in the empty JSON string", InvoiceList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("invoices") != null && !jsonObj.get("invoices").isJsonNull()) { - JsonArray jsonArrayinvoices = jsonObj.getAsJsonArray("invoices"); - if (jsonArrayinvoices != null) { - // ensure the json data is an array - if (!jsonObj.get("invoices").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `invoices` to be an array in the JSON string but got `%s`", jsonObj.get("invoices").toString())); - } - - // validate the optional field `invoices` (array) - for (int i = 0; i < jsonArrayinvoices.size(); i++) { - Invoice.validateJsonElement(jsonArrayinvoices.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!InvoiceList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InvoiceList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InvoiceList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, InvoiceList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public InvoiceList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - InvoiceList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of InvoiceList given an JSON string - * - * @param jsonString JSON string - * @return An instance of InvoiceList - * @throws IOException if the JSON string is invalid with respect to InvoiceList - */ - public static InvoiceList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InvoiceList.class); - } - - /** - * Convert an instance of InvoiceList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java deleted file mode 100644 index 2cc7f975a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/License.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * License - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class License { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LICENSE_KEY = "license_key"; - @SerializedName(SERIALIZED_NAME_LICENSE_KEY) - private String licenseKey; - - public static final String SERIALIZED_NAME_LICENSEE_PRODUCT = "licensee_product"; - @SerializedName(SERIALIZED_NAME_LICENSEE_PRODUCT) - private Href licenseeProduct; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - private BigDecimal size; - - public License() { - } - - public License description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public License id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public License licenseKey(String licenseKey) { - - this.licenseKey = licenseKey; - return this; - } - - /** - * Get licenseKey - * @return licenseKey - **/ - @javax.annotation.Nullable - public String getLicenseKey() { - return licenseKey; - } - - - public void setLicenseKey(String licenseKey) { - this.licenseKey = licenseKey; - } - - - public License licenseeProduct(Href licenseeProduct) { - - this.licenseeProduct = licenseeProduct; - return this; - } - - /** - * Get licenseeProduct - * @return licenseeProduct - **/ - @javax.annotation.Nullable - public Href getLicenseeProduct() { - return licenseeProduct; - } - - - public void setLicenseeProduct(Href licenseeProduct) { - this.licenseeProduct = licenseeProduct; - } - - - public License project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - - public License size(BigDecimal size) { - - this.size = size; - return this; - } - - /** - * Get size - * @return size - **/ - @javax.annotation.Nullable - public BigDecimal getSize() { - return size; - } - - - public void setSize(BigDecimal size) { - this.size = size; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the License instance itself - */ - public License putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - License license = (License) o; - return Objects.equals(this.description, license.description) && - Objects.equals(this.id, license.id) && - Objects.equals(this.licenseKey, license.licenseKey) && - Objects.equals(this.licenseeProduct, license.licenseeProduct) && - Objects.equals(this.project, license.project) && - Objects.equals(this.size, license.size)&& - Objects.equals(this.additionalProperties, license.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, id, licenseKey, licenseeProduct, project, size, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class License {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" licenseKey: ").append(toIndentedString(licenseKey)).append("\n"); - sb.append(" licenseeProduct: ").append(toIndentedString(licenseeProduct)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("license_key"); - openapiFields.add("licensee_product"); - openapiFields.add("project"); - openapiFields.add("size"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to License - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!License.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in License is not found in the empty JSON string", License.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("license_key") != null && !jsonObj.get("license_key").isJsonNull()) && !jsonObj.get("license_key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `license_key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("license_key").toString())); - } - // validate the optional field `licensee_product` - if (jsonObj.get("licensee_product") != null && !jsonObj.get("licensee_product").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("licensee_product")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!License.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'License' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(License.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, License value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public License read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - License instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of License given an JSON string - * - * @param jsonString JSON string - * @return An instance of License - * @throws IOException if the JSON string is invalid with respect to License - */ - public static License fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, License.class); - } - - /** - * Convert an instance of License to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java deleted file mode 100644 index 55c56beb3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseCreateInput.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * LicenseCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LicenseCreateInput { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_LICENSEE_PRODUCT_ID = "licensee_product_id"; - @SerializedName(SERIALIZED_NAME_LICENSEE_PRODUCT_ID) - private String licenseeProductId; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - private BigDecimal size; - - public LicenseCreateInput() { - } - - public LicenseCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public LicenseCreateInput licenseeProductId(String licenseeProductId) { - - this.licenseeProductId = licenseeProductId; - return this; - } - - /** - * Get licenseeProductId - * @return licenseeProductId - **/ - @javax.annotation.Nullable - public String getLicenseeProductId() { - return licenseeProductId; - } - - - public void setLicenseeProductId(String licenseeProductId) { - this.licenseeProductId = licenseeProductId; - } - - - public LicenseCreateInput size(BigDecimal size) { - - this.size = size; - return this; - } - - /** - * Get size - * @return size - **/ - @javax.annotation.Nullable - public BigDecimal getSize() { - return size; - } - - - public void setSize(BigDecimal size) { - this.size = size; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the LicenseCreateInput instance itself - */ - public LicenseCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LicenseCreateInput licenseCreateInput = (LicenseCreateInput) o; - return Objects.equals(this.description, licenseCreateInput.description) && - Objects.equals(this.licenseeProductId, licenseCreateInput.licenseeProductId) && - Objects.equals(this.size, licenseCreateInput.size)&& - Objects.equals(this.additionalProperties, licenseCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, licenseeProductId, size, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LicenseCreateInput {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" licenseeProductId: ").append(toIndentedString(licenseeProductId)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("licensee_product_id"); - openapiFields.add("size"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LicenseCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LicenseCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LicenseCreateInput is not found in the empty JSON string", LicenseCreateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("licensee_product_id") != null && !jsonObj.get("licensee_product_id").isJsonNull()) && !jsonObj.get("licensee_product_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `licensee_product_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("licensee_product_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LicenseCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LicenseCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LicenseCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LicenseCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public LicenseCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - LicenseCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LicenseCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of LicenseCreateInput - * @throws IOException if the JSON string is invalid with respect to LicenseCreateInput - */ - public static LicenseCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LicenseCreateInput.class); - } - - /** - * Convert an instance of LicenseCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java deleted file mode 100644 index 41ea28683..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.License; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * LicenseList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LicenseList { - public static final String SERIALIZED_NAME_LICENSES = "licenses"; - @SerializedName(SERIALIZED_NAME_LICENSES) - private List licenses; - - public LicenseList() { - } - - public LicenseList licenses(List licenses) { - - this.licenses = licenses; - return this; - } - - public LicenseList addLicensesItem(License licensesItem) { - if (this.licenses == null) { - this.licenses = new ArrayList<>(); - } - this.licenses.add(licensesItem); - return this; - } - - /** - * Get licenses - * @return licenses - **/ - @javax.annotation.Nullable - public List getLicenses() { - return licenses; - } - - - public void setLicenses(List licenses) { - this.licenses = licenses; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the LicenseList instance itself - */ - public LicenseList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LicenseList licenseList = (LicenseList) o; - return Objects.equals(this.licenses, licenseList.licenses)&& - Objects.equals(this.additionalProperties, licenseList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(licenses, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LicenseList {\n"); - sb.append(" licenses: ").append(toIndentedString(licenses)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("licenses"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LicenseList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LicenseList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LicenseList is not found in the empty JSON string", LicenseList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("licenses") != null && !jsonObj.get("licenses").isJsonNull()) { - JsonArray jsonArraylicenses = jsonObj.getAsJsonArray("licenses"); - if (jsonArraylicenses != null) { - // ensure the json data is an array - if (!jsonObj.get("licenses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `licenses` to be an array in the JSON string but got `%s`", jsonObj.get("licenses").toString())); - } - - // validate the optional field `licenses` (array) - for (int i = 0; i < jsonArraylicenses.size(); i++) { - License.validateJsonElement(jsonArraylicenses.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LicenseList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LicenseList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LicenseList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LicenseList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public LicenseList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - LicenseList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LicenseList given an JSON string - * - * @param jsonString JSON string - * @return An instance of LicenseList - * @throws IOException if the JSON string is invalid with respect to LicenseList - */ - public static LicenseList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LicenseList.class); - } - - /** - * Convert an instance of LicenseList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java deleted file mode 100644 index 49fd53508..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInput.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * LicenseUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LicenseUpdateInput { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - private BigDecimal size; - - public LicenseUpdateInput() { - } - - public LicenseUpdateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public LicenseUpdateInput size(BigDecimal size) { - - this.size = size; - return this; - } - - /** - * Get size - * @return size - **/ - @javax.annotation.Nullable - public BigDecimal getSize() { - return size; - } - - - public void setSize(BigDecimal size) { - this.size = size; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the LicenseUpdateInput instance itself - */ - public LicenseUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LicenseUpdateInput licenseUpdateInput = (LicenseUpdateInput) o; - return Objects.equals(this.description, licenseUpdateInput.description) && - Objects.equals(this.size, licenseUpdateInput.size)&& - Objects.equals(this.additionalProperties, licenseUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, size, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LicenseUpdateInput {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("size"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LicenseUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LicenseUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LicenseUpdateInput is not found in the empty JSON string", LicenseUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LicenseUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LicenseUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LicenseUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LicenseUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public LicenseUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - LicenseUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LicenseUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of LicenseUpdateInput - * @throws IOException if the JSON string is invalid with respect to LicenseUpdateInput - */ - public static LicenseUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LicenseUpdateInput.class); - } - - /** - * Convert an instance of LicenseUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LineItem.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LineItem.java deleted file mode 100644 index a39921fdf..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/LineItem.java +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Plan; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * LineItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class LineItem { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Float amount; - - public static final String SERIALIZED_NAME_CURRENCY = "currency"; - @SerializedName(SERIALIZED_NAME_CURRENCY) - private String currency; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DETAILS = "details"; - @SerializedName(SERIALIZED_NAME_DETAILS) - private String details; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private Plan plan; - - public static final String SERIALIZED_NAME_UNIT = "unit"; - @SerializedName(SERIALIZED_NAME_UNIT) - private String unit; - - public static final String SERIALIZED_NAME_UNIT_PRICE = "unit_price"; - @SerializedName(SERIALIZED_NAME_UNIT_PRICE) - private Float unitPrice; - - public LineItem() { - } - - public LineItem amount(Float amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nullable - public Float getAmount() { - return amount; - } - - - public void setAmount(Float amount) { - this.amount = amount; - } - - - public LineItem currency(String currency) { - - this.currency = currency; - return this; - } - - /** - * Get currency - * @return currency - **/ - @javax.annotation.Nullable - public String getCurrency() { - return currency; - } - - - public void setCurrency(String currency) { - this.currency = currency; - } - - - public LineItem description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public LineItem details(String details) { - - this.details = details; - return this; - } - - /** - * Get details - * @return details - **/ - @javax.annotation.Nullable - public String getDetails() { - return details; - } - - - public void setDetails(String details) { - this.details = details; - } - - - public LineItem plan(Plan plan) { - - this.plan = plan; - return this; - } - - /** - * Get plan - * @return plan - **/ - @javax.annotation.Nullable - public Plan getPlan() { - return plan; - } - - - public void setPlan(Plan plan) { - this.plan = plan; - } - - - public LineItem unit(String unit) { - - this.unit = unit; - return this; - } - - /** - * Get unit - * @return unit - **/ - @javax.annotation.Nullable - public String getUnit() { - return unit; - } - - - public void setUnit(String unit) { - this.unit = unit; - } - - - public LineItem unitPrice(Float unitPrice) { - - this.unitPrice = unitPrice; - return this; - } - - /** - * Get unitPrice - * @return unitPrice - **/ - @javax.annotation.Nullable - public Float getUnitPrice() { - return unitPrice; - } - - - public void setUnitPrice(Float unitPrice) { - this.unitPrice = unitPrice; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the LineItem instance itself - */ - public LineItem putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LineItem lineItem = (LineItem) o; - return Objects.equals(this.amount, lineItem.amount) && - Objects.equals(this.currency, lineItem.currency) && - Objects.equals(this.description, lineItem.description) && - Objects.equals(this.details, lineItem.details) && - Objects.equals(this.plan, lineItem.plan) && - Objects.equals(this.unit, lineItem.unit) && - Objects.equals(this.unitPrice, lineItem.unitPrice)&& - Objects.equals(this.additionalProperties, lineItem.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(amount, currency, description, details, plan, unit, unitPrice, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LineItem {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); - sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("currency"); - openapiFields.add("description"); - openapiFields.add("details"); - openapiFields.add("plan"); - openapiFields.add("unit"); - openapiFields.add("unit_price"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LineItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LineItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LineItem is not found in the empty JSON string", LineItem.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("currency") != null && !jsonObj.get("currency").isJsonNull()) && !jsonObj.get("currency").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); - } - // validate the optional field `plan` - if (jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) { - Plan.validateJsonElement(jsonObj.get("plan")); - } - if ((jsonObj.get("unit") != null && !jsonObj.get("unit").isJsonNull()) && !jsonObj.get("unit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unit").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LineItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LineItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LineItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LineItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public LineItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - LineItem instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LineItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of LineItem - * @throws IOException if the JSON string is invalid with respect to LineItem - */ - public static LineItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LineItem.class); - } - - /** - * Convert an instance of LineItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java deleted file mode 100644 index 307cb7158..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Membership.java +++ /dev/null @@ -1,481 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Membership - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Membership { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public static final String SERIALIZED_NAME_ROLES = "roles"; - @SerializedName(SERIALIZED_NAME_ROLES) - private List roles; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_USER = "user"; - @SerializedName(SERIALIZED_NAME_USER) - private Href user; - - public Membership() { - } - - public Membership createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Membership href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public Membership id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Membership project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - - public Membership roles(List roles) { - - this.roles = roles; - return this; - } - - public Membership addRolesItem(String rolesItem) { - if (this.roles == null) { - this.roles = new ArrayList<>(); - } - this.roles.add(rolesItem); - return this; - } - - /** - * Get roles - * @return roles - **/ - @javax.annotation.Nullable - public List getRoles() { - return roles; - } - - - public void setRoles(List roles) { - this.roles = roles; - } - - - public Membership updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Membership user(Href user) { - - this.user = user; - return this; - } - - /** - * Get user - * @return user - **/ - @javax.annotation.Nullable - public Href getUser() { - return user; - } - - - public void setUser(Href user) { - this.user = user; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Membership instance itself - */ - public Membership putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Membership membership = (Membership) o; - return Objects.equals(this.createdAt, membership.createdAt) && - Objects.equals(this.href, membership.href) && - Objects.equals(this.id, membership.id) && - Objects.equals(this.project, membership.project) && - Objects.equals(this.roles, membership.roles) && - Objects.equals(this.updatedAt, membership.updatedAt) && - Objects.equals(this.user, membership.user)&& - Objects.equals(this.additionalProperties, membership.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, href, id, project, roles, updatedAt, user, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Membership {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("project"); - openapiFields.add("roles"); - openapiFields.add("updated_at"); - openapiFields.add("user"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Membership - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Membership.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Membership is not found in the empty JSON string", Membership.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("roles") != null && !jsonObj.get("roles").isJsonNull() && !jsonObj.get("roles").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `roles` to be an array in the JSON string but got `%s`", jsonObj.get("roles").toString())); - } - // validate the optional field `user` - if (jsonObj.get("user") != null && !jsonObj.get("user").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("user")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Membership.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Membership' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Membership.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Membership value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Membership read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Membership instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Membership given an JSON string - * - * @param jsonString JSON string - * @return An instance of Membership - * @throws IOException if the JSON string is invalid with respect to Membership - */ - public static Membership fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Membership.class); - } - - /** - * Convert an instance of Membership to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java deleted file mode 100644 index c78d89d9c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipInput.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MembershipInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MembershipInput { - public static final String SERIALIZED_NAME_ROLE = "role"; - @SerializedName(SERIALIZED_NAME_ROLE) - private List role; - - public MembershipInput() { - } - - public MembershipInput role(List role) { - - this.role = role; - return this; - } - - public MembershipInput addRoleItem(String roleItem) { - if (this.role == null) { - this.role = new ArrayList<>(); - } - this.role.add(roleItem); - return this; - } - - /** - * Get role - * @return role - **/ - @javax.annotation.Nullable - public List getRole() { - return role; - } - - - public void setRole(List role) { - this.role = role; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MembershipInput instance itself - */ - public MembershipInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MembershipInput membershipInput = (MembershipInput) o; - return Objects.equals(this.role, membershipInput.role)&& - Objects.equals(this.additionalProperties, membershipInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(role, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MembershipInput {\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("role"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MembershipInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MembershipInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MembershipInput is not found in the empty JSON string", MembershipInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("role") != null && !jsonObj.get("role").isJsonNull() && !jsonObj.get("role").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `role` to be an array in the JSON string but got `%s`", jsonObj.get("role").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MembershipInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MembershipInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MembershipInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MembershipInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MembershipInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MembershipInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MembershipInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of MembershipInput - * @throws IOException if the JSON string is invalid with respect to MembershipInput - */ - public static MembershipInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MembershipInput.class); - } - - /** - * Convert an instance of MembershipInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java deleted file mode 100644 index 493c27fdd..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MembershipList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Membership; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MembershipList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MembershipList { - public static final String SERIALIZED_NAME_MEMBERSHIPS = "memberships"; - @SerializedName(SERIALIZED_NAME_MEMBERSHIPS) - private List memberships; - - public MembershipList() { - } - - public MembershipList memberships(List memberships) { - - this.memberships = memberships; - return this; - } - - public MembershipList addMembershipsItem(Membership membershipsItem) { - if (this.memberships == null) { - this.memberships = new ArrayList<>(); - } - this.memberships.add(membershipsItem); - return this; - } - - /** - * Get memberships - * @return memberships - **/ - @javax.annotation.Nullable - public List getMemberships() { - return memberships; - } - - - public void setMemberships(List memberships) { - this.memberships = memberships; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MembershipList instance itself - */ - public MembershipList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MembershipList membershipList = (MembershipList) o; - return Objects.equals(this.memberships, membershipList.memberships)&& - Objects.equals(this.additionalProperties, membershipList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(memberships, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MembershipList {\n"); - sb.append(" memberships: ").append(toIndentedString(memberships)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("memberships"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MembershipList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MembershipList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MembershipList is not found in the empty JSON string", MembershipList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("memberships") != null && !jsonObj.get("memberships").isJsonNull()) { - JsonArray jsonArraymemberships = jsonObj.getAsJsonArray("memberships"); - if (jsonArraymemberships != null) { - // ensure the json data is an array - if (!jsonObj.get("memberships").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `memberships` to be an array in the JSON string but got `%s`", jsonObj.get("memberships").toString())); - } - - // validate the optional field `memberships` (array) - for (int i = 0; i < jsonArraymemberships.size(); i++) { - Membership.validateJsonElement(jsonArraymemberships.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MembershipList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MembershipList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MembershipList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MembershipList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MembershipList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MembershipList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MembershipList given an JSON string - * - * @param jsonString JSON string - * @return An instance of MembershipList - * @throws IOException if the JSON string is invalid with respect to MembershipList - */ - public static MembershipList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MembershipList.class); - } - - /** - * Convert an instance of MembershipList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java deleted file mode 100644 index 001630b83..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Meta.java +++ /dev/null @@ -1,499 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Meta - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Meta { - public static final String SERIALIZED_NAME_FIRST = "first"; - @SerializedName(SERIALIZED_NAME_FIRST) - private Href first; - - public static final String SERIALIZED_NAME_LAST = "last"; - @SerializedName(SERIALIZED_NAME_LAST) - private Href last; - - public static final String SERIALIZED_NAME_NEXT = "next"; - @SerializedName(SERIALIZED_NAME_NEXT) - private Href next; - - public static final String SERIALIZED_NAME_PREVIOUS = "previous"; - @SerializedName(SERIALIZED_NAME_PREVIOUS) - private Href previous; - - public static final String SERIALIZED_NAME_SELF = "self"; - @SerializedName(SERIALIZED_NAME_SELF) - private Href self; - - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - private Integer total; - - public static final String SERIALIZED_NAME_CURRENT_PAGE = "current_page"; - @SerializedName(SERIALIZED_NAME_CURRENT_PAGE) - private Integer currentPage; - - public static final String SERIALIZED_NAME_LAST_PAGE = "last_page"; - @SerializedName(SERIALIZED_NAME_LAST_PAGE) - private Integer lastPage; - - public Meta() { - } - - public Meta first(Href first) { - - this.first = first; - return this; - } - - /** - * Get first - * @return first - **/ - @javax.annotation.Nullable - public Href getFirst() { - return first; - } - - - public void setFirst(Href first) { - this.first = first; - } - - - public Meta last(Href last) { - - this.last = last; - return this; - } - - /** - * Get last - * @return last - **/ - @javax.annotation.Nullable - public Href getLast() { - return last; - } - - - public void setLast(Href last) { - this.last = last; - } - - - public Meta next(Href next) { - - this.next = next; - return this; - } - - /** - * Get next - * @return next - **/ - @javax.annotation.Nullable - public Href getNext() { - return next; - } - - - public void setNext(Href next) { - this.next = next; - } - - - public Meta previous(Href previous) { - - this.previous = previous; - return this; - } - - /** - * Get previous - * @return previous - **/ - @javax.annotation.Nullable - public Href getPrevious() { - return previous; - } - - - public void setPrevious(Href previous) { - this.previous = previous; - } - - - public Meta self(Href self) { - - this.self = self; - return this; - } - - /** - * Get self - * @return self - **/ - @javax.annotation.Nullable - public Href getSelf() { - return self; - } - - - public void setSelf(Href self) { - this.self = self; - } - - - public Meta total(Integer total) { - - this.total = total; - return this; - } - - /** - * Get total - * @return total - **/ - @javax.annotation.Nullable - public Integer getTotal() { - return total; - } - - - public void setTotal(Integer total) { - this.total = total; - } - - - public Meta currentPage(Integer currentPage) { - - this.currentPage = currentPage; - return this; - } - - /** - * Get currentPage - * @return currentPage - **/ - @javax.annotation.Nullable - public Integer getCurrentPage() { - return currentPage; - } - - - public void setCurrentPage(Integer currentPage) { - this.currentPage = currentPage; - } - - - public Meta lastPage(Integer lastPage) { - - this.lastPage = lastPage; - return this; - } - - /** - * Get lastPage - * @return lastPage - **/ - @javax.annotation.Nullable - public Integer getLastPage() { - return lastPage; - } - - - public void setLastPage(Integer lastPage) { - this.lastPage = lastPage; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Meta instance itself - */ - public Meta putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Meta meta = (Meta) o; - return Objects.equals(this.first, meta.first) && - Objects.equals(this.last, meta.last) && - Objects.equals(this.next, meta.next) && - Objects.equals(this.previous, meta.previous) && - Objects.equals(this.self, meta.self) && - Objects.equals(this.total, meta.total) && - Objects.equals(this.currentPage, meta.currentPage) && - Objects.equals(this.lastPage, meta.lastPage)&& - Objects.equals(this.additionalProperties, meta.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(first, last, next, previous, self, total, currentPage, lastPage, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Meta {\n"); - sb.append(" first: ").append(toIndentedString(first)).append("\n"); - sb.append(" last: ").append(toIndentedString(last)).append("\n"); - sb.append(" next: ").append(toIndentedString(next)).append("\n"); - sb.append(" previous: ").append(toIndentedString(previous)).append("\n"); - sb.append(" self: ").append(toIndentedString(self)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); - sb.append(" lastPage: ").append(toIndentedString(lastPage)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("first"); - openapiFields.add("last"); - openapiFields.add("next"); - openapiFields.add("previous"); - openapiFields.add("self"); - openapiFields.add("total"); - openapiFields.add("current_page"); - openapiFields.add("last_page"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Meta - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Meta.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Meta is not found in the empty JSON string", Meta.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `first` - if (jsonObj.get("first") != null && !jsonObj.get("first").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("first")); - } - // validate the optional field `last` - if (jsonObj.get("last") != null && !jsonObj.get("last").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("last")); - } - // validate the optional field `next` - if (jsonObj.get("next") != null && !jsonObj.get("next").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("next")); - } - // validate the optional field `previous` - if (jsonObj.get("previous") != null && !jsonObj.get("previous").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("previous")); - } - // validate the optional field `self` - if (jsonObj.get("self") != null && !jsonObj.get("self").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("self")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Meta.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Meta' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Meta.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Meta value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Meta read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Meta instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Meta given an JSON string - * - * @param jsonString JSON string - * @return An instance of Meta - * @throws IOException if the JSON string is invalid with respect to Meta - */ - public static Meta fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Meta.class); - } - - /** - * Convert an instance of Meta to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metadata.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metadata.java deleted file mode 100644 index 9a1bc5ced..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metadata.java +++ /dev/null @@ -1,923 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.MetadataNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Metadata - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Metadata { - public static final String SERIALIZED_NAME_PROPERTY_CLASS = "class"; - @SerializedName(SERIALIZED_NAME_PROPERTY_CLASS) - private String propertyClass; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Map customdata = new HashMap<>(); - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private String facility; - - public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; - @SerializedName(SERIALIZED_NAME_HOSTNAME) - private String hostname; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_IQN = "iqn"; - @SerializedName(SERIALIZED_NAME_IQN) - private String iqn; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private MetadataNetwork network; - - public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operating_system"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) - private Object operatingSystem; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_PRIVATE_SUBNETS = "private_subnets"; - @SerializedName(SERIALIZED_NAME_PRIVATE_SUBNETS) - private List privateSubnets; - - public static final String SERIALIZED_NAME_RESERVED = "reserved"; - @SerializedName(SERIALIZED_NAME_RESERVED) - private Boolean reserved; - - public static final String SERIALIZED_NAME_SPECS = "specs"; - @SerializedName(SERIALIZED_NAME_SPECS) - private Object specs; - - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - public static final String SERIALIZED_NAME_SWITCH_SHORT_ID = "switch_short_id"; - @SerializedName(SERIALIZED_NAME_SWITCH_SHORT_ID) - private String switchShortId; - - /** - * The current state the instance is in. * When an instance is initially created it will be in the `queued` state until it is picked up by the provisioner. * Once provisioning has begun on the instance it's state will move to `provisioning`. * When an instance is deleted, it will move to `deprovisioning` state until the deprovision is completed and the instance state moves to `deleted`. * If an instance fails to provision or deprovision it will move to `failed` state. * Once an instance has completed provisioning it will move to `active` state. * If an instance is currently powering off or powering on it will move to `powering_off` or `powering_on` states respectively. * When the instance is powered off completely it will move to the `inactive` state. * When an instance is powered on completely it will move to the `active` state. * Using the reinstall action to install a new OS on the instance will cause the instance state to change to `reinstalling`. * When the reinstall action is complete the instance will move to `active` state. - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - QUEUED("queued"), - - PROVISIONING("provisioning"), - - DEPROVISIONING("deprovisioning"), - - REINSTALLING("reinstalling"), - - ACTIVE("active"), - - INACTIVE("inactive"), - - FAILED("failed"), - - POWERING_ON("powering_on"), - - POWERING_OFF("powering_off"), - - DELETED("deleted"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_VOLUMES = "volumes"; - @SerializedName(SERIALIZED_NAME_VOLUMES) - private List volumes; - - public Metadata() { - } - - public Metadata propertyClass(String propertyClass) { - - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @javax.annotation.Nullable - public String getPropertyClass() { - return propertyClass; - } - - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - public Metadata customdata(Map customdata) { - - this.customdata = customdata; - return this; - } - - public Metadata putCustomdataItem(String key, Object customdataItem) { - if (this.customdata == null) { - this.customdata = new HashMap<>(); - } - this.customdata.put(key, customdataItem); - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Map getCustomdata() { - return customdata; - } - - - public void setCustomdata(Map customdata) { - this.customdata = customdata; - } - - - public Metadata facility(String facility) { - - this.facility = facility; - return this; - } - - /** - * The facility code of the instance - * @return facility - **/ - @javax.annotation.Nullable - public String getFacility() { - return facility; - } - - - public void setFacility(String facility) { - this.facility = facility; - } - - - public Metadata hostname(String hostname) { - - this.hostname = hostname; - return this; - } - - /** - * Get hostname - * @return hostname - **/ - @javax.annotation.Nullable - public String getHostname() { - return hostname; - } - - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - - public Metadata id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Metadata iqn(String iqn) { - - this.iqn = iqn; - return this; - } - - /** - * Get iqn - * @return iqn - **/ - @javax.annotation.Nullable - public String getIqn() { - return iqn; - } - - - public void setIqn(String iqn) { - this.iqn = iqn; - } - - - public Metadata metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * The metro code of the instance - * @return metro - **/ - @javax.annotation.Nullable - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public Metadata network(MetadataNetwork network) { - - this.network = network; - return this; - } - - /** - * Get network - * @return network - **/ - @javax.annotation.Nullable - public MetadataNetwork getNetwork() { - return network; - } - - - public void setNetwork(MetadataNetwork network) { - this.network = network; - } - - - public Metadata operatingSystem(Object operatingSystem) { - - this.operatingSystem = operatingSystem; - return this; - } - - /** - * Get operatingSystem - * @return operatingSystem - **/ - @javax.annotation.Nullable - public Object getOperatingSystem() { - return operatingSystem; - } - - - public void setOperatingSystem(Object operatingSystem) { - this.operatingSystem = operatingSystem; - } - - - public Metadata plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * The plan slug of the instance - * @return plan - **/ - @javax.annotation.Nullable - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public Metadata privateSubnets(List privateSubnets) { - - this.privateSubnets = privateSubnets; - return this; - } - - public Metadata addPrivateSubnetsItem(String privateSubnetsItem) { - if (this.privateSubnets == null) { - this.privateSubnets = new ArrayList<>(); - } - this.privateSubnets.add(privateSubnetsItem); - return this; - } - - /** - * An array of the private subnets - * @return privateSubnets - **/ - @javax.annotation.Nullable - public List getPrivateSubnets() { - return privateSubnets; - } - - - public void setPrivateSubnets(List privateSubnets) { - this.privateSubnets = privateSubnets; - } - - - public Metadata reserved(Boolean reserved) { - - this.reserved = reserved; - return this; - } - - /** - * Get reserved - * @return reserved - **/ - @javax.annotation.Nullable - public Boolean getReserved() { - return reserved; - } - - - public void setReserved(Boolean reserved) { - this.reserved = reserved; - } - - - public Metadata specs(Object specs) { - - this.specs = specs; - return this; - } - - /** - * The specs of the plan version of the instance - * @return specs - **/ - @javax.annotation.Nullable - public Object getSpecs() { - return specs; - } - - - public void setSpecs(Object specs) { - this.specs = specs; - } - - - public Metadata sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public Metadata addSshKeysItem(String sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * Get sshKeys - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - - public Metadata switchShortId(String switchShortId) { - - this.switchShortId = switchShortId; - return this; - } - - /** - * Get switchShortId - * @return switchShortId - **/ - @javax.annotation.Nullable - public String getSwitchShortId() { - return switchShortId; - } - - - public void setSwitchShortId(String switchShortId) { - this.switchShortId = switchShortId; - } - - - public Metadata state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * The current state the instance is in. * When an instance is initially created it will be in the `queued` state until it is picked up by the provisioner. * Once provisioning has begun on the instance it's state will move to `provisioning`. * When an instance is deleted, it will move to `deprovisioning` state until the deprovision is completed and the instance state moves to `deleted`. * If an instance fails to provision or deprovision it will move to `failed` state. * Once an instance has completed provisioning it will move to `active` state. * If an instance is currently powering off or powering on it will move to `powering_off` or `powering_on` states respectively. * When the instance is powered off completely it will move to the `inactive` state. * When an instance is powered on completely it will move to the `active` state. * Using the reinstall action to install a new OS on the instance will cause the instance state to change to `reinstalling`. * When the reinstall action is complete the instance will move to `active` state. - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public Metadata tags(List tags) { - - this.tags = tags; - return this; - } - - public Metadata addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public Metadata volumes(List volumes) { - - this.volumes = volumes; - return this; - } - - public Metadata addVolumesItem(String volumesItem) { - if (this.volumes == null) { - this.volumes = new ArrayList<>(); - } - this.volumes.add(volumesItem); - return this; - } - - /** - * Get volumes - * @return volumes - **/ - @javax.annotation.Nullable - public List getVolumes() { - return volumes; - } - - - public void setVolumes(List volumes) { - this.volumes = volumes; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Metadata instance itself - */ - public Metadata putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Metadata metadata = (Metadata) o; - return Objects.equals(this.propertyClass, metadata.propertyClass) && - Objects.equals(this.customdata, metadata.customdata) && - Objects.equals(this.facility, metadata.facility) && - Objects.equals(this.hostname, metadata.hostname) && - Objects.equals(this.id, metadata.id) && - Objects.equals(this.iqn, metadata.iqn) && - Objects.equals(this.metro, metadata.metro) && - Objects.equals(this.network, metadata.network) && - Objects.equals(this.operatingSystem, metadata.operatingSystem) && - Objects.equals(this.plan, metadata.plan) && - Objects.equals(this.privateSubnets, metadata.privateSubnets) && - Objects.equals(this.reserved, metadata.reserved) && - Objects.equals(this.specs, metadata.specs) && - Objects.equals(this.sshKeys, metadata.sshKeys) && - Objects.equals(this.switchShortId, metadata.switchShortId) && - Objects.equals(this.state, metadata.state) && - Objects.equals(this.tags, metadata.tags) && - Objects.equals(this.volumes, metadata.volumes)&& - Objects.equals(this.additionalProperties, metadata.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass, customdata, facility, hostname, id, iqn, metro, network, operatingSystem, plan, privateSubnets, reserved, specs, sshKeys, switchShortId, state, tags, volumes, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Metadata {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" iqn: ").append(toIndentedString(iqn)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" privateSubnets: ").append(toIndentedString(privateSubnets)).append("\n"); - sb.append(" reserved: ").append(toIndentedString(reserved)).append("\n"); - sb.append(" specs: ").append(toIndentedString(specs)).append("\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" switchShortId: ").append(toIndentedString(switchShortId)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("class"); - openapiFields.add("customdata"); - openapiFields.add("facility"); - openapiFields.add("hostname"); - openapiFields.add("id"); - openapiFields.add("iqn"); - openapiFields.add("metro"); - openapiFields.add("network"); - openapiFields.add("operating_system"); - openapiFields.add("plan"); - openapiFields.add("private_subnets"); - openapiFields.add("reserved"); - openapiFields.add("specs"); - openapiFields.add("ssh_keys"); - openapiFields.add("switch_short_id"); - openapiFields.add("state"); - openapiFields.add("tags"); - openapiFields.add("volumes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Metadata - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Metadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Metadata is not found in the empty JSON string", Metadata.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("class") != null && !jsonObj.get("class").isJsonNull()) && !jsonObj.get("class").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("class").toString())); - } - if ((jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) && !jsonObj.get("facility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("iqn") != null && !jsonObj.get("iqn").isJsonNull()) && !jsonObj.get("iqn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `iqn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iqn").toString())); - } - if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - // validate the optional field `network` - if (jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) { - MetadataNetwork.validateJsonElement(jsonObj.get("network")); - } - if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("private_subnets") != null && !jsonObj.get("private_subnets").isJsonNull() && !jsonObj.get("private_subnets").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `private_subnets` to be an array in the JSON string but got `%s`", jsonObj.get("private_subnets").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull() && !jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - if ((jsonObj.get("switch_short_id") != null && !jsonObj.get("switch_short_id").isJsonNull()) && !jsonObj.get("switch_short_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `switch_short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("switch_short_id").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("volumes") != null && !jsonObj.get("volumes").isJsonNull() && !jsonObj.get("volumes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `volumes` to be an array in the JSON string but got `%s`", jsonObj.get("volumes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Metadata.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Metadata' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Metadata.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Metadata value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Metadata read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Metadata instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Metadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of Metadata - * @throws IOException if the JSON string is invalid with respect to Metadata - */ - public static Metadata fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Metadata.class); - } - - /** - * Convert an instance of Metadata to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetwork.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetwork.java deleted file mode 100644 index 1b2f89e52..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetwork.java +++ /dev/null @@ -1,369 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.MetadataNetworkNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetadataNetwork - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetadataNetwork { - public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; - @SerializedName(SERIALIZED_NAME_ADDRESSES) - private List addresses; - - public static final String SERIALIZED_NAME_INTERFACES = "interfaces"; - @SerializedName(SERIALIZED_NAME_INTERFACES) - private List interfaces; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private MetadataNetworkNetwork network; - - public MetadataNetwork() { - } - - public MetadataNetwork addresses(List addresses) { - - this.addresses = addresses; - return this; - } - - public MetadataNetwork addAddressesItem(String addressesItem) { - if (this.addresses == null) { - this.addresses = new ArrayList<>(); - } - this.addresses.add(addressesItem); - return this; - } - - /** - * Get addresses - * @return addresses - **/ - @javax.annotation.Nullable - public List getAddresses() { - return addresses; - } - - - public void setAddresses(List addresses) { - this.addresses = addresses; - } - - - public MetadataNetwork interfaces(List interfaces) { - - this.interfaces = interfaces; - return this; - } - - public MetadataNetwork addInterfacesItem(Object interfacesItem) { - if (this.interfaces == null) { - this.interfaces = new ArrayList<>(); - } - this.interfaces.add(interfacesItem); - return this; - } - - /** - * Get interfaces - * @return interfaces - **/ - @javax.annotation.Nullable - public List getInterfaces() { - return interfaces; - } - - - public void setInterfaces(List interfaces) { - this.interfaces = interfaces; - } - - - public MetadataNetwork network(MetadataNetworkNetwork network) { - - this.network = network; - return this; - } - - /** - * Get network - * @return network - **/ - @javax.annotation.Nullable - public MetadataNetworkNetwork getNetwork() { - return network; - } - - - public void setNetwork(MetadataNetworkNetwork network) { - this.network = network; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetadataNetwork instance itself - */ - public MetadataNetwork putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetadataNetwork metadataNetwork = (MetadataNetwork) o; - return Objects.equals(this.addresses, metadataNetwork.addresses) && - Objects.equals(this.interfaces, metadataNetwork.interfaces) && - Objects.equals(this.network, metadataNetwork.network)&& - Objects.equals(this.additionalProperties, metadataNetwork.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(addresses, interfaces, network, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataNetwork {\n"); - sb.append(" addresses: ").append(toIndentedString(addresses)).append("\n"); - sb.append(" interfaces: ").append(toIndentedString(interfaces)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("addresses"); - openapiFields.add("interfaces"); - openapiFields.add("network"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataNetwork - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataNetwork.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataNetwork is not found in the empty JSON string", MetadataNetwork.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("addresses") != null && !jsonObj.get("addresses").isJsonNull() && !jsonObj.get("addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `addresses` to be an array in the JSON string but got `%s`", jsonObj.get("addresses").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("interfaces") != null && !jsonObj.get("interfaces").isJsonNull() && !jsonObj.get("interfaces").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `interfaces` to be an array in the JSON string but got `%s`", jsonObj.get("interfaces").toString())); - } - // validate the optional field `network` - if (jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) { - MetadataNetworkNetwork.validateJsonElement(jsonObj.get("network")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataNetwork.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataNetwork' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetadataNetwork.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataNetwork value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetadataNetwork read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetadataNetwork instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataNetwork given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataNetwork - * @throws IOException if the JSON string is invalid with respect to MetadataNetwork - */ - public static MetadataNetwork fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataNetwork.class); - } - - /** - * Convert an instance of MetadataNetwork to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetwork.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetwork.java deleted file mode 100644 index ae37f30d6..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetwork.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.MetadataNetworkNetworkBonding; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetadataNetworkNetwork - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetadataNetworkNetwork { - public static final String SERIALIZED_NAME_BONDING = "bonding"; - @SerializedName(SERIALIZED_NAME_BONDING) - private MetadataNetworkNetworkBonding bonding; - - public MetadataNetworkNetwork() { - } - - public MetadataNetworkNetwork bonding(MetadataNetworkNetworkBonding bonding) { - - this.bonding = bonding; - return this; - } - - /** - * Get bonding - * @return bonding - **/ - @javax.annotation.Nullable - public MetadataNetworkNetworkBonding getBonding() { - return bonding; - } - - - public void setBonding(MetadataNetworkNetworkBonding bonding) { - this.bonding = bonding; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetadataNetworkNetwork instance itself - */ - public MetadataNetworkNetwork putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetadataNetworkNetwork metadataNetworkNetwork = (MetadataNetworkNetwork) o; - return Objects.equals(this.bonding, metadataNetworkNetwork.bonding)&& - Objects.equals(this.additionalProperties, metadataNetworkNetwork.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bonding, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataNetworkNetwork {\n"); - sb.append(" bonding: ").append(toIndentedString(bonding)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bonding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataNetworkNetwork - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataNetworkNetwork.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataNetworkNetwork is not found in the empty JSON string", MetadataNetworkNetwork.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `bonding` - if (jsonObj.get("bonding") != null && !jsonObj.get("bonding").isJsonNull()) { - MetadataNetworkNetworkBonding.validateJsonElement(jsonObj.get("bonding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataNetworkNetwork.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataNetworkNetwork' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetadataNetworkNetwork.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataNetworkNetwork value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetadataNetworkNetwork read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetadataNetworkNetwork instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataNetworkNetwork given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataNetworkNetwork - * @throws IOException if the JSON string is invalid with respect to MetadataNetworkNetwork - */ - public static MetadataNetworkNetwork fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataNetworkNetwork.class); - } - - /** - * Convert an instance of MetadataNetworkNetwork to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkBonding.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkBonding.java deleted file mode 100644 index 67ff87e0c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkBonding.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetadataNetworkNetworkBonding - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetadataNetworkNetworkBonding { - public static final String SERIALIZED_NAME_LINK_AGGREGATION = "link_aggregation"; - @SerializedName(SERIALIZED_NAME_LINK_AGGREGATION) - private String linkAggregation; - - public static final String SERIALIZED_NAME_MAC = "mac"; - @SerializedName(SERIALIZED_NAME_MAC) - private String mac; - - public static final String SERIALIZED_NAME_MODE = "mode"; - @SerializedName(SERIALIZED_NAME_MODE) - private Integer mode; - - public MetadataNetworkNetworkBonding() { - } - - public MetadataNetworkNetworkBonding linkAggregation(String linkAggregation) { - - this.linkAggregation = linkAggregation; - return this; - } - - /** - * Get linkAggregation - * @return linkAggregation - **/ - @javax.annotation.Nullable - public String getLinkAggregation() { - return linkAggregation; - } - - - public void setLinkAggregation(String linkAggregation) { - this.linkAggregation = linkAggregation; - } - - - public MetadataNetworkNetworkBonding mac(String mac) { - - this.mac = mac; - return this; - } - - /** - * Get mac - * @return mac - **/ - @javax.annotation.Nullable - public String getMac() { - return mac; - } - - - public void setMac(String mac) { - this.mac = mac; - } - - - public MetadataNetworkNetworkBonding mode(Integer mode) { - - this.mode = mode; - return this; - } - - /** - * Get mode - * @return mode - **/ - @javax.annotation.Nullable - public Integer getMode() { - return mode; - } - - - public void setMode(Integer mode) { - this.mode = mode; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetadataNetworkNetworkBonding instance itself - */ - public MetadataNetworkNetworkBonding putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetadataNetworkNetworkBonding metadataNetworkNetworkBonding = (MetadataNetworkNetworkBonding) o; - return Objects.equals(this.linkAggregation, metadataNetworkNetworkBonding.linkAggregation) && - Objects.equals(this.mac, metadataNetworkNetworkBonding.mac) && - Objects.equals(this.mode, metadataNetworkNetworkBonding.mode)&& - Objects.equals(this.additionalProperties, metadataNetworkNetworkBonding.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(linkAggregation, mac, mode, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetadataNetworkNetworkBonding {\n"); - sb.append(" linkAggregation: ").append(toIndentedString(linkAggregation)).append("\n"); - sb.append(" mac: ").append(toIndentedString(mac)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("link_aggregation"); - openapiFields.add("mac"); - openapiFields.add("mode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetadataNetworkNetworkBonding - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetadataNetworkNetworkBonding.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetadataNetworkNetworkBonding is not found in the empty JSON string", MetadataNetworkNetworkBonding.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("link_aggregation") != null && !jsonObj.get("link_aggregation").isJsonNull()) && !jsonObj.get("link_aggregation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `link_aggregation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link_aggregation").toString())); - } - if ((jsonObj.get("mac") != null && !jsonObj.get("mac").isJsonNull()) && !jsonObj.get("mac").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mac` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mac").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetadataNetworkNetworkBonding.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetadataNetworkNetworkBonding' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetadataNetworkNetworkBonding.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetadataNetworkNetworkBonding value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetadataNetworkNetworkBonding read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetadataNetworkNetworkBonding instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetadataNetworkNetworkBonding given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetadataNetworkNetworkBonding - * @throws IOException if the JSON string is invalid with respect to MetadataNetworkNetworkBonding - */ - public static MetadataNetworkNetworkBonding fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetadataNetworkNetworkBonding.class); - } - - /** - * Convert an instance of MetadataNetworkNetworkBonding to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java deleted file mode 100644 index c9f6ffad1..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGateway.java +++ /dev/null @@ -1,519 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPReservationOrHref; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetalGateway - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetalGateway { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; - @SerializedName(SERIALIZED_NAME_CREATED_BY) - private Href createdBy; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_IP_RESERVATION = "ip_reservation"; - @SerializedName(SERIALIZED_NAME_IP_RESERVATION) - private IPReservationOrHref ipReservation; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Project project; - - /** - * The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - READY("ready"), - - ACTIVE("active"), - - DELETING("deleting"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_VIRTUAL_NETWORK = "virtual_network"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORK) - private VirtualNetwork virtualNetwork; - - public MetalGateway() { - } - - public MetalGateway createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public MetalGateway createdBy(Href createdBy) { - - this.createdBy = createdBy; - return this; - } - - /** - * Get createdBy - * @return createdBy - **/ - @javax.annotation.Nullable - public Href getCreatedBy() { - return createdBy; - } - - - public void setCreatedBy(Href createdBy) { - this.createdBy = createdBy; - } - - - public MetalGateway href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public MetalGateway id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public MetalGateway ipReservation(IPReservationOrHref ipReservation) { - - this.ipReservation = ipReservation; - return this; - } - - /** - * Get ipReservation - * @return ipReservation - **/ - @javax.annotation.Nullable - public IPReservationOrHref getIpReservation() { - return ipReservation; - } - - - public void setIpReservation(IPReservationOrHref ipReservation) { - this.ipReservation = ipReservation; - } - - - public MetalGateway project(Project project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Project getProject() { - return project; - } - - - public void setProject(Project project) { - this.project = project; - } - - - public MetalGateway state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public MetalGateway updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public MetalGateway virtualNetwork(VirtualNetwork virtualNetwork) { - - this.virtualNetwork = virtualNetwork; - return this; - } - - /** - * Get virtualNetwork - * @return virtualNetwork - **/ - @javax.annotation.Nullable - public VirtualNetwork getVirtualNetwork() { - return virtualNetwork; - } - - - public void setVirtualNetwork(VirtualNetwork virtualNetwork) { - this.virtualNetwork = virtualNetwork; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetalGateway metalGateway = (MetalGateway) o; - return Objects.equals(this.createdAt, metalGateway.createdAt) && - Objects.equals(this.createdBy, metalGateway.createdBy) && - Objects.equals(this.href, metalGateway.href) && - Objects.equals(this.id, metalGateway.id) && - Objects.equals(this.ipReservation, metalGateway.ipReservation) && - Objects.equals(this.project, metalGateway.project) && - Objects.equals(this.state, metalGateway.state) && - Objects.equals(this.updatedAt, metalGateway.updatedAt) && - Objects.equals(this.virtualNetwork, metalGateway.virtualNetwork); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, createdBy, href, id, ipReservation, project, state, updatedAt, virtualNetwork); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetalGateway {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" ipReservation: ").append(toIndentedString(ipReservation)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" virtualNetwork: ").append(toIndentedString(virtualNetwork)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("created_by"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("ip_reservation"); - openapiFields.add("project"); - openapiFields.add("state"); - openapiFields.add("updated_at"); - openapiFields.add("virtual_network"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetalGateway - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetalGateway.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGateway is not found in the empty JSON string", MetalGateway.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!MetalGateway.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetalGateway` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `created_by` - if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("created_by")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `ip_reservation` - if (jsonObj.get("ip_reservation") != null && !jsonObj.get("ip_reservation").isJsonNull()) { - IPReservationOrHref.validateJsonElement(jsonObj.get("ip_reservation")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Project.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - // validate the optional field `virtual_network` - if (jsonObj.get("virtual_network") != null && !jsonObj.get("virtual_network").isJsonNull()) { - VirtualNetwork.validateJsonElement(jsonObj.get("virtual_network")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetalGateway.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetalGateway' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetalGateway.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetalGateway value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MetalGateway read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetalGateway given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetalGateway - * @throws IOException if the JSON string is invalid with respect to MetalGateway - */ - public static MetalGateway fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetalGateway.class); - } - - /** - * Convert an instance of MetalGateway to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java deleted file mode 100644 index a6ef7a514..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInput.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetalGatewayCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetalGatewayCreateInput { - public static final String SERIALIZED_NAME_IP_RESERVATION_ID = "ip_reservation_id"; - @SerializedName(SERIALIZED_NAME_IP_RESERVATION_ID) - private UUID ipReservationId; - - public static final String SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE = "private_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE) - private Integer privateIpv4SubnetSize; - - public static final String SERIALIZED_NAME_VIRTUAL_NETWORK_ID = "virtual_network_id"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORK_ID) - private UUID virtualNetworkId; - - public MetalGatewayCreateInput() { - } - - public MetalGatewayCreateInput ipReservationId(UUID ipReservationId) { - - this.ipReservationId = ipReservationId; - return this; - } - - /** - * The UUID of an IP reservation that belongs to the same project as where the metal gateway will be created in. This field is required unless the private IPv4 subnet size is specified. - * @return ipReservationId - **/ - @javax.annotation.Nullable - public UUID getIpReservationId() { - return ipReservationId; - } - - - public void setIpReservationId(UUID ipReservationId) { - this.ipReservationId = ipReservationId; - } - - - public MetalGatewayCreateInput privateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - return this; - } - - /** - * The subnet size (8, 16, 32, 64, or 128) of the private IPv4 reservation that will be created for the metal gateway. This field is required unless a project IP reservation was specified. Please keep in mind that the number of private metal gateway ranges are limited per project. If you would like to increase the limit per project, please contact support for assistance. - * @return privateIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPrivateIpv4SubnetSize() { - return privateIpv4SubnetSize; - } - - - public void setPrivateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - } - - - public MetalGatewayCreateInput virtualNetworkId(UUID virtualNetworkId) { - - this.virtualNetworkId = virtualNetworkId; - return this; - } - - /** - * The UUID of a metro virtual network that belongs to the same project as where the metal gateway will be created in. - * @return virtualNetworkId - **/ - @javax.annotation.Nonnull - public UUID getVirtualNetworkId() { - return virtualNetworkId; - } - - - public void setVirtualNetworkId(UUID virtualNetworkId) { - this.virtualNetworkId = virtualNetworkId; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetalGatewayCreateInput instance itself - */ - public MetalGatewayCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetalGatewayCreateInput metalGatewayCreateInput = (MetalGatewayCreateInput) o; - return Objects.equals(this.ipReservationId, metalGatewayCreateInput.ipReservationId) && - Objects.equals(this.privateIpv4SubnetSize, metalGatewayCreateInput.privateIpv4SubnetSize) && - Objects.equals(this.virtualNetworkId, metalGatewayCreateInput.virtualNetworkId)&& - Objects.equals(this.additionalProperties, metalGatewayCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(ipReservationId, privateIpv4SubnetSize, virtualNetworkId, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetalGatewayCreateInput {\n"); - sb.append(" ipReservationId: ").append(toIndentedString(ipReservationId)).append("\n"); - sb.append(" privateIpv4SubnetSize: ").append(toIndentedString(privateIpv4SubnetSize)).append("\n"); - sb.append(" virtualNetworkId: ").append(toIndentedString(virtualNetworkId)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ip_reservation_id"); - openapiFields.add("private_ipv4_subnet_size"); - openapiFields.add("virtual_network_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("virtual_network_id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetalGatewayCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetalGatewayCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGatewayCreateInput is not found in the empty JSON string", MetalGatewayCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MetalGatewayCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("ip_reservation_id") != null && !jsonObj.get("ip_reservation_id").isJsonNull()) && !jsonObj.get("ip_reservation_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_reservation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip_reservation_id").toString())); - } - if (!jsonObj.get("virtual_network_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `virtual_network_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("virtual_network_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetalGatewayCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetalGatewayCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetalGatewayCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetalGatewayCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetalGatewayCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetalGatewayCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetalGatewayCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetalGatewayCreateInput - * @throws IOException if the JSON string is invalid with respect to MetalGatewayCreateInput - */ - public static MetalGatewayCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetalGatewayCreateInput.class); - } - - /** - * Convert an instance of MetalGatewayCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayElasticIpCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayElasticIpCreateInput.java deleted file mode 100644 index 581f67810..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayElasticIpCreateInput.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetalGatewayElasticIpCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetalGatewayElasticIpCreateInput { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_NEXT_HOP = "next_hop"; - @SerializedName(SERIALIZED_NAME_NEXT_HOP) - private String nextHop; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Map customdata = new HashMap<>(); - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public MetalGatewayElasticIpCreateInput() { - } - - public MetalGatewayElasticIpCreateInput address(String address) { - - this.address = address; - return this; - } - - /** - * An IP address (or IP Address range) contained within one of the project's IP Reservations - * @return address - **/ - @javax.annotation.Nonnull - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public MetalGatewayElasticIpCreateInput nextHop(String nextHop) { - - this.nextHop = nextHop; - return this; - } - - /** - * An IP address contained within the Metal Gateways' IP Reservation range. - * @return nextHop - **/ - @javax.annotation.Nonnull - public String getNextHop() { - return nextHop; - } - - - public void setNextHop(String nextHop) { - this.nextHop = nextHop; - } - - - public MetalGatewayElasticIpCreateInput customdata(Map customdata) { - - this.customdata = customdata; - return this; - } - - public MetalGatewayElasticIpCreateInput putCustomdataItem(String key, Object customdataItem) { - if (this.customdata == null) { - this.customdata = new HashMap<>(); - } - this.customdata.put(key, customdataItem); - return this; - } - - /** - * Optional User-defined JSON object value. - * @return customdata - **/ - @javax.annotation.Nullable - public Map getCustomdata() { - return customdata; - } - - - public void setCustomdata(Map customdata) { - this.customdata = customdata; - } - - - public MetalGatewayElasticIpCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public MetalGatewayElasticIpCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Optional list of User-defined tags. Can be used by users to provide additional details or context regarding the purpose or usage of this resource. - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetalGatewayElasticIpCreateInput instance itself - */ - public MetalGatewayElasticIpCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetalGatewayElasticIpCreateInput metalGatewayElasticIpCreateInput = (MetalGatewayElasticIpCreateInput) o; - return Objects.equals(this.address, metalGatewayElasticIpCreateInput.address) && - Objects.equals(this.nextHop, metalGatewayElasticIpCreateInput.nextHop) && - Objects.equals(this.customdata, metalGatewayElasticIpCreateInput.customdata) && - Objects.equals(this.tags, metalGatewayElasticIpCreateInput.tags)&& - Objects.equals(this.additionalProperties, metalGatewayElasticIpCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, nextHop, customdata, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetalGatewayElasticIpCreateInput {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" nextHop: ").append(toIndentedString(nextHop)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("next_hop"); - openapiFields.add("customdata"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("next_hop"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetalGatewayElasticIpCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetalGatewayElasticIpCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGatewayElasticIpCreateInput is not found in the empty JSON string", MetalGatewayElasticIpCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MetalGatewayElasticIpCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if (!jsonObj.get("next_hop").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `next_hop` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next_hop").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetalGatewayElasticIpCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetalGatewayElasticIpCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetalGatewayElasticIpCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetalGatewayElasticIpCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetalGatewayElasticIpCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetalGatewayElasticIpCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetalGatewayElasticIpCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetalGatewayElasticIpCreateInput - * @throws IOException if the JSON string is invalid with respect to MetalGatewayElasticIpCreateInput - */ - public static MetalGatewayElasticIpCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetalGatewayElasticIpCreateInput.class); - } - - /** - * Convert an instance of MetalGatewayElasticIpCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java deleted file mode 100644 index b9e6f6b83..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.MetalGatewayListMetalGatewaysInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetalGatewayList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetalGatewayList { - public static final String SERIALIZED_NAME_METAL_GATEWAYS = "metal_gateways"; - @SerializedName(SERIALIZED_NAME_METAL_GATEWAYS) - private List metalGateways; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public MetalGatewayList() { - } - - public MetalGatewayList metalGateways(List metalGateways) { - - this.metalGateways = metalGateways; - return this; - } - - public MetalGatewayList addMetalGatewaysItem(MetalGatewayListMetalGatewaysInner metalGatewaysItem) { - if (this.metalGateways == null) { - this.metalGateways = new ArrayList<>(); - } - this.metalGateways.add(metalGatewaysItem); - return this; - } - - /** - * Get metalGateways - * @return metalGateways - **/ - @javax.annotation.Nullable - public List getMetalGateways() { - return metalGateways; - } - - - public void setMetalGateways(List metalGateways) { - this.metalGateways = metalGateways; - } - - - public MetalGatewayList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetalGatewayList instance itself - */ - public MetalGatewayList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetalGatewayList metalGatewayList = (MetalGatewayList) o; - return Objects.equals(this.metalGateways, metalGatewayList.metalGateways) && - Objects.equals(this.meta, metalGatewayList.meta)&& - Objects.equals(this.additionalProperties, metalGatewayList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(metalGateways, meta, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetalGatewayList {\n"); - sb.append(" metalGateways: ").append(toIndentedString(metalGateways)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metal_gateways"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetalGatewayList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetalGatewayList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGatewayList is not found in the empty JSON string", MetalGatewayList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("metal_gateways") != null && !jsonObj.get("metal_gateways").isJsonNull()) { - JsonArray jsonArraymetalGateways = jsonObj.getAsJsonArray("metal_gateways"); - if (jsonArraymetalGateways != null) { - // ensure the json data is an array - if (!jsonObj.get("metal_gateways").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `metal_gateways` to be an array in the JSON string but got `%s`", jsonObj.get("metal_gateways").toString())); - } - - // validate the optional field `metal_gateways` (array) - for (int i = 0; i < jsonArraymetalGateways.size(); i++) { - MetalGatewayListMetalGatewaysInner.validateJsonElement(jsonArraymetalGateways.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetalGatewayList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetalGatewayList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetalGatewayList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetalGatewayList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetalGatewayList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetalGatewayList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetalGatewayList given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetalGatewayList - * @throws IOException if the JSON string is invalid with respect to MetalGatewayList - */ - public static MetalGatewayList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetalGatewayList.class); - } - - /** - * Convert an instance of MetalGatewayList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayListMetalGatewaysInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayListMetalGatewaysInner.java deleted file mode 100644 index 49a7c08f0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayListMetalGatewaysInner.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPReservationOrHref; -import com.equinix.openapi.metal.v1.model.MetalGateway; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfMetalGateway; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetalGatewayListMetalGatewaysInner extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(MetalGatewayListMetalGatewaysInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetalGatewayListMetalGatewaysInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetalGatewayListMetalGatewaysInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterVrfMetalGateway = gson.getDelegateAdapter(this, TypeToken.get(VrfMetalGateway.class)); - final TypeAdapter adapterMetalGateway = gson.getDelegateAdapter(this, TypeToken.get(MetalGateway.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetalGatewayListMetalGatewaysInner value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `VrfMetalGateway` - if (value.getActualInstance() instanceof VrfMetalGateway) { - JsonElement element = adapterVrfMetalGateway.toJsonTree((VrfMetalGateway)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MetalGateway` - if (value.getActualInstance() instanceof MetalGateway) { - JsonElement element = adapterMetalGateway.toJsonTree((MetalGateway)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match anyOf schemae: MetalGateway, VrfMetalGateway"); - } - - @Override - public MetalGatewayListMetalGatewaysInner read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize VrfMetalGateway - try { - // validate the JSON object to see if any exception is thrown - VrfMetalGateway.validateJsonElement(jsonElement); - actualAdapter = adapterVrfMetalGateway; - MetalGatewayListMetalGatewaysInner ret = new MetalGatewayListMetalGatewaysInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfMetalGateway failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfMetalGateway'", e); - } - // deserialize MetalGateway - try { - // validate the JSON object to see if any exception is thrown - MetalGateway.validateJsonElement(jsonElement); - actualAdapter = adapterMetalGateway; - MetalGatewayListMetalGatewaysInner ret = new MetalGatewayListMetalGatewaysInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for MetalGateway failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'MetalGateway'", e); - } - - throw new IOException(String.format("Failed deserialization for MetalGatewayListMetalGatewaysInner: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in anyOf - public static final Map> schemas = new HashMap>(); - - public MetalGatewayListMetalGatewaysInner() { - super("anyOf", Boolean.FALSE); - } - - public MetalGatewayListMetalGatewaysInner(MetalGateway o) { - super("anyOf", Boolean.FALSE); - setActualInstance(o); - } - - public MetalGatewayListMetalGatewaysInner(VrfMetalGateway o) { - super("anyOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("VrfMetalGateway", VrfMetalGateway.class); - schemas.put("MetalGateway", MetalGateway.class); - } - - @Override - public Map> getSchemas() { - return MetalGatewayListMetalGatewaysInner.schemas; - } - - /** - * Set the instance that matches the anyOf child schema, check - * the instance parameter is valid against the anyOf child schemas: - * MetalGateway, VrfMetalGateway - * - * It could be an instance of the 'anyOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof VrfMetalGateway) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MetalGateway) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be MetalGateway, VrfMetalGateway"); - } - - /** - * Get the actual instance, which can be the following: - * MetalGateway, VrfMetalGateway - * - * @return The actual instance (MetalGateway, VrfMetalGateway) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `VrfMetalGateway`. If the actual instance is not `VrfMetalGateway`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfMetalGateway` - * @throws ClassCastException if the instance is not `VrfMetalGateway` - */ - public VrfMetalGateway getVrfMetalGateway() throws ClassCastException { - return (VrfMetalGateway)super.getActualInstance(); - } - /** - * Get the actual instance of `MetalGateway`. If the actual instance is not `MetalGateway`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `MetalGateway` - * @throws ClassCastException if the instance is not `MetalGateway` - */ - public MetalGateway getMetalGateway() throws ClassCastException { - return (MetalGateway)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetalGatewayListMetalGatewaysInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate anyOf schemas one by one - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with VrfMetalGateway - try { - VrfMetalGateway.validateJsonElement(jsonElement); - return; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfMetalGateway failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with MetalGateway - try { - MetalGateway.validateJsonElement(jsonElement); - return; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for MetalGateway failed with `%s`.", e.getMessage())); - // continue to the next one - } - throw new IOException(String.format("The JSON string is invalid for MetalGatewayListMetalGatewaysInner with anyOf schemas: MetalGateway, VrfMetalGateway. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); - - } - - /** - * Create an instance of MetalGatewayListMetalGatewaysInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetalGatewayListMetalGatewaysInner - * @throws IOException if the JSON string is invalid with respect to MetalGatewayListMetalGatewaysInner - */ - public static MetalGatewayListMetalGatewaysInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetalGatewayListMetalGatewaysInner.class); - } - - /** - * Convert an instance of MetalGatewayListMetalGatewaysInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java deleted file mode 100644 index 5d19ce3f4..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetalGatewayLite.java +++ /dev/null @@ -1,522 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetalGatewayLite - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetalGatewayLite { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_GATEWAY_ADDRESS = "gateway_address"; - @SerializedName(SERIALIZED_NAME_GATEWAY_ADDRESS) - private String gatewayAddress; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - /** - * The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - READY("ready"), - - ACTIVE("active"), - - DELETING("deleting"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_VLAN = "vlan"; - @SerializedName(SERIALIZED_NAME_VLAN) - private Integer vlan; - - public MetalGatewayLite() { - } - - public MetalGatewayLite createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public MetalGatewayLite gatewayAddress(String gatewayAddress) { - - this.gatewayAddress = gatewayAddress; - return this; - } - - /** - * The gateway address with subnet CIDR value for this Metal Gateway. For example, a Metal Gateway using an IP reservation with block 10.1.2.0/27 would have a gateway address of 10.1.2.1/27. - * @return gatewayAddress - **/ - @javax.annotation.Nullable - public String getGatewayAddress() { - return gatewayAddress; - } - - - public void setGatewayAddress(String gatewayAddress) { - this.gatewayAddress = gatewayAddress; - } - - - public MetalGatewayLite href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public MetalGatewayLite id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public MetalGatewayLite state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public MetalGatewayLite updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public MetalGatewayLite vlan(Integer vlan) { - - this.vlan = vlan; - return this; - } - - /** - * The VLAN id of the Virtual Network record associated to this Metal Gateway. - * @return vlan - **/ - @javax.annotation.Nullable - public Integer getVlan() { - return vlan; - } - - - public void setVlan(Integer vlan) { - this.vlan = vlan; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetalGatewayLite instance itself - */ - public MetalGatewayLite putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetalGatewayLite metalGatewayLite = (MetalGatewayLite) o; - return Objects.equals(this.createdAt, metalGatewayLite.createdAt) && - Objects.equals(this.gatewayAddress, metalGatewayLite.gatewayAddress) && - Objects.equals(this.href, metalGatewayLite.href) && - Objects.equals(this.id, metalGatewayLite.id) && - Objects.equals(this.state, metalGatewayLite.state) && - Objects.equals(this.updatedAt, metalGatewayLite.updatedAt) && - Objects.equals(this.vlan, metalGatewayLite.vlan)&& - Objects.equals(this.additionalProperties, metalGatewayLite.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, gatewayAddress, href, id, state, updatedAt, vlan, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetalGatewayLite {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" gatewayAddress: ").append(toIndentedString(gatewayAddress)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" vlan: ").append(toIndentedString(vlan)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("gateway_address"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("state"); - openapiFields.add("updated_at"); - openapiFields.add("vlan"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetalGatewayLite - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetalGatewayLite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetalGatewayLite is not found in the empty JSON string", MetalGatewayLite.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("gateway_address") != null && !jsonObj.get("gateway_address").isJsonNull()) && !jsonObj.get("gateway_address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `gateway_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gateway_address").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetalGatewayLite.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetalGatewayLite' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetalGatewayLite.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetalGatewayLite value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetalGatewayLite read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetalGatewayLite instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetalGatewayLite given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetalGatewayLite - * @throws IOException if the JSON string is invalid with respect to MetalGatewayLite - */ - public static MetalGatewayLite fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetalGatewayLite.class); - } - - /** - * Convert an instance of MetalGatewayLite to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java deleted file mode 100644 index 7c0274594..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Metro.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Metro - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Metro { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public Metro() { - } - - public Metro code(String code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - - public void setCode(String code) { - this.code = code; - } - - - public Metro country(String country) { - - this.country = country; - return this; - } - - /** - * Get country - * @return country - **/ - @javax.annotation.Nullable - public String getCountry() { - return country; - } - - - public void setCountry(String country) { - this.country = country; - } - - - public Metro id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Metro name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Metro instance itself - */ - public Metro putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Metro metro = (Metro) o; - return Objects.equals(this.code, metro.code) && - Objects.equals(this.country, metro.country) && - Objects.equals(this.id, metro.id) && - Objects.equals(this.name, metro.name)&& - Objects.equals(this.additionalProperties, metro.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(code, country, id, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Metro {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("country"); - openapiFields.add("id"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Metro - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Metro.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Metro is not found in the empty JSON string", Metro.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); - } - if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Metro.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Metro' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Metro.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Metro value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Metro read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Metro instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Metro given an JSON string - * - * @param jsonString JSON string - * @return An instance of Metro - * @throws IOException if the JSON string is invalid with respect to Metro - */ - public static Metro fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Metro.class); - } - - /** - * Convert an instance of Metro to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroInput.java deleted file mode 100644 index 52b65659a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroInput.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetroInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetroInput { - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public MetroInput() { - } - - public MetroInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * Metro code or ID of where the instance should be provisioned in. Either metro or facility must be provided. - * @return metro - **/ - @javax.annotation.Nonnull - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetroInput instance itself - */ - public MetroInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetroInput metroInput = (MetroInput) o; - return Objects.equals(this.metro, metroInput.metro)&& - Objects.equals(this.additionalProperties, metroInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(metro, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetroInput {\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metro"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metro"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetroInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetroInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetroInput is not found in the empty JSON string", MetroInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MetroInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetroInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetroInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetroInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetroInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetroInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetroInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetroInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetroInput - * @throws IOException if the JSON string is invalid with respect to MetroInput - */ - public static MetroInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetroInput.class); - } - - /** - * Convert an instance of MetroInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java deleted file mode 100644 index af3cf7d22..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MetroList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Metro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MetroList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MetroList { - public static final String SERIALIZED_NAME_METROS = "metros"; - @SerializedName(SERIALIZED_NAME_METROS) - private List metros; - - public MetroList() { - } - - public MetroList metros(List metros) { - - this.metros = metros; - return this; - } - - public MetroList addMetrosItem(Metro metrosItem) { - if (this.metros == null) { - this.metros = new ArrayList<>(); - } - this.metros.add(metrosItem); - return this; - } - - /** - * Get metros - * @return metros - **/ - @javax.annotation.Nullable - public List getMetros() { - return metros; - } - - - public void setMetros(List metros) { - this.metros = metros; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MetroList instance itself - */ - public MetroList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MetroList metroList = (MetroList) o; - return Objects.equals(this.metros, metroList.metros)&& - Objects.equals(this.additionalProperties, metroList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(metros, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MetroList {\n"); - sb.append(" metros: ").append(toIndentedString(metros)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("metros"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MetroList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MetroList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MetroList is not found in the empty JSON string", MetroList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("metros") != null && !jsonObj.get("metros").isJsonNull()) { - JsonArray jsonArraymetros = jsonObj.getAsJsonArray("metros"); - if (jsonArraymetros != null) { - // ensure the json data is an array - if (!jsonObj.get("metros").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `metros` to be an array in the JSON string but got `%s`", jsonObj.get("metros").toString())); - } - - // validate the optional field `metros` (array) - for (int i = 0; i < jsonArraymetros.size(); i++) { - Metro.validateJsonElement(jsonArraymetros.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MetroList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MetroList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MetroList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MetroList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MetroList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MetroList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MetroList given an JSON string - * - * @param jsonString JSON string - * @return An instance of MetroList - * @throws IOException if the JSON string is invalid with respect to MetroList - */ - public static MetroList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MetroList.class); - } - - /** - * Convert an instance of MetroList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Mount.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Mount.java deleted file mode 100644 index 20ccde5c5..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Mount.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Mount - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Mount { - public static final String SERIALIZED_NAME_DEVICE = "device"; - @SerializedName(SERIALIZED_NAME_DEVICE) - private String device; - - public static final String SERIALIZED_NAME_FORMAT = "format"; - @SerializedName(SERIALIZED_NAME_FORMAT) - private String format; - - public static final String SERIALIZED_NAME_POINT = "point"; - @SerializedName(SERIALIZED_NAME_POINT) - private String point; - - public static final String SERIALIZED_NAME_OPTIONS = "options"; - @SerializedName(SERIALIZED_NAME_OPTIONS) - private List options; - - public Mount() { - } - - public Mount device(String device) { - - this.device = device; - return this; - } - - /** - * Get device - * @return device - **/ - @javax.annotation.Nullable - public String getDevice() { - return device; - } - - - public void setDevice(String device) { - this.device = device; - } - - - public Mount format(String format) { - - this.format = format; - return this; - } - - /** - * Get format - * @return format - **/ - @javax.annotation.Nullable - public String getFormat() { - return format; - } - - - public void setFormat(String format) { - this.format = format; - } - - - public Mount point(String point) { - - this.point = point; - return this; - } - - /** - * Get point - * @return point - **/ - @javax.annotation.Nullable - public String getPoint() { - return point; - } - - - public void setPoint(String point) { - this.point = point; - } - - - public Mount options(List options) { - - this.options = options; - return this; - } - - public Mount addOptionsItem(String optionsItem) { - if (this.options == null) { - this.options = new ArrayList<>(); - } - this.options.add(optionsItem); - return this; - } - - /** - * Get options - * @return options - **/ - @javax.annotation.Nullable - public List getOptions() { - return options; - } - - - public void setOptions(List options) { - this.options = options; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Mount instance itself - */ - public Mount putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Mount mount = (Mount) o; - return Objects.equals(this.device, mount.device) && - Objects.equals(this.format, mount.format) && - Objects.equals(this.point, mount.point) && - Objects.equals(this.options, mount.options)&& - Objects.equals(this.additionalProperties, mount.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(device, format, point, options, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Mount {\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" point: ").append(toIndentedString(point)).append("\n"); - sb.append(" options: ").append(toIndentedString(options)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("device"); - openapiFields.add("format"); - openapiFields.add("point"); - openapiFields.add("options"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Mount - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Mount.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Mount is not found in the empty JSON string", Mount.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("device") != null && !jsonObj.get("device").isJsonNull()) && !jsonObj.get("device").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `device` to be a primitive type in the JSON string but got `%s`", jsonObj.get("device").toString())); - } - if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); - } - if ((jsonObj.get("point") != null && !jsonObj.get("point").isJsonNull()) && !jsonObj.get("point").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `point` to be a primitive type in the JSON string but got `%s`", jsonObj.get("point").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("options") != null && !jsonObj.get("options").isJsonNull() && !jsonObj.get("options").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `options` to be an array in the JSON string but got `%s`", jsonObj.get("options").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Mount.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Mount' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Mount.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Mount value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Mount read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Mount instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Mount given an JSON string - * - * @param jsonString JSON string - * @return An instance of Mount - * @throws IOException if the JSON string is invalid with respect to Mount - */ - public static Mount fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Mount.class); - } - - /** - * Convert an instance of Mount to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MoveHardwareReservationRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MoveHardwareReservationRequest.java deleted file mode 100644 index eab6b8a1a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/MoveHardwareReservationRequest.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * MoveHardwareReservationRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MoveHardwareReservationRequest { - public static final String SERIALIZED_NAME_PROJECT_ID = "project_id"; - @SerializedName(SERIALIZED_NAME_PROJECT_ID) - private UUID projectId; - - public MoveHardwareReservationRequest() { - } - - public MoveHardwareReservationRequest projectId(UUID projectId) { - - this.projectId = projectId; - return this; - } - - /** - * Get projectId - * @return projectId - **/ - @javax.annotation.Nullable - public UUID getProjectId() { - return projectId; - } - - - public void setProjectId(UUID projectId) { - this.projectId = projectId; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MoveHardwareReservationRequest instance itself - */ - public MoveHardwareReservationRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MoveHardwareReservationRequest moveHardwareReservationRequest = (MoveHardwareReservationRequest) o; - return Objects.equals(this.projectId, moveHardwareReservationRequest.projectId)&& - Objects.equals(this.additionalProperties, moveHardwareReservationRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(projectId, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MoveHardwareReservationRequest {\n"); - sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("project_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MoveHardwareReservationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MoveHardwareReservationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MoveHardwareReservationRequest is not found in the empty JSON string", MoveHardwareReservationRequest.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("project_id") != null && !jsonObj.get("project_id").isJsonNull()) && !jsonObj.get("project_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MoveHardwareReservationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MoveHardwareReservationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MoveHardwareReservationRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MoveHardwareReservationRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MoveHardwareReservationRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MoveHardwareReservationRequest instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MoveHardwareReservationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of MoveHardwareReservationRequest - * @throws IOException if the JSON string is invalid with respect to MoveHardwareReservationRequest - */ - public static MoveHardwareReservationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MoveHardwareReservationRequest.class); - } - - /** - * Convert an instance of MoveHardwareReservationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java deleted file mode 100644 index ac3680007..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/NewPassword.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * NewPassword - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NewPassword { - public static final String SERIALIZED_NAME_NEW_PASSWORD = "new_password"; - @SerializedName(SERIALIZED_NAME_NEW_PASSWORD) - private String newPassword; - - public NewPassword() { - } - - public NewPassword newPassword(String newPassword) { - - this.newPassword = newPassword; - return this; - } - - /** - * Get newPassword - * @return newPassword - **/ - @javax.annotation.Nullable - public String getNewPassword() { - return newPassword; - } - - - public void setNewPassword(String newPassword) { - this.newPassword = newPassword; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the NewPassword instance itself - */ - public NewPassword putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NewPassword newPassword = (NewPassword) o; - return Objects.equals(this.newPassword, newPassword.newPassword)&& - Objects.equals(this.additionalProperties, newPassword.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(newPassword, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NewPassword {\n"); - sb.append(" newPassword: ").append(toIndentedString(newPassword)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("new_password"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NewPassword - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NewPassword.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NewPassword is not found in the empty JSON string", NewPassword.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("new_password") != null && !jsonObj.get("new_password").isJsonNull()) && !jsonObj.get("new_password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `new_password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("new_password").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NewPassword.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NewPassword' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NewPassword.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NewPassword value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public NewPassword read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - NewPassword instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NewPassword given an JSON string - * - * @param jsonString JSON string - * @return An instance of NewPassword - * @throws IOException if the JSON string is invalid with respect to NewPassword - */ - public static NewPassword fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NewPassword.class); - } - - /** - * Convert an instance of NewPassword to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java deleted file mode 100644 index e09f54285..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystem.java +++ /dev/null @@ -1,594 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * OperatingSystem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OperatingSystem { - public static final String SERIALIZED_NAME_DISTRO = "distro"; - @SerializedName(SERIALIZED_NAME_DISTRO) - private String distro; - - public static final String SERIALIZED_NAME_DISTRO_LABEL = "distro_label"; - @SerializedName(SERIALIZED_NAME_DISTRO_LABEL) - private String distroLabel; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LICENSED = "licensed"; - @SerializedName(SERIALIZED_NAME_LICENSED) - private Boolean licensed; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PREINSTALLABLE = "preinstallable"; - @SerializedName(SERIALIZED_NAME_PREINSTALLABLE) - private Boolean preinstallable; - - public static final String SERIALIZED_NAME_PRICING = "pricing"; - @SerializedName(SERIALIZED_NAME_PRICING) - private Object pricing; - - public static final String SERIALIZED_NAME_PROVISIONABLE_ON = "provisionable_on"; - @SerializedName(SERIALIZED_NAME_PROVISIONABLE_ON) - private List provisionableOn; - - public static final String SERIALIZED_NAME_SLUG = "slug"; - @SerializedName(SERIALIZED_NAME_SLUG) - private String slug; - - public static final String SERIALIZED_NAME_VERSION = "version"; - @SerializedName(SERIALIZED_NAME_VERSION) - private String version; - - public static final String SERIALIZED_NAME_DEFAULT_OPERATING_SYSTEM = "default_operating_system"; - @SerializedName(SERIALIZED_NAME_DEFAULT_OPERATING_SYSTEM) - private Boolean defaultOperatingSystem; - - public OperatingSystem() { - } - - - public OperatingSystem( - Boolean defaultOperatingSystem - ) { - this(); - this.defaultOperatingSystem = defaultOperatingSystem; - } - - public OperatingSystem distro(String distro) { - - this.distro = distro; - return this; - } - - /** - * Get distro - * @return distro - **/ - @javax.annotation.Nullable - public String getDistro() { - return distro; - } - - - public void setDistro(String distro) { - this.distro = distro; - } - - - public OperatingSystem distroLabel(String distroLabel) { - - this.distroLabel = distroLabel; - return this; - } - - /** - * Get distroLabel - * @return distroLabel - **/ - @javax.annotation.Nullable - public String getDistroLabel() { - return distroLabel; - } - - - public void setDistroLabel(String distroLabel) { - this.distroLabel = distroLabel; - } - - - public OperatingSystem id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public OperatingSystem licensed(Boolean licensed) { - - this.licensed = licensed; - return this; - } - - /** - * Licenced OS is priced according to pricing property - * @return licensed - **/ - @javax.annotation.Nullable - public Boolean getLicensed() { - return licensed; - } - - - public void setLicensed(Boolean licensed) { - this.licensed = licensed; - } - - - public OperatingSystem name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public OperatingSystem preinstallable(Boolean preinstallable) { - - this.preinstallable = preinstallable; - return this; - } - - /** - * Servers can be already preinstalled with OS in order to shorten provision time. - * @return preinstallable - **/ - @javax.annotation.Nullable - public Boolean getPreinstallable() { - return preinstallable; - } - - - public void setPreinstallable(Boolean preinstallable) { - this.preinstallable = preinstallable; - } - - - public OperatingSystem pricing(Object pricing) { - - this.pricing = pricing; - return this; - } - - /** - * This object contains price per time unit and optional multiplier value if licence price depends on hardware plan or components (e.g. number of cores) - * @return pricing - **/ - @javax.annotation.Nullable - public Object getPricing() { - return pricing; - } - - - public void setPricing(Object pricing) { - this.pricing = pricing; - } - - - public OperatingSystem provisionableOn(List provisionableOn) { - - this.provisionableOn = provisionableOn; - return this; - } - - public OperatingSystem addProvisionableOnItem(String provisionableOnItem) { - if (this.provisionableOn == null) { - this.provisionableOn = new ArrayList<>(); - } - this.provisionableOn.add(provisionableOnItem); - return this; - } - - /** - * Get provisionableOn - * @return provisionableOn - **/ - @javax.annotation.Nullable - public List getProvisionableOn() { - return provisionableOn; - } - - - public void setProvisionableOn(List provisionableOn) { - this.provisionableOn = provisionableOn; - } - - - public OperatingSystem slug(String slug) { - - this.slug = slug; - return this; - } - - /** - * Get slug - * @return slug - **/ - @javax.annotation.Nullable - public String getSlug() { - return slug; - } - - - public void setSlug(String slug) { - this.slug = slug; - } - - - public OperatingSystem version(String version) { - - this.version = version; - return this; - } - - /** - * Get version - * @return version - **/ - @javax.annotation.Nullable - public String getVersion() { - return version; - } - - - public void setVersion(String version) { - this.version = version; - } - - - /** - * Default operating system for the distro. - * @return defaultOperatingSystem - **/ - @javax.annotation.Nullable - public Boolean getDefaultOperatingSystem() { - return defaultOperatingSystem; - } - - - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the OperatingSystem instance itself - */ - public OperatingSystem putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OperatingSystem operatingSystem = (OperatingSystem) o; - return Objects.equals(this.distro, operatingSystem.distro) && - Objects.equals(this.distroLabel, operatingSystem.distroLabel) && - Objects.equals(this.id, operatingSystem.id) && - Objects.equals(this.licensed, operatingSystem.licensed) && - Objects.equals(this.name, operatingSystem.name) && - Objects.equals(this.preinstallable, operatingSystem.preinstallable) && - Objects.equals(this.pricing, operatingSystem.pricing) && - Objects.equals(this.provisionableOn, operatingSystem.provisionableOn) && - Objects.equals(this.slug, operatingSystem.slug) && - Objects.equals(this.version, operatingSystem.version) && - Objects.equals(this.defaultOperatingSystem, operatingSystem.defaultOperatingSystem)&& - Objects.equals(this.additionalProperties, operatingSystem.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(distro, distroLabel, id, licensed, name, preinstallable, pricing, provisionableOn, slug, version, defaultOperatingSystem, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OperatingSystem {\n"); - sb.append(" distro: ").append(toIndentedString(distro)).append("\n"); - sb.append(" distroLabel: ").append(toIndentedString(distroLabel)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" licensed: ").append(toIndentedString(licensed)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" preinstallable: ").append(toIndentedString(preinstallable)).append("\n"); - sb.append(" pricing: ").append(toIndentedString(pricing)).append("\n"); - sb.append(" provisionableOn: ").append(toIndentedString(provisionableOn)).append("\n"); - sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" defaultOperatingSystem: ").append(toIndentedString(defaultOperatingSystem)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("distro"); - openapiFields.add("distro_label"); - openapiFields.add("id"); - openapiFields.add("licensed"); - openapiFields.add("name"); - openapiFields.add("preinstallable"); - openapiFields.add("pricing"); - openapiFields.add("provisionable_on"); - openapiFields.add("slug"); - openapiFields.add("version"); - openapiFields.add("default_operating_system"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OperatingSystem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OperatingSystem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OperatingSystem is not found in the empty JSON string", OperatingSystem.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("distro") != null && !jsonObj.get("distro").isJsonNull()) && !jsonObj.get("distro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distro").toString())); - } - if ((jsonObj.get("distro_label") != null && !jsonObj.get("distro_label").isJsonNull()) && !jsonObj.get("distro_label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distro_label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distro_label").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("provisionable_on") != null && !jsonObj.get("provisionable_on").isJsonNull() && !jsonObj.get("provisionable_on").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `provisionable_on` to be an array in the JSON string but got `%s`", jsonObj.get("provisionable_on").toString())); - } - if ((jsonObj.get("slug") != null && !jsonObj.get("slug").isJsonNull()) && !jsonObj.get("slug").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `slug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("slug").toString())); - } - if ((jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) && !jsonObj.get("version").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OperatingSystem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OperatingSystem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OperatingSystem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OperatingSystem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public OperatingSystem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - OperatingSystem instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OperatingSystem given an JSON string - * - * @param jsonString JSON string - * @return An instance of OperatingSystem - * @throws IOException if the JSON string is invalid with respect to OperatingSystem - */ - public static OperatingSystem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OperatingSystem.class); - } - - /** - * Convert an instance of OperatingSystem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java deleted file mode 100644 index f85c1e0d4..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OperatingSystemList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.OperatingSystem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * OperatingSystemList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OperatingSystemList { - public static final String SERIALIZED_NAME_OPERATING_SYSTEMS = "operating_systems"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEMS) - private List operatingSystems; - - public OperatingSystemList() { - } - - public OperatingSystemList operatingSystems(List operatingSystems) { - - this.operatingSystems = operatingSystems; - return this; - } - - public OperatingSystemList addOperatingSystemsItem(OperatingSystem operatingSystemsItem) { - if (this.operatingSystems == null) { - this.operatingSystems = new ArrayList<>(); - } - this.operatingSystems.add(operatingSystemsItem); - return this; - } - - /** - * Get operatingSystems - * @return operatingSystems - **/ - @javax.annotation.Nullable - public List getOperatingSystems() { - return operatingSystems; - } - - - public void setOperatingSystems(List operatingSystems) { - this.operatingSystems = operatingSystems; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the OperatingSystemList instance itself - */ - public OperatingSystemList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OperatingSystemList operatingSystemList = (OperatingSystemList) o; - return Objects.equals(this.operatingSystems, operatingSystemList.operatingSystems)&& - Objects.equals(this.additionalProperties, operatingSystemList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(operatingSystems, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OperatingSystemList {\n"); - sb.append(" operatingSystems: ").append(toIndentedString(operatingSystems)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("operating_systems"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OperatingSystemList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OperatingSystemList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OperatingSystemList is not found in the empty JSON string", OperatingSystemList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("operating_systems") != null && !jsonObj.get("operating_systems").isJsonNull()) { - JsonArray jsonArrayoperatingSystems = jsonObj.getAsJsonArray("operating_systems"); - if (jsonArrayoperatingSystems != null) { - // ensure the json data is an array - if (!jsonObj.get("operating_systems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `operating_systems` to be an array in the JSON string but got `%s`", jsonObj.get("operating_systems").toString())); - } - - // validate the optional field `operating_systems` (array) - for (int i = 0; i < jsonArrayoperatingSystems.size(); i++) { - OperatingSystem.validateJsonElement(jsonArrayoperatingSystems.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OperatingSystemList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OperatingSystemList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OperatingSystemList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OperatingSystemList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public OperatingSystemList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - OperatingSystemList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OperatingSystemList given an JSON string - * - * @param jsonString JSON string - * @return An instance of OperatingSystemList - * @throws IOException if the JSON string is invalid with respect to OperatingSystemList - */ - public static OperatingSystemList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OperatingSystemList.class); - } - - /** - * Convert an instance of OperatingSystemList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java deleted file mode 100644 index 365fdfbbd..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Organization.java +++ /dev/null @@ -1,828 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Address; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Organization - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Organization { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_BILLING_ADDRESS = "billing_address"; - @SerializedName(SERIALIZED_NAME_BILLING_ADDRESS) - private Address billingAddress; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CREDIT_AMOUNT = "credit_amount"; - @SerializedName(SERIALIZED_NAME_CREDIT_AMOUNT) - private Float creditAmount; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ENFORCE2FA_AT = "enforce_2fa_at"; - @SerializedName(SERIALIZED_NAME_ENFORCE2FA_AT) - private OffsetDateTime enforce2faAt; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LOGO = "logo"; - @SerializedName(SERIALIZED_NAME_LOGO) - private String logo; - - public static final String SERIALIZED_NAME_MEMBERS = "members"; - @SerializedName(SERIALIZED_NAME_MEMBERS) - private List members; - - public static final String SERIALIZED_NAME_MEMBERSHIPS = "memberships"; - @SerializedName(SERIALIZED_NAME_MEMBERSHIPS) - private List memberships; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PROJECTS = "projects"; - @SerializedName(SERIALIZED_NAME_PROJECTS) - private List projects; - - public static final String SERIALIZED_NAME_TERMS = "terms"; - @SerializedName(SERIALIZED_NAME_TERMS) - private Integer terms; - - public static final String SERIALIZED_NAME_TWITTER = "twitter"; - @SerializedName(SERIALIZED_NAME_TWITTER) - private String twitter; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public Organization() { - } - - public Organization address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public Organization billingAddress(Address billingAddress) { - - this.billingAddress = billingAddress; - return this; - } - - /** - * Get billingAddress - * @return billingAddress - **/ - @javax.annotation.Nullable - public Address getBillingAddress() { - return billingAddress; - } - - - public void setBillingAddress(Address billingAddress) { - this.billingAddress = billingAddress; - } - - - public Organization createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Organization creditAmount(Float creditAmount) { - - this.creditAmount = creditAmount; - return this; - } - - /** - * Get creditAmount - * @return creditAmount - **/ - @javax.annotation.Nullable - public Float getCreditAmount() { - return creditAmount; - } - - - public void setCreditAmount(Float creditAmount) { - this.creditAmount = creditAmount; - } - - - public Organization customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public Organization description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public Organization enforce2faAt(OffsetDateTime enforce2faAt) { - - this.enforce2faAt = enforce2faAt; - return this; - } - - /** - * Force to all members to have enabled the two factor authentication after that date, unless the value is null - * @return enforce2faAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getEnforce2faAt() { - return enforce2faAt; - } - - - public void setEnforce2faAt(OffsetDateTime enforce2faAt) { - this.enforce2faAt = enforce2faAt; - } - - - public Organization id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Organization logo(String logo) { - - this.logo = logo; - return this; - } - - /** - * Get logo - * @return logo - **/ - @javax.annotation.Nullable - public String getLogo() { - return logo; - } - - - public void setLogo(String logo) { - this.logo = logo; - } - - - public Organization members(List members) { - - this.members = members; - return this; - } - - public Organization addMembersItem(Href membersItem) { - if (this.members == null) { - this.members = new ArrayList<>(); - } - this.members.add(membersItem); - return this; - } - - /** - * Get members - * @return members - **/ - @javax.annotation.Nullable - public List getMembers() { - return members; - } - - - public void setMembers(List members) { - this.members = members; - } - - - public Organization memberships(List memberships) { - - this.memberships = memberships; - return this; - } - - public Organization addMembershipsItem(Href membershipsItem) { - if (this.memberships == null) { - this.memberships = new ArrayList<>(); - } - this.memberships.add(membershipsItem); - return this; - } - - /** - * Get memberships - * @return memberships - **/ - @javax.annotation.Nullable - public List getMemberships() { - return memberships; - } - - - public void setMemberships(List memberships) { - this.memberships = memberships; - } - - - public Organization name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Organization projects(List projects) { - - this.projects = projects; - return this; - } - - public Organization addProjectsItem(Href projectsItem) { - if (this.projects == null) { - this.projects = new ArrayList<>(); - } - this.projects.add(projectsItem); - return this; - } - - /** - * Get projects - * @return projects - **/ - @javax.annotation.Nullable - public List getProjects() { - return projects; - } - - - public void setProjects(List projects) { - this.projects = projects; - } - - - public Organization terms(Integer terms) { - - this.terms = terms; - return this; - } - - /** - * Get terms - * @return terms - **/ - @javax.annotation.Nullable - public Integer getTerms() { - return terms; - } - - - public void setTerms(Integer terms) { - this.terms = terms; - } - - - public Organization twitter(String twitter) { - - this.twitter = twitter; - return this; - } - - /** - * Get twitter - * @return twitter - **/ - @javax.annotation.Nullable - public String getTwitter() { - return twitter; - } - - - public void setTwitter(String twitter) { - this.twitter = twitter; - } - - - public Organization updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Organization website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Organization instance itself - */ - public Organization putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Organization organization = (Organization) o; - return Objects.equals(this.address, organization.address) && - Objects.equals(this.billingAddress, organization.billingAddress) && - Objects.equals(this.createdAt, organization.createdAt) && - Objects.equals(this.creditAmount, organization.creditAmount) && - Objects.equals(this.customdata, organization.customdata) && - Objects.equals(this.description, organization.description) && - Objects.equals(this.enforce2faAt, organization.enforce2faAt) && - Objects.equals(this.id, organization.id) && - Objects.equals(this.logo, organization.logo) && - Objects.equals(this.members, organization.members) && - Objects.equals(this.memberships, organization.memberships) && - Objects.equals(this.name, organization.name) && - Objects.equals(this.projects, organization.projects) && - Objects.equals(this.terms, organization.terms) && - Objects.equals(this.twitter, organization.twitter) && - Objects.equals(this.updatedAt, organization.updatedAt) && - Objects.equals(this.website, organization.website)&& - Objects.equals(this.additionalProperties, organization.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, billingAddress, createdAt, creditAmount, customdata, description, enforce2faAt, id, logo, members, memberships, name, projects, terms, twitter, updatedAt, website, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Organization {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" creditAmount: ").append(toIndentedString(creditAmount)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" enforce2faAt: ").append(toIndentedString(enforce2faAt)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); - sb.append(" members: ").append(toIndentedString(members)).append("\n"); - sb.append(" memberships: ").append(toIndentedString(memberships)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" projects: ").append(toIndentedString(projects)).append("\n"); - sb.append(" terms: ").append(toIndentedString(terms)).append("\n"); - sb.append(" twitter: ").append(toIndentedString(twitter)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("billing_address"); - openapiFields.add("created_at"); - openapiFields.add("credit_amount"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("enforce_2fa_at"); - openapiFields.add("id"); - openapiFields.add("logo"); - openapiFields.add("members"); - openapiFields.add("memberships"); - openapiFields.add("name"); - openapiFields.add("projects"); - openapiFields.add("terms"); - openapiFields.add("twitter"); - openapiFields.add("updated_at"); - openapiFields.add("website"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Organization - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Organization.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Organization is not found in the empty JSON string", Organization.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - // validate the optional field `billing_address` - if (jsonObj.get("billing_address") != null && !jsonObj.get("billing_address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("billing_address")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("logo") != null && !jsonObj.get("logo").isJsonNull()) && !jsonObj.get("logo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `logo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo").toString())); - } - if (jsonObj.get("members") != null && !jsonObj.get("members").isJsonNull()) { - JsonArray jsonArraymembers = jsonObj.getAsJsonArray("members"); - if (jsonArraymembers != null) { - // ensure the json data is an array - if (!jsonObj.get("members").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `members` to be an array in the JSON string but got `%s`", jsonObj.get("members").toString())); - } - - // validate the optional field `members` (array) - for (int i = 0; i < jsonArraymembers.size(); i++) { - Href.validateJsonElement(jsonArraymembers.get(i)); - }; - } - } - if (jsonObj.get("memberships") != null && !jsonObj.get("memberships").isJsonNull()) { - JsonArray jsonArraymemberships = jsonObj.getAsJsonArray("memberships"); - if (jsonArraymemberships != null) { - // ensure the json data is an array - if (!jsonObj.get("memberships").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `memberships` to be an array in the JSON string but got `%s`", jsonObj.get("memberships").toString())); - } - - // validate the optional field `memberships` (array) - for (int i = 0; i < jsonArraymemberships.size(); i++) { - Href.validateJsonElement(jsonArraymemberships.get(i)); - }; - } - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (jsonObj.get("projects") != null && !jsonObj.get("projects").isJsonNull()) { - JsonArray jsonArrayprojects = jsonObj.getAsJsonArray("projects"); - if (jsonArrayprojects != null) { - // ensure the json data is an array - if (!jsonObj.get("projects").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `projects` to be an array in the JSON string but got `%s`", jsonObj.get("projects").toString())); - } - - // validate the optional field `projects` (array) - for (int i = 0; i < jsonArrayprojects.size(); i++) { - Href.validateJsonElement(jsonArrayprojects.get(i)); - }; - } - } - if ((jsonObj.get("twitter") != null && !jsonObj.get("twitter").isJsonNull()) && !jsonObj.get("twitter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `twitter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("twitter").toString())); - } - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Organization.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Organization' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Organization.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Organization value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Organization read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Organization instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Organization given an JSON string - * - * @param jsonString JSON string - * @return An instance of Organization - * @throws IOException if the JSON string is invalid with respect to Organization - */ - public static Organization fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Organization.class); - } - - /** - * Convert an instance of Organization to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java deleted file mode 100644 index b202529d7..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationInput.java +++ /dev/null @@ -1,528 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Address; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * OrganizationInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OrganizationInput { - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private Address address; - - public static final String SERIALIZED_NAME_BILLING_ADDRESS = "billing_address"; - @SerializedName(SERIALIZED_NAME_BILLING_ADDRESS) - private Address billingAddress; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ENFORCE2FA_AT = "enforce_2fa_at"; - @SerializedName(SERIALIZED_NAME_ENFORCE2FA_AT) - private OffsetDateTime enforce2faAt; - - public static final String SERIALIZED_NAME_LOGO = "logo"; - @SerializedName(SERIALIZED_NAME_LOGO) - private byte[] logo; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TWITTER = "twitter"; - @SerializedName(SERIALIZED_NAME_TWITTER) - private String twitter; - - public static final String SERIALIZED_NAME_WEBSITE = "website"; - @SerializedName(SERIALIZED_NAME_WEBSITE) - private String website; - - public OrganizationInput() { - } - - public OrganizationInput address(Address address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public Address getAddress() { - return address; - } - - - public void setAddress(Address address) { - this.address = address; - } - - - public OrganizationInput billingAddress(Address billingAddress) { - - this.billingAddress = billingAddress; - return this; - } - - /** - * Get billingAddress - * @return billingAddress - **/ - @javax.annotation.Nullable - public Address getBillingAddress() { - return billingAddress; - } - - - public void setBillingAddress(Address billingAddress) { - this.billingAddress = billingAddress; - } - - - public OrganizationInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public OrganizationInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public OrganizationInput enforce2faAt(OffsetDateTime enforce2faAt) { - - this.enforce2faAt = enforce2faAt; - return this; - } - - /** - * Force to all members to have enabled the two factor authentication after that date, unless the value is null - * @return enforce2faAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getEnforce2faAt() { - return enforce2faAt; - } - - - public void setEnforce2faAt(OffsetDateTime enforce2faAt) { - this.enforce2faAt = enforce2faAt; - } - - - public OrganizationInput logo(byte[] logo) { - - this.logo = logo; - return this; - } - - /** - * The logo for the organization; must be base64-encoded image data - * @return logo - **/ - @javax.annotation.Nullable - public byte[] getLogo() { - return logo; - } - - - public void setLogo(byte[] logo) { - this.logo = logo; - } - - - public OrganizationInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public OrganizationInput twitter(String twitter) { - - this.twitter = twitter; - return this; - } - - /** - * Get twitter - * @return twitter - **/ - @javax.annotation.Nullable - public String getTwitter() { - return twitter; - } - - - public void setTwitter(String twitter) { - this.twitter = twitter; - } - - - public OrganizationInput website(String website) { - - this.website = website; - return this; - } - - /** - * Get website - * @return website - **/ - @javax.annotation.Nullable - public String getWebsite() { - return website; - } - - - public void setWebsite(String website) { - this.website = website; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the OrganizationInput instance itself - */ - public OrganizationInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrganizationInput organizationInput = (OrganizationInput) o; - return Objects.equals(this.address, organizationInput.address) && - Objects.equals(this.billingAddress, organizationInput.billingAddress) && - Objects.equals(this.customdata, organizationInput.customdata) && - Objects.equals(this.description, organizationInput.description) && - Objects.equals(this.enforce2faAt, organizationInput.enforce2faAt) && - Arrays.equals(this.logo, organizationInput.logo) && - Objects.equals(this.name, organizationInput.name) && - Objects.equals(this.twitter, organizationInput.twitter) && - Objects.equals(this.website, organizationInput.website)&& - Objects.equals(this.additionalProperties, organizationInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(address, billingAddress, customdata, description, enforce2faAt, Arrays.hashCode(logo), name, twitter, website, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrganizationInput {\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" enforce2faAt: ").append(toIndentedString(enforce2faAt)).append("\n"); - sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" twitter: ").append(toIndentedString(twitter)).append("\n"); - sb.append(" website: ").append(toIndentedString(website)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address"); - openapiFields.add("billing_address"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("enforce_2fa_at"); - openapiFields.add("logo"); - openapiFields.add("name"); - openapiFields.add("twitter"); - openapiFields.add("website"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrganizationInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrganizationInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OrganizationInput is not found in the empty JSON string", OrganizationInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `address` - if (jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("address")); - } - // validate the optional field `billing_address` - if (jsonObj.get("billing_address") != null && !jsonObj.get("billing_address").isJsonNull()) { - Address.validateJsonElement(jsonObj.get("billing_address")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("twitter") != null && !jsonObj.get("twitter").isJsonNull()) && !jsonObj.get("twitter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `twitter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("twitter").toString())); - } - if ((jsonObj.get("website") != null && !jsonObj.get("website").isJsonNull()) && !jsonObj.get("website").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrganizationInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrganizationInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OrganizationInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OrganizationInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public OrganizationInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - OrganizationInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OrganizationInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrganizationInput - * @throws IOException if the JSON string is invalid with respect to OrganizationInput - */ - public static OrganizationInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrganizationInput.class); - } - - /** - * Convert an instance of OrganizationInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java deleted file mode 100644 index fa464cb13..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/OrganizationList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.Organization; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * OrganizationList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OrganizationList { - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public static final String SERIALIZED_NAME_ORGANIZATIONS = "organizations"; - @SerializedName(SERIALIZED_NAME_ORGANIZATIONS) - private List organizations; - - public OrganizationList() { - } - - public OrganizationList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - - public OrganizationList organizations(List organizations) { - - this.organizations = organizations; - return this; - } - - public OrganizationList addOrganizationsItem(Organization organizationsItem) { - if (this.organizations == null) { - this.organizations = new ArrayList<>(); - } - this.organizations.add(organizationsItem); - return this; - } - - /** - * Get organizations - * @return organizations - **/ - @javax.annotation.Nullable - public List getOrganizations() { - return organizations; - } - - - public void setOrganizations(List organizations) { - this.organizations = organizations; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the OrganizationList instance itself - */ - public OrganizationList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrganizationList organizationList = (OrganizationList) o; - return Objects.equals(this.meta, organizationList.meta) && - Objects.equals(this.organizations, organizationList.organizations)&& - Objects.equals(this.additionalProperties, organizationList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(meta, organizations, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrganizationList {\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" organizations: ").append(toIndentedString(organizations)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("meta"); - openapiFields.add("organizations"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OrganizationList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OrganizationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OrganizationList is not found in the empty JSON string", OrganizationList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - if (jsonObj.get("organizations") != null && !jsonObj.get("organizations").isJsonNull()) { - JsonArray jsonArrayorganizations = jsonObj.getAsJsonArray("organizations"); - if (jsonArrayorganizations != null) { - // ensure the json data is an array - if (!jsonObj.get("organizations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `organizations` to be an array in the JSON string but got `%s`", jsonObj.get("organizations").toString())); - } - - // validate the optional field `organizations` (array) - for (int i = 0; i < jsonArrayorganizations.size(); i++) { - Organization.validateJsonElement(jsonArrayorganizations.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OrganizationList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OrganizationList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OrganizationList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OrganizationList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public OrganizationList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - OrganizationList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OrganizationList given an JSON string - * - * @param jsonString JSON string - * @return An instance of OrganizationList - * @throws IOException if the JSON string is invalid with respect to OrganizationList - */ - public static OrganizationList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OrganizationList.class); - } - - /** - * Convert an instance of OrganizationList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java deleted file mode 100644 index 9ad777475..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ParentBlock.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ParentBlock - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ParentBlock { - public static final String SERIALIZED_NAME_CIDR = "cidr"; - @SerializedName(SERIALIZED_NAME_CIDR) - private Integer cidr; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_NETMASK = "netmask"; - @SerializedName(SERIALIZED_NAME_NETMASK) - private String netmask; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private String network; - - public ParentBlock() { - } - - public ParentBlock cidr(Integer cidr) { - - this.cidr = cidr; - return this; - } - - /** - * Get cidr - * @return cidr - **/ - @javax.annotation.Nullable - public Integer getCidr() { - return cidr; - } - - - public void setCidr(Integer cidr) { - this.cidr = cidr; - } - - - public ParentBlock href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public ParentBlock netmask(String netmask) { - - this.netmask = netmask; - return this; - } - - /** - * Get netmask - * @return netmask - **/ - @javax.annotation.Nullable - public String getNetmask() { - return netmask; - } - - - public void setNetmask(String netmask) { - this.netmask = netmask; - } - - - public ParentBlock network(String network) { - - this.network = network; - return this; - } - - /** - * Get network - * @return network - **/ - @javax.annotation.Nullable - public String getNetwork() { - return network; - } - - - public void setNetwork(String network) { - this.network = network; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ParentBlock instance itself - */ - public ParentBlock putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ParentBlock parentBlock = (ParentBlock) o; - return Objects.equals(this.cidr, parentBlock.cidr) && - Objects.equals(this.href, parentBlock.href) && - Objects.equals(this.netmask, parentBlock.netmask) && - Objects.equals(this.network, parentBlock.network)&& - Objects.equals(this.additionalProperties, parentBlock.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(cidr, href, netmask, network, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ParentBlock {\n"); - sb.append(" cidr: ").append(toIndentedString(cidr)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" netmask: ").append(toIndentedString(netmask)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cidr"); - openapiFields.add("href"); - openapiFields.add("netmask"); - openapiFields.add("network"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ParentBlock - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ParentBlock.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ParentBlock is not found in the empty JSON string", ParentBlock.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("netmask") != null && !jsonObj.get("netmask").isJsonNull()) && !jsonObj.get("netmask").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `netmask` to be a primitive type in the JSON string but got `%s`", jsonObj.get("netmask").toString())); - } - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ParentBlock.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ParentBlock' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ParentBlock.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ParentBlock value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ParentBlock read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ParentBlock instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ParentBlock given an JSON string - * - * @param jsonString JSON string - * @return An instance of ParentBlock - * @throws IOException if the JSON string is invalid with respect to ParentBlock - */ - public static ParentBlock fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ParentBlock.class); - } - - /** - * Convert an instance of ParentBlock to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Partition.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Partition.java deleted file mode 100644 index 97c1a77c6..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Partition.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Partition - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Partition { - public static final String SERIALIZED_NAME_LABEL = "label"; - @SerializedName(SERIALIZED_NAME_LABEL) - private String label; - - public static final String SERIALIZED_NAME_NUMBER = "number"; - @SerializedName(SERIALIZED_NAME_NUMBER) - private Integer number; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - private String size; - - public Partition() { - } - - public Partition label(String label) { - - this.label = label; - return this; - } - - /** - * Get label - * @return label - **/ - @javax.annotation.Nullable - public String getLabel() { - return label; - } - - - public void setLabel(String label) { - this.label = label; - } - - - public Partition number(Integer number) { - - this.number = number; - return this; - } - - /** - * Get number - * @return number - **/ - @javax.annotation.Nullable - public Integer getNumber() { - return number; - } - - - public void setNumber(Integer number) { - this.number = number; - } - - - public Partition size(String size) { - - this.size = size; - return this; - } - - /** - * Get size - * @return size - **/ - @javax.annotation.Nullable - public String getSize() { - return size; - } - - - public void setSize(String size) { - this.size = size; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Partition instance itself - */ - public Partition putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Partition partition = (Partition) o; - return Objects.equals(this.label, partition.label) && - Objects.equals(this.number, partition.number) && - Objects.equals(this.size, partition.size)&& - Objects.equals(this.additionalProperties, partition.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(label, number, size, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Partition {\n"); - sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("label"); - openapiFields.add("number"); - openapiFields.add("size"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Partition - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Partition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Partition is not found in the empty JSON string", Partition.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); - } - if ((jsonObj.get("size") != null && !jsonObj.get("size").isJsonNull()) && !jsonObj.get("size").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `size` to be a primitive type in the JSON string but got `%s`", jsonObj.get("size").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Partition.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Partition' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Partition.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Partition value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Partition read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Partition instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Partition given an JSON string - * - * @param jsonString JSON string - * @return An instance of Partition - * @throws IOException if the JSON string is invalid with respect to Partition - */ - public static Partition fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Partition.class); - } - - /** - * Convert an instance of Partition to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java deleted file mode 100644 index 9e60b3879..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethod.java +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.PaymentMethodBillingAddress; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PaymentMethod - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentMethod { - public static final String SERIALIZED_NAME_BILLING_ADDRESS = "billing_address"; - @SerializedName(SERIALIZED_NAME_BILLING_ADDRESS) - private PaymentMethodBillingAddress billingAddress; - - public static final String SERIALIZED_NAME_CARD_TYPE = "card_type"; - @SerializedName(SERIALIZED_NAME_CARD_TYPE) - private String cardType; - - public static final String SERIALIZED_NAME_CARDHOLDER_NAME = "cardholder_name"; - @SerializedName(SERIALIZED_NAME_CARDHOLDER_NAME) - private String cardholderName; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CREATED_BY_USER = "created_by_user"; - @SerializedName(SERIALIZED_NAME_CREATED_BY_USER) - private Href createdByUser; - - public static final String SERIALIZED_NAME_DEFAULT = "default"; - @SerializedName(SERIALIZED_NAME_DEFAULT) - private Boolean _default; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_EXPIRATION_MONTH = "expiration_month"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_MONTH) - private String expirationMonth; - - public static final String SERIALIZED_NAME_EXPIRATION_YEAR = "expiration_year"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_YEAR) - private String expirationYear; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION) - private Href organization; - - public static final String SERIALIZED_NAME_PROJECTS = "projects"; - @SerializedName(SERIALIZED_NAME_PROJECTS) - private List projects; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public PaymentMethod() { - } - - public PaymentMethod billingAddress(PaymentMethodBillingAddress billingAddress) { - - this.billingAddress = billingAddress; - return this; - } - - /** - * Get billingAddress - * @return billingAddress - **/ - @javax.annotation.Nullable - public PaymentMethodBillingAddress getBillingAddress() { - return billingAddress; - } - - - public void setBillingAddress(PaymentMethodBillingAddress billingAddress) { - this.billingAddress = billingAddress; - } - - - public PaymentMethod cardType(String cardType) { - - this.cardType = cardType; - return this; - } - - /** - * Get cardType - * @return cardType - **/ - @javax.annotation.Nullable - public String getCardType() { - return cardType; - } - - - public void setCardType(String cardType) { - this.cardType = cardType; - } - - - public PaymentMethod cardholderName(String cardholderName) { - - this.cardholderName = cardholderName; - return this; - } - - /** - * Get cardholderName - * @return cardholderName - **/ - @javax.annotation.Nullable - public String getCardholderName() { - return cardholderName; - } - - - public void setCardholderName(String cardholderName) { - this.cardholderName = cardholderName; - } - - - public PaymentMethod createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public PaymentMethod createdByUser(Href createdByUser) { - - this.createdByUser = createdByUser; - return this; - } - - /** - * Get createdByUser - * @return createdByUser - **/ - @javax.annotation.Nullable - public Href getCreatedByUser() { - return createdByUser; - } - - - public void setCreatedByUser(Href createdByUser) { - this.createdByUser = createdByUser; - } - - - public PaymentMethod _default(Boolean _default) { - - this._default = _default; - return this; - } - - /** - * Get _default - * @return _default - **/ - @javax.annotation.Nullable - public Boolean getDefault() { - return _default; - } - - - public void setDefault(Boolean _default) { - this._default = _default; - } - - - public PaymentMethod email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public PaymentMethod expirationMonth(String expirationMonth) { - - this.expirationMonth = expirationMonth; - return this; - } - - /** - * Get expirationMonth - * @return expirationMonth - **/ - @javax.annotation.Nullable - public String getExpirationMonth() { - return expirationMonth; - } - - - public void setExpirationMonth(String expirationMonth) { - this.expirationMonth = expirationMonth; - } - - - public PaymentMethod expirationYear(String expirationYear) { - - this.expirationYear = expirationYear; - return this; - } - - /** - * Get expirationYear - * @return expirationYear - **/ - @javax.annotation.Nullable - public String getExpirationYear() { - return expirationYear; - } - - - public void setExpirationYear(String expirationYear) { - this.expirationYear = expirationYear; - } - - - public PaymentMethod id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public PaymentMethod name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public PaymentMethod organization(Href organization) { - - this.organization = organization; - return this; - } - - /** - * Get organization - * @return organization - **/ - @javax.annotation.Nullable - public Href getOrganization() { - return organization; - } - - - public void setOrganization(Href organization) { - this.organization = organization; - } - - - public PaymentMethod projects(List projects) { - - this.projects = projects; - return this; - } - - public PaymentMethod addProjectsItem(Href projectsItem) { - if (this.projects == null) { - this.projects = new ArrayList<>(); - } - this.projects.add(projectsItem); - return this; - } - - /** - * Get projects - * @return projects - **/ - @javax.annotation.Nullable - public List getProjects() { - return projects; - } - - - public void setProjects(List projects) { - this.projects = projects; - } - - - public PaymentMethod type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public PaymentMethod updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PaymentMethod instance itself - */ - public PaymentMethod putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentMethod paymentMethod = (PaymentMethod) o; - return Objects.equals(this.billingAddress, paymentMethod.billingAddress) && - Objects.equals(this.cardType, paymentMethod.cardType) && - Objects.equals(this.cardholderName, paymentMethod.cardholderName) && - Objects.equals(this.createdAt, paymentMethod.createdAt) && - Objects.equals(this.createdByUser, paymentMethod.createdByUser) && - Objects.equals(this._default, paymentMethod._default) && - Objects.equals(this.email, paymentMethod.email) && - Objects.equals(this.expirationMonth, paymentMethod.expirationMonth) && - Objects.equals(this.expirationYear, paymentMethod.expirationYear) && - Objects.equals(this.id, paymentMethod.id) && - Objects.equals(this.name, paymentMethod.name) && - Objects.equals(this.organization, paymentMethod.organization) && - Objects.equals(this.projects, paymentMethod.projects) && - Objects.equals(this.type, paymentMethod.type) && - Objects.equals(this.updatedAt, paymentMethod.updatedAt)&& - Objects.equals(this.additionalProperties, paymentMethod.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(billingAddress, cardType, cardholderName, createdAt, createdByUser, _default, email, expirationMonth, expirationYear, id, name, organization, projects, type, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentMethod {\n"); - sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n"); - sb.append(" cardType: ").append(toIndentedString(cardType)).append("\n"); - sb.append(" cardholderName: ").append(toIndentedString(cardholderName)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" createdByUser: ").append(toIndentedString(createdByUser)).append("\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" expirationMonth: ").append(toIndentedString(expirationMonth)).append("\n"); - sb.append(" expirationYear: ").append(toIndentedString(expirationYear)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append(" projects: ").append(toIndentedString(projects)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("billing_address"); - openapiFields.add("card_type"); - openapiFields.add("cardholder_name"); - openapiFields.add("created_at"); - openapiFields.add("created_by_user"); - openapiFields.add("default"); - openapiFields.add("email"); - openapiFields.add("expiration_month"); - openapiFields.add("expiration_year"); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("organization"); - openapiFields.add("projects"); - openapiFields.add("type"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentMethod - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentMethod.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethod is not found in the empty JSON string", PaymentMethod.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `billing_address` - if (jsonObj.get("billing_address") != null && !jsonObj.get("billing_address").isJsonNull()) { - PaymentMethodBillingAddress.validateJsonElement(jsonObj.get("billing_address")); - } - if ((jsonObj.get("card_type") != null && !jsonObj.get("card_type").isJsonNull()) && !jsonObj.get("card_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `card_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("card_type").toString())); - } - if ((jsonObj.get("cardholder_name") != null && !jsonObj.get("cardholder_name").isJsonNull()) && !jsonObj.get("cardholder_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardholder_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardholder_name").toString())); - } - // validate the optional field `created_by_user` - if (jsonObj.get("created_by_user") != null && !jsonObj.get("created_by_user").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("created_by_user")); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("expiration_month") != null && !jsonObj.get("expiration_month").isJsonNull()) && !jsonObj.get("expiration_month").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expiration_month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiration_month").toString())); - } - if ((jsonObj.get("expiration_year") != null && !jsonObj.get("expiration_year").isJsonNull()) && !jsonObj.get("expiration_year").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expiration_year` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiration_year").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `organization` - if (jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("organization")); - } - if (jsonObj.get("projects") != null && !jsonObj.get("projects").isJsonNull()) { - JsonArray jsonArrayprojects = jsonObj.getAsJsonArray("projects"); - if (jsonArrayprojects != null) { - // ensure the json data is an array - if (!jsonObj.get("projects").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `projects` to be an array in the JSON string but got `%s`", jsonObj.get("projects").toString())); - } - - // validate the optional field `projects` (array) - for (int i = 0; i < jsonArrayprojects.size(); i++) { - Href.validateJsonElement(jsonArrayprojects.get(i)); - }; - } - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentMethod.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentMethod' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentMethod.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentMethod value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PaymentMethod read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PaymentMethod instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentMethod given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentMethod - * @throws IOException if the JSON string is invalid with respect to PaymentMethod - */ - public static PaymentMethod fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentMethod.class); - } - - /** - * Convert an instance of PaymentMethod to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java deleted file mode 100644 index 11e884104..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddress.java +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PaymentMethodBillingAddress - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentMethodBillingAddress { - public static final String SERIALIZED_NAME_COUNTRY_CODE_ALPHA2 = "country_code_alpha2"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE_ALPHA2) - private String countryCodeAlpha2; - - public static final String SERIALIZED_NAME_POSTAL_CODE = "postal_code"; - @SerializedName(SERIALIZED_NAME_POSTAL_CODE) - private String postalCode; - - public static final String SERIALIZED_NAME_STREET_ADDRESS = "street_address"; - @SerializedName(SERIALIZED_NAME_STREET_ADDRESS) - private String streetAddress; - - public PaymentMethodBillingAddress() { - } - - public PaymentMethodBillingAddress countryCodeAlpha2(String countryCodeAlpha2) { - - this.countryCodeAlpha2 = countryCodeAlpha2; - return this; - } - - /** - * Get countryCodeAlpha2 - * @return countryCodeAlpha2 - **/ - @javax.annotation.Nullable - public String getCountryCodeAlpha2() { - return countryCodeAlpha2; - } - - - public void setCountryCodeAlpha2(String countryCodeAlpha2) { - this.countryCodeAlpha2 = countryCodeAlpha2; - } - - - public PaymentMethodBillingAddress postalCode(String postalCode) { - - this.postalCode = postalCode; - return this; - } - - /** - * Get postalCode - * @return postalCode - **/ - @javax.annotation.Nullable - public String getPostalCode() { - return postalCode; - } - - - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - - - public PaymentMethodBillingAddress streetAddress(String streetAddress) { - - this.streetAddress = streetAddress; - return this; - } - - /** - * Get streetAddress - * @return streetAddress - **/ - @javax.annotation.Nullable - public String getStreetAddress() { - return streetAddress; - } - - - public void setStreetAddress(String streetAddress) { - this.streetAddress = streetAddress; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PaymentMethodBillingAddress instance itself - */ - public PaymentMethodBillingAddress putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentMethodBillingAddress paymentMethodBillingAddress = (PaymentMethodBillingAddress) o; - return Objects.equals(this.countryCodeAlpha2, paymentMethodBillingAddress.countryCodeAlpha2) && - Objects.equals(this.postalCode, paymentMethodBillingAddress.postalCode) && - Objects.equals(this.streetAddress, paymentMethodBillingAddress.streetAddress)&& - Objects.equals(this.additionalProperties, paymentMethodBillingAddress.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(countryCodeAlpha2, postalCode, streetAddress, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentMethodBillingAddress {\n"); - sb.append(" countryCodeAlpha2: ").append(toIndentedString(countryCodeAlpha2)).append("\n"); - sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); - sb.append(" streetAddress: ").append(toIndentedString(streetAddress)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("country_code_alpha2"); - openapiFields.add("postal_code"); - openapiFields.add("street_address"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentMethodBillingAddress - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentMethodBillingAddress.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethodBillingAddress is not found in the empty JSON string", PaymentMethodBillingAddress.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("country_code_alpha2") != null && !jsonObj.get("country_code_alpha2").isJsonNull()) && !jsonObj.get("country_code_alpha2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country_code_alpha2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country_code_alpha2").toString())); - } - if ((jsonObj.get("postal_code") != null && !jsonObj.get("postal_code").isJsonNull()) && !jsonObj.get("postal_code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `postal_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postal_code").toString())); - } - if ((jsonObj.get("street_address") != null && !jsonObj.get("street_address").isJsonNull()) && !jsonObj.get("street_address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `street_address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("street_address").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentMethodBillingAddress.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentMethodBillingAddress' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentMethodBillingAddress.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentMethodBillingAddress value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PaymentMethodBillingAddress read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PaymentMethodBillingAddress instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentMethodBillingAddress given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentMethodBillingAddress - * @throws IOException if the JSON string is invalid with respect to PaymentMethodBillingAddress - */ - public static PaymentMethodBillingAddress fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentMethodBillingAddress.class); - } - - /** - * Convert an instance of PaymentMethodBillingAddress to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java deleted file mode 100644 index a8825e08b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInput.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PaymentMethodCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentMethodCreateInput { - public static final String SERIALIZED_NAME_DEFAULT = "default"; - @SerializedName(SERIALIZED_NAME_DEFAULT) - private Boolean _default; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NONCE = "nonce"; - @SerializedName(SERIALIZED_NAME_NONCE) - private String nonce; - - public PaymentMethodCreateInput() { - } - - public PaymentMethodCreateInput _default(Boolean _default) { - - this._default = _default; - return this; - } - - /** - * Get _default - * @return _default - **/ - @javax.annotation.Nullable - public Boolean getDefault() { - return _default; - } - - - public void setDefault(Boolean _default) { - this._default = _default; - } - - - public PaymentMethodCreateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public PaymentMethodCreateInput nonce(String nonce) { - - this.nonce = nonce; - return this; - } - - /** - * Get nonce - * @return nonce - **/ - @javax.annotation.Nonnull - public String getNonce() { - return nonce; - } - - - public void setNonce(String nonce) { - this.nonce = nonce; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PaymentMethodCreateInput instance itself - */ - public PaymentMethodCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentMethodCreateInput paymentMethodCreateInput = (PaymentMethodCreateInput) o; - return Objects.equals(this._default, paymentMethodCreateInput._default) && - Objects.equals(this.name, paymentMethodCreateInput.name) && - Objects.equals(this.nonce, paymentMethodCreateInput.nonce)&& - Objects.equals(this.additionalProperties, paymentMethodCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(_default, name, nonce, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentMethodCreateInput {\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" nonce: ").append(toIndentedString(nonce)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("default"); - openapiFields.add("name"); - openapiFields.add("nonce"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("nonce"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentMethodCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentMethodCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethodCreateInput is not found in the empty JSON string", PaymentMethodCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PaymentMethodCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("nonce").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonce` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonce").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentMethodCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentMethodCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentMethodCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentMethodCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PaymentMethodCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PaymentMethodCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentMethodCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentMethodCreateInput - * @throws IOException if the JSON string is invalid with respect to PaymentMethodCreateInput - */ - public static PaymentMethodCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentMethodCreateInput.class); - } - - /** - * Convert an instance of PaymentMethodCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java deleted file mode 100644 index e00404cae..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PaymentMethod; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PaymentMethodList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentMethodList { - public static final String SERIALIZED_NAME_PAYMENT_METHODS = "payment_methods"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHODS) - private List paymentMethods; - - public PaymentMethodList() { - } - - public PaymentMethodList paymentMethods(List paymentMethods) { - - this.paymentMethods = paymentMethods; - return this; - } - - public PaymentMethodList addPaymentMethodsItem(PaymentMethod paymentMethodsItem) { - if (this.paymentMethods == null) { - this.paymentMethods = new ArrayList<>(); - } - this.paymentMethods.add(paymentMethodsItem); - return this; - } - - /** - * Get paymentMethods - * @return paymentMethods - **/ - @javax.annotation.Nullable - public List getPaymentMethods() { - return paymentMethods; - } - - - public void setPaymentMethods(List paymentMethods) { - this.paymentMethods = paymentMethods; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PaymentMethodList instance itself - */ - public PaymentMethodList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentMethodList paymentMethodList = (PaymentMethodList) o; - return Objects.equals(this.paymentMethods, paymentMethodList.paymentMethods)&& - Objects.equals(this.additionalProperties, paymentMethodList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(paymentMethods, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentMethodList {\n"); - sb.append(" paymentMethods: ").append(toIndentedString(paymentMethods)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("payment_methods"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentMethodList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentMethodList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethodList is not found in the empty JSON string", PaymentMethodList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("payment_methods") != null && !jsonObj.get("payment_methods").isJsonNull()) { - JsonArray jsonArraypaymentMethods = jsonObj.getAsJsonArray("payment_methods"); - if (jsonArraypaymentMethods != null) { - // ensure the json data is an array - if (!jsonObj.get("payment_methods").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `payment_methods` to be an array in the JSON string but got `%s`", jsonObj.get("payment_methods").toString())); - } - - // validate the optional field `payment_methods` (array) - for (int i = 0; i < jsonArraypaymentMethods.size(); i++) { - PaymentMethod.validateJsonElement(jsonArraypaymentMethods.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentMethodList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentMethodList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentMethodList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentMethodList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PaymentMethodList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PaymentMethodList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentMethodList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentMethodList - * @throws IOException if the JSON string is invalid with respect to PaymentMethodList - */ - public static PaymentMethodList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentMethodList.class); - } - - /** - * Convert an instance of PaymentMethodList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java deleted file mode 100644 index f9c55360d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInput.java +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PaymentMethodUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PaymentMethodUpdateInput { - public static final String SERIALIZED_NAME_BILLING_ADDRESS = "billing_address"; - @SerializedName(SERIALIZED_NAME_BILLING_ADDRESS) - private Object billingAddress; - - public static final String SERIALIZED_NAME_CARDHOLDER_NAME = "cardholder_name"; - @SerializedName(SERIALIZED_NAME_CARDHOLDER_NAME) - private String cardholderName; - - public static final String SERIALIZED_NAME_DEFAULT = "default"; - @SerializedName(SERIALIZED_NAME_DEFAULT) - private Boolean _default; - - public static final String SERIALIZED_NAME_EXPIRATION_MONTH = "expiration_month"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_MONTH) - private String expirationMonth; - - public static final String SERIALIZED_NAME_EXPIRATION_YEAR = "expiration_year"; - @SerializedName(SERIALIZED_NAME_EXPIRATION_YEAR) - private Integer expirationYear; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public PaymentMethodUpdateInput() { - } - - public PaymentMethodUpdateInput billingAddress(Object billingAddress) { - - this.billingAddress = billingAddress; - return this; - } - - /** - * Get billingAddress - * @return billingAddress - **/ - @javax.annotation.Nullable - public Object getBillingAddress() { - return billingAddress; - } - - - public void setBillingAddress(Object billingAddress) { - this.billingAddress = billingAddress; - } - - - public PaymentMethodUpdateInput cardholderName(String cardholderName) { - - this.cardholderName = cardholderName; - return this; - } - - /** - * Get cardholderName - * @return cardholderName - **/ - @javax.annotation.Nullable - public String getCardholderName() { - return cardholderName; - } - - - public void setCardholderName(String cardholderName) { - this.cardholderName = cardholderName; - } - - - public PaymentMethodUpdateInput _default(Boolean _default) { - - this._default = _default; - return this; - } - - /** - * Get _default - * @return _default - **/ - @javax.annotation.Nullable - public Boolean getDefault() { - return _default; - } - - - public void setDefault(Boolean _default) { - this._default = _default; - } - - - public PaymentMethodUpdateInput expirationMonth(String expirationMonth) { - - this.expirationMonth = expirationMonth; - return this; - } - - /** - * Get expirationMonth - * @return expirationMonth - **/ - @javax.annotation.Nullable - public String getExpirationMonth() { - return expirationMonth; - } - - - public void setExpirationMonth(String expirationMonth) { - this.expirationMonth = expirationMonth; - } - - - public PaymentMethodUpdateInput expirationYear(Integer expirationYear) { - - this.expirationYear = expirationYear; - return this; - } - - /** - * Get expirationYear - * @return expirationYear - **/ - @javax.annotation.Nullable - public Integer getExpirationYear() { - return expirationYear; - } - - - public void setExpirationYear(Integer expirationYear) { - this.expirationYear = expirationYear; - } - - - public PaymentMethodUpdateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PaymentMethodUpdateInput instance itself - */ - public PaymentMethodUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaymentMethodUpdateInput paymentMethodUpdateInput = (PaymentMethodUpdateInput) o; - return Objects.equals(this.billingAddress, paymentMethodUpdateInput.billingAddress) && - Objects.equals(this.cardholderName, paymentMethodUpdateInput.cardholderName) && - Objects.equals(this._default, paymentMethodUpdateInput._default) && - Objects.equals(this.expirationMonth, paymentMethodUpdateInput.expirationMonth) && - Objects.equals(this.expirationYear, paymentMethodUpdateInput.expirationYear) && - Objects.equals(this.name, paymentMethodUpdateInput.name)&& - Objects.equals(this.additionalProperties, paymentMethodUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(billingAddress, cardholderName, _default, expirationMonth, expirationYear, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaymentMethodUpdateInput {\n"); - sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n"); - sb.append(" cardholderName: ").append(toIndentedString(cardholderName)).append("\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" expirationMonth: ").append(toIndentedString(expirationMonth)).append("\n"); - sb.append(" expirationYear: ").append(toIndentedString(expirationYear)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("billing_address"); - openapiFields.add("cardholder_name"); - openapiFields.add("default"); - openapiFields.add("expiration_month"); - openapiFields.add("expiration_year"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaymentMethodUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaymentMethodUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaymentMethodUpdateInput is not found in the empty JSON string", PaymentMethodUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("cardholder_name") != null && !jsonObj.get("cardholder_name").isJsonNull()) && !jsonObj.get("cardholder_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cardholder_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cardholder_name").toString())); - } - if ((jsonObj.get("expiration_month") != null && !jsonObj.get("expiration_month").isJsonNull()) && !jsonObj.get("expiration_month").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expiration_month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expiration_month").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaymentMethodUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaymentMethodUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaymentMethodUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaymentMethodUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PaymentMethodUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PaymentMethodUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaymentMethodUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaymentMethodUpdateInput - * @throws IOException if the JSON string is invalid with respect to PaymentMethodUpdateInput - */ - public static PaymentMethodUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaymentMethodUpdateInput.class); - } - - /** - * Convert an instance of PaymentMethodUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java deleted file mode 100644 index 5d1763fe8..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Plan.java +++ /dev/null @@ -1,857 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PlanAvailableInInner; -import com.equinix.openapi.metal.v1.model.PlanAvailableInMetrosInner; -import com.equinix.openapi.metal.v1.model.PlanSpecs; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Plan - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Plan { - public static final String SERIALIZED_NAME_AVAILABLE_IN = "available_in"; - @SerializedName(SERIALIZED_NAME_AVAILABLE_IN) - private List availableIn; - - public static final String SERIALIZED_NAME_AVAILABLE_IN_METROS = "available_in_metros"; - @SerializedName(SERIALIZED_NAME_AVAILABLE_IN_METROS) - private List availableInMetros; - - public static final String SERIALIZED_NAME_CATEGORIES = "categories"; - @SerializedName(SERIALIZED_NAME_CATEGORIES) - private List categories; - - public static final String SERIALIZED_NAME_PROPERTY_CLASS = "class"; - @SerializedName(SERIALIZED_NAME_PROPERTY_CLASS) - private String propertyClass; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - /** - * Gets or Sets deploymentTypes - */ - @JsonAdapter(DeploymentTypesEnum.Adapter.class) - public enum DeploymentTypesEnum { - ON_DEMAND("on_demand"), - - SPOT_MARKET("spot_market"); - - private String value; - - DeploymentTypesEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DeploymentTypesEnum fromValue(String value) { - for (DeploymentTypesEnum b : DeploymentTypesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DeploymentTypesEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DeploymentTypesEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DeploymentTypesEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DeploymentTypesEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DEPLOYMENT_TYPES = "deployment_types"; - @SerializedName(SERIALIZED_NAME_DEPLOYMENT_TYPES) - private Set deploymentTypes; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LEGACY = "legacy"; - @SerializedName(SERIALIZED_NAME_LEGACY) - private Boolean legacy; - - public static final String SERIALIZED_NAME_LINE = "line"; - @SerializedName(SERIALIZED_NAME_LINE) - private String line; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PRICING = "pricing"; - @SerializedName(SERIALIZED_NAME_PRICING) - private Object pricing; - - public static final String SERIALIZED_NAME_SLUG = "slug"; - @SerializedName(SERIALIZED_NAME_SLUG) - private String slug; - - public static final String SERIALIZED_NAME_SPECS = "specs"; - @SerializedName(SERIALIZED_NAME_SPECS) - private PlanSpecs specs; - - /** - * The plan type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - STANDARD("standard"), - - WORKLOAD_OPTIMIZED("workload_optimized"), - - CUSTOM("custom"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public Plan() { - } - - public Plan availableIn(List availableIn) { - - this.availableIn = availableIn; - return this; - } - - public Plan addAvailableInItem(PlanAvailableInInner availableInItem) { - if (this.availableIn == null) { - this.availableIn = new ArrayList<>(); - } - this.availableIn.add(availableInItem); - return this; - } - - /** - * Shows which facilities the plan is available in, and the facility-based price if it is different from the default price. - * @return availableIn - **/ - @javax.annotation.Nullable - public List getAvailableIn() { - return availableIn; - } - - - public void setAvailableIn(List availableIn) { - this.availableIn = availableIn; - } - - - public Plan availableInMetros(List availableInMetros) { - - this.availableInMetros = availableInMetros; - return this; - } - - public Plan addAvailableInMetrosItem(PlanAvailableInMetrosInner availableInMetrosItem) { - if (this.availableInMetros == null) { - this.availableInMetros = new ArrayList<>(); - } - this.availableInMetros.add(availableInMetrosItem); - return this; - } - - /** - * Shows which metros the plan is available in, and the metro-based price if it is different from the default price. - * @return availableInMetros - **/ - @javax.annotation.Nullable - public List getAvailableInMetros() { - return availableInMetros; - } - - - public void setAvailableInMetros(List availableInMetros) { - this.availableInMetros = availableInMetros; - } - - - public Plan categories(List categories) { - - this.categories = categories; - return this; - } - - public Plan addCategoriesItem(String categoriesItem) { - if (this.categories == null) { - this.categories = new ArrayList<>(); - } - this.categories.add(categoriesItem); - return this; - } - - /** - * Categories of the plan, like compute or storage. A Plan can belong to multiple categories. - * @return categories - **/ - @javax.annotation.Nullable - public List getCategories() { - return categories; - } - - - public void setCategories(List categories) { - this.categories = categories; - } - - - public Plan propertyClass(String propertyClass) { - - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @javax.annotation.Nullable - public String getPropertyClass() { - return propertyClass; - } - - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - - public Plan description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public Plan deploymentTypes(Set deploymentTypes) { - - this.deploymentTypes = deploymentTypes; - return this; - } - - public Plan addDeploymentTypesItem(DeploymentTypesEnum deploymentTypesItem) { - if (this.deploymentTypes == null) { - this.deploymentTypes = new LinkedHashSet<>(); - } - this.deploymentTypes.add(deploymentTypesItem); - return this; - } - - /** - * Get deploymentTypes - * @return deploymentTypes - **/ - @javax.annotation.Nullable - public Set getDeploymentTypes() { - return deploymentTypes; - } - - - public void setDeploymentTypes(Set deploymentTypes) { - this.deploymentTypes = deploymentTypes; - } - - - public Plan id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Plan legacy(Boolean legacy) { - - this.legacy = legacy; - return this; - } - - /** - * Deprecated. Always return false - * @return legacy - **/ - @javax.annotation.Nullable - public Boolean getLegacy() { - return legacy; - } - - - public void setLegacy(Boolean legacy) { - this.legacy = legacy; - } - - - public Plan line(String line) { - - this.line = line; - return this; - } - - /** - * Get line - * @return line - **/ - @javax.annotation.Nullable - public String getLine() { - return line; - } - - - public void setLine(String line) { - this.line = line; - } - - - public Plan name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Plan pricing(Object pricing) { - - this.pricing = pricing; - return this; - } - - /** - * Get pricing - * @return pricing - **/ - @javax.annotation.Nullable - public Object getPricing() { - return pricing; - } - - - public void setPricing(Object pricing) { - this.pricing = pricing; - } - - - public Plan slug(String slug) { - - this.slug = slug; - return this; - } - - /** - * Get slug - * @return slug - **/ - @javax.annotation.Nullable - public String getSlug() { - return slug; - } - - - public void setSlug(String slug) { - this.slug = slug; - } - - - public Plan specs(PlanSpecs specs) { - - this.specs = specs; - return this; - } - - /** - * Get specs - * @return specs - **/ - @javax.annotation.Nullable - public PlanSpecs getSpecs() { - return specs; - } - - - public void setSpecs(PlanSpecs specs) { - this.specs = specs; - } - - - public Plan type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * The plan type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Plan instance itself - */ - public Plan putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Plan plan = (Plan) o; - return Objects.equals(this.availableIn, plan.availableIn) && - Objects.equals(this.availableInMetros, plan.availableInMetros) && - Objects.equals(this.categories, plan.categories) && - Objects.equals(this.propertyClass, plan.propertyClass) && - Objects.equals(this.description, plan.description) && - Objects.equals(this.deploymentTypes, plan.deploymentTypes) && - Objects.equals(this.id, plan.id) && - Objects.equals(this.legacy, plan.legacy) && - Objects.equals(this.line, plan.line) && - Objects.equals(this.name, plan.name) && - Objects.equals(this.pricing, plan.pricing) && - Objects.equals(this.slug, plan.slug) && - Objects.equals(this.specs, plan.specs) && - Objects.equals(this.type, plan.type)&& - Objects.equals(this.additionalProperties, plan.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(availableIn, availableInMetros, categories, propertyClass, description, deploymentTypes, id, legacy, line, name, pricing, slug, specs, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Plan {\n"); - sb.append(" availableIn: ").append(toIndentedString(availableIn)).append("\n"); - sb.append(" availableInMetros: ").append(toIndentedString(availableInMetros)).append("\n"); - sb.append(" categories: ").append(toIndentedString(categories)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" deploymentTypes: ").append(toIndentedString(deploymentTypes)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" legacy: ").append(toIndentedString(legacy)).append("\n"); - sb.append(" line: ").append(toIndentedString(line)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" pricing: ").append(toIndentedString(pricing)).append("\n"); - sb.append(" slug: ").append(toIndentedString(slug)).append("\n"); - sb.append(" specs: ").append(toIndentedString(specs)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("available_in"); - openapiFields.add("available_in_metros"); - openapiFields.add("categories"); - openapiFields.add("class"); - openapiFields.add("description"); - openapiFields.add("deployment_types"); - openapiFields.add("id"); - openapiFields.add("legacy"); - openapiFields.add("line"); - openapiFields.add("name"); - openapiFields.add("pricing"); - openapiFields.add("slug"); - openapiFields.add("specs"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Plan - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Plan.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Plan is not found in the empty JSON string", Plan.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("available_in") != null && !jsonObj.get("available_in").isJsonNull()) { - JsonArray jsonArrayavailableIn = jsonObj.getAsJsonArray("available_in"); - if (jsonArrayavailableIn != null) { - // ensure the json data is an array - if (!jsonObj.get("available_in").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `available_in` to be an array in the JSON string but got `%s`", jsonObj.get("available_in").toString())); - } - - // validate the optional field `available_in` (array) - for (int i = 0; i < jsonArrayavailableIn.size(); i++) { - PlanAvailableInInner.validateJsonElement(jsonArrayavailableIn.get(i)); - }; - } - } - if (jsonObj.get("available_in_metros") != null && !jsonObj.get("available_in_metros").isJsonNull()) { - JsonArray jsonArrayavailableInMetros = jsonObj.getAsJsonArray("available_in_metros"); - if (jsonArrayavailableInMetros != null) { - // ensure the json data is an array - if (!jsonObj.get("available_in_metros").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `available_in_metros` to be an array in the JSON string but got `%s`", jsonObj.get("available_in_metros").toString())); - } - - // validate the optional field `available_in_metros` (array) - for (int i = 0; i < jsonArrayavailableInMetros.size(); i++) { - PlanAvailableInMetrosInner.validateJsonElement(jsonArrayavailableInMetros.get(i)); - }; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("categories") != null && !jsonObj.get("categories").isJsonNull() && !jsonObj.get("categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `categories` to be an array in the JSON string but got `%s`", jsonObj.get("categories").toString())); - } - if ((jsonObj.get("class") != null && !jsonObj.get("class").isJsonNull()) && !jsonObj.get("class").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `class` to be a primitive type in the JSON string but got `%s`", jsonObj.get("class").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("deployment_types") != null && !jsonObj.get("deployment_types").isJsonNull() && !jsonObj.get("deployment_types").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `deployment_types` to be an array in the JSON string but got `%s`", jsonObj.get("deployment_types").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("line") != null && !jsonObj.get("line").isJsonNull()) && !jsonObj.get("line").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `line` to be a primitive type in the JSON string but got `%s`", jsonObj.get("line").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("slug") != null && !jsonObj.get("slug").isJsonNull()) && !jsonObj.get("slug").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `slug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("slug").toString())); - } - // validate the optional field `specs` - if (jsonObj.get("specs") != null && !jsonObj.get("specs").isJsonNull()) { - PlanSpecs.validateJsonElement(jsonObj.get("specs")); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Plan.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Plan' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Plan.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Plan value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Plan read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Plan instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Plan given an JSON string - * - * @param jsonString JSON string - * @return An instance of Plan - * @throws IOException if the JSON string is invalid with respect to Plan - */ - public static Plan fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Plan.class); - } - - /** - * Convert an instance of Plan to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInner.java deleted file mode 100644 index ae22f0ef2..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInner.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PlanAvailableInInnerPrice; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanAvailableInInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanAvailableInInner { - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_PRICE) - private PlanAvailableInInnerPrice price; - - public PlanAvailableInInner() { - } - - public PlanAvailableInInner href(String href) { - - this.href = href; - return this; - } - - /** - * href to the Facility - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public PlanAvailableInInner price(PlanAvailableInInnerPrice price) { - - this.price = price; - return this; - } - - /** - * Get price - * @return price - **/ - @javax.annotation.Nullable - public PlanAvailableInInnerPrice getPrice() { - return price; - } - - - public void setPrice(PlanAvailableInInnerPrice price) { - this.price = price; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanAvailableInInner instance itself - */ - public PlanAvailableInInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanAvailableInInner planAvailableInInner = (PlanAvailableInInner) o; - return Objects.equals(this.href, planAvailableInInner.href) && - Objects.equals(this.price, planAvailableInInner.price)&& - Objects.equals(this.additionalProperties, planAvailableInInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(href, price, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanAvailableInInner {\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("href"); - openapiFields.add("price"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanAvailableInInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanAvailableInInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanAvailableInInner is not found in the empty JSON string", PlanAvailableInInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - // validate the optional field `price` - if (jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) { - PlanAvailableInInnerPrice.validateJsonElement(jsonObj.get("price")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanAvailableInInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanAvailableInInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanAvailableInInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanAvailableInInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanAvailableInInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanAvailableInInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanAvailableInInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanAvailableInInner - * @throws IOException if the JSON string is invalid with respect to PlanAvailableInInner - */ - public static PlanAvailableInInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanAvailableInInner.class); - } - - /** - * Convert an instance of PlanAvailableInInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerPrice.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerPrice.java deleted file mode 100644 index 97c2f1fbf..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerPrice.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanAvailableInInnerPrice - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanAvailableInInnerPrice { - public static final String SERIALIZED_NAME_HOUR = "hour"; - @SerializedName(SERIALIZED_NAME_HOUR) - private Double hour; - - public PlanAvailableInInnerPrice() { - } - - public PlanAvailableInInnerPrice hour(Double hour) { - - this.hour = hour; - return this; - } - - /** - * Get hour - * @return hour - **/ - @javax.annotation.Nullable - public Double getHour() { - return hour; - } - - - public void setHour(Double hour) { - this.hour = hour; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanAvailableInInnerPrice instance itself - */ - public PlanAvailableInInnerPrice putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanAvailableInInnerPrice planAvailableInInnerPrice = (PlanAvailableInInnerPrice) o; - return Objects.equals(this.hour, planAvailableInInnerPrice.hour)&& - Objects.equals(this.additionalProperties, planAvailableInInnerPrice.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(hour, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanAvailableInInnerPrice {\n"); - sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("hour"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanAvailableInInnerPrice - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanAvailableInInnerPrice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanAvailableInInnerPrice is not found in the empty JSON string", PlanAvailableInInnerPrice.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanAvailableInInnerPrice.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanAvailableInInnerPrice' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanAvailableInInnerPrice.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanAvailableInInnerPrice value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanAvailableInInnerPrice read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanAvailableInInnerPrice instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanAvailableInInnerPrice given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanAvailableInInnerPrice - * @throws IOException if the JSON string is invalid with respect to PlanAvailableInInnerPrice - */ - public static PlanAvailableInInnerPrice fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanAvailableInInnerPrice.class); - } - - /** - * Convert an instance of PlanAvailableInInnerPrice to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java deleted file mode 100644 index 33b3c76fc..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInner.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PlanAvailableInInnerPrice; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanAvailableInMetrosInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanAvailableInMetrosInner { - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_PRICE) - private PlanAvailableInInnerPrice price; - - public PlanAvailableInMetrosInner() { - } - - public PlanAvailableInMetrosInner href(String href) { - - this.href = href; - return this; - } - - /** - * href to the Metro - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public PlanAvailableInMetrosInner price(PlanAvailableInInnerPrice price) { - - this.price = price; - return this; - } - - /** - * Get price - * @return price - **/ - @javax.annotation.Nullable - public PlanAvailableInInnerPrice getPrice() { - return price; - } - - - public void setPrice(PlanAvailableInInnerPrice price) { - this.price = price; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanAvailableInMetrosInner instance itself - */ - public PlanAvailableInMetrosInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanAvailableInMetrosInner planAvailableInMetrosInner = (PlanAvailableInMetrosInner) o; - return Objects.equals(this.href, planAvailableInMetrosInner.href) && - Objects.equals(this.price, planAvailableInMetrosInner.price)&& - Objects.equals(this.additionalProperties, planAvailableInMetrosInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(href, price, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanAvailableInMetrosInner {\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("href"); - openapiFields.add("price"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanAvailableInMetrosInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanAvailableInMetrosInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanAvailableInMetrosInner is not found in the empty JSON string", PlanAvailableInMetrosInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - // validate the optional field `price` - if (jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) { - PlanAvailableInInnerPrice.validateJsonElement(jsonObj.get("price")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanAvailableInMetrosInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanAvailableInMetrosInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanAvailableInMetrosInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanAvailableInMetrosInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanAvailableInMetrosInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanAvailableInMetrosInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanAvailableInMetrosInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanAvailableInMetrosInner - * @throws IOException if the JSON string is invalid with respect to PlanAvailableInMetrosInner - */ - public static PlanAvailableInMetrosInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanAvailableInMetrosInner.class); - } - - /** - * Convert an instance of PlanAvailableInMetrosInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java deleted file mode 100644 index 6aa6ca8a5..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Plan; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanList { - public static final String SERIALIZED_NAME_PLANS = "plans"; - @SerializedName(SERIALIZED_NAME_PLANS) - private List plans; - - public PlanList() { - } - - public PlanList plans(List plans) { - - this.plans = plans; - return this; - } - - public PlanList addPlansItem(Plan plansItem) { - if (this.plans == null) { - this.plans = new ArrayList<>(); - } - this.plans.add(plansItem); - return this; - } - - /** - * Get plans - * @return plans - **/ - @javax.annotation.Nullable - public List getPlans() { - return plans; - } - - - public void setPlans(List plans) { - this.plans = plans; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanList instance itself - */ - public PlanList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanList planList = (PlanList) o; - return Objects.equals(this.plans, planList.plans)&& - Objects.equals(this.additionalProperties, planList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(plans, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanList {\n"); - sb.append(" plans: ").append(toIndentedString(plans)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("plans"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanList is not found in the empty JSON string", PlanList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("plans") != null && !jsonObj.get("plans").isJsonNull()) { - JsonArray jsonArrayplans = jsonObj.getAsJsonArray("plans"); - if (jsonArrayplans != null) { - // ensure the json data is an array - if (!jsonObj.get("plans").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `plans` to be an array in the JSON string but got `%s`", jsonObj.get("plans").toString())); - } - - // validate the optional field `plans` (array) - for (int i = 0; i < jsonArrayplans.size(); i++) { - Plan.validateJsonElement(jsonArrayplans.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanList - * @throws IOException if the JSON string is invalid with respect to PlanList - */ - public static PlanList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanList.class); - } - - /** - * Convert an instance of PlanList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecs.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecs.java deleted file mode 100644 index 20665f463..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecs.java +++ /dev/null @@ -1,475 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PlanSpecsCpusInner; -import com.equinix.openapi.metal.v1.model.PlanSpecsDrivesInner; -import com.equinix.openapi.metal.v1.model.PlanSpecsFeatures; -import com.equinix.openapi.metal.v1.model.PlanSpecsMemory; -import com.equinix.openapi.metal.v1.model.PlanSpecsNicsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanSpecs - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanSpecs { - public static final String SERIALIZED_NAME_CPUS = "cpus"; - @SerializedName(SERIALIZED_NAME_CPUS) - private List cpus; - - public static final String SERIALIZED_NAME_MEMORY = "memory"; - @SerializedName(SERIALIZED_NAME_MEMORY) - private PlanSpecsMemory memory; - - public static final String SERIALIZED_NAME_DRIVES = "drives"; - @SerializedName(SERIALIZED_NAME_DRIVES) - private List drives; - - public static final String SERIALIZED_NAME_NICS = "nics"; - @SerializedName(SERIALIZED_NAME_NICS) - private List nics; - - public static final String SERIALIZED_NAME_FEATURES = "features"; - @SerializedName(SERIALIZED_NAME_FEATURES) - private PlanSpecsFeatures features; - - public PlanSpecs() { - } - - public PlanSpecs cpus(List cpus) { - - this.cpus = cpus; - return this; - } - - public PlanSpecs addCpusItem(PlanSpecsCpusInner cpusItem) { - if (this.cpus == null) { - this.cpus = new ArrayList<>(); - } - this.cpus.add(cpusItem); - return this; - } - - /** - * Get cpus - * @return cpus - **/ - @javax.annotation.Nullable - public List getCpus() { - return cpus; - } - - - public void setCpus(List cpus) { - this.cpus = cpus; - } - - - public PlanSpecs memory(PlanSpecsMemory memory) { - - this.memory = memory; - return this; - } - - /** - * Get memory - * @return memory - **/ - @javax.annotation.Nullable - public PlanSpecsMemory getMemory() { - return memory; - } - - - public void setMemory(PlanSpecsMemory memory) { - this.memory = memory; - } - - - public PlanSpecs drives(List drives) { - - this.drives = drives; - return this; - } - - public PlanSpecs addDrivesItem(PlanSpecsDrivesInner drivesItem) { - if (this.drives == null) { - this.drives = new ArrayList<>(); - } - this.drives.add(drivesItem); - return this; - } - - /** - * Get drives - * @return drives - **/ - @javax.annotation.Nullable - public List getDrives() { - return drives; - } - - - public void setDrives(List drives) { - this.drives = drives; - } - - - public PlanSpecs nics(List nics) { - - this.nics = nics; - return this; - } - - public PlanSpecs addNicsItem(PlanSpecsNicsInner nicsItem) { - if (this.nics == null) { - this.nics = new ArrayList<>(); - } - this.nics.add(nicsItem); - return this; - } - - /** - * Get nics - * @return nics - **/ - @javax.annotation.Nullable - public List getNics() { - return nics; - } - - - public void setNics(List nics) { - this.nics = nics; - } - - - public PlanSpecs features(PlanSpecsFeatures features) { - - this.features = features; - return this; - } - - /** - * Get features - * @return features - **/ - @javax.annotation.Nullable - public PlanSpecsFeatures getFeatures() { - return features; - } - - - public void setFeatures(PlanSpecsFeatures features) { - this.features = features; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanSpecs instance itself - */ - public PlanSpecs putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanSpecs planSpecs = (PlanSpecs) o; - return Objects.equals(this.cpus, planSpecs.cpus) && - Objects.equals(this.memory, planSpecs.memory) && - Objects.equals(this.drives, planSpecs.drives) && - Objects.equals(this.nics, planSpecs.nics) && - Objects.equals(this.features, planSpecs.features)&& - Objects.equals(this.additionalProperties, planSpecs.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(cpus, memory, drives, nics, features, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanSpecs {\n"); - sb.append(" cpus: ").append(toIndentedString(cpus)).append("\n"); - sb.append(" memory: ").append(toIndentedString(memory)).append("\n"); - sb.append(" drives: ").append(toIndentedString(drives)).append("\n"); - sb.append(" nics: ").append(toIndentedString(nics)).append("\n"); - sb.append(" features: ").append(toIndentedString(features)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cpus"); - openapiFields.add("memory"); - openapiFields.add("drives"); - openapiFields.add("nics"); - openapiFields.add("features"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanSpecs - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanSpecs.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanSpecs is not found in the empty JSON string", PlanSpecs.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("cpus") != null && !jsonObj.get("cpus").isJsonNull()) { - JsonArray jsonArraycpus = jsonObj.getAsJsonArray("cpus"); - if (jsonArraycpus != null) { - // ensure the json data is an array - if (!jsonObj.get("cpus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `cpus` to be an array in the JSON string but got `%s`", jsonObj.get("cpus").toString())); - } - - // validate the optional field `cpus` (array) - for (int i = 0; i < jsonArraycpus.size(); i++) { - PlanSpecsCpusInner.validateJsonElement(jsonArraycpus.get(i)); - }; - } - } - // validate the optional field `memory` - if (jsonObj.get("memory") != null && !jsonObj.get("memory").isJsonNull()) { - PlanSpecsMemory.validateJsonElement(jsonObj.get("memory")); - } - if (jsonObj.get("drives") != null && !jsonObj.get("drives").isJsonNull()) { - JsonArray jsonArraydrives = jsonObj.getAsJsonArray("drives"); - if (jsonArraydrives != null) { - // ensure the json data is an array - if (!jsonObj.get("drives").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `drives` to be an array in the JSON string but got `%s`", jsonObj.get("drives").toString())); - } - - // validate the optional field `drives` (array) - for (int i = 0; i < jsonArraydrives.size(); i++) { - PlanSpecsDrivesInner.validateJsonElement(jsonArraydrives.get(i)); - }; - } - } - if (jsonObj.get("nics") != null && !jsonObj.get("nics").isJsonNull()) { - JsonArray jsonArraynics = jsonObj.getAsJsonArray("nics"); - if (jsonArraynics != null) { - // ensure the json data is an array - if (!jsonObj.get("nics").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `nics` to be an array in the JSON string but got `%s`", jsonObj.get("nics").toString())); - } - - // validate the optional field `nics` (array) - for (int i = 0; i < jsonArraynics.size(); i++) { - PlanSpecsNicsInner.validateJsonElement(jsonArraynics.get(i)); - }; - } - } - // validate the optional field `features` - if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull()) { - PlanSpecsFeatures.validateJsonElement(jsonObj.get("features")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanSpecs.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanSpecs' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanSpecs.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanSpecs value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanSpecs read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanSpecs instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanSpecs given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanSpecs - * @throws IOException if the JSON string is invalid with respect to PlanSpecs - */ - public static PlanSpecs fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanSpecs.class); - } - - /** - * Convert an instance of PlanSpecs to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsCpusInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsCpusInner.java deleted file mode 100644 index 9798a1076..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsCpusInner.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanSpecsCpusInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanSpecsCpusInner { - public static final String SERIALIZED_NAME_COUNT = "count"; - @SerializedName(SERIALIZED_NAME_COUNT) - private Integer count; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public PlanSpecsCpusInner() { - } - - public PlanSpecsCpusInner count(Integer count) { - - this.count = count; - return this; - } - - /** - * Get count - * @return count - **/ - @javax.annotation.Nullable - public Integer getCount() { - return count; - } - - - public void setCount(Integer count) { - this.count = count; - } - - - public PlanSpecsCpusInner type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanSpecsCpusInner instance itself - */ - public PlanSpecsCpusInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanSpecsCpusInner planSpecsCpusInner = (PlanSpecsCpusInner) o; - return Objects.equals(this.count, planSpecsCpusInner.count) && - Objects.equals(this.type, planSpecsCpusInner.type)&& - Objects.equals(this.additionalProperties, planSpecsCpusInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(count, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanSpecsCpusInner {\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("count"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanSpecsCpusInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanSpecsCpusInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanSpecsCpusInner is not found in the empty JSON string", PlanSpecsCpusInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanSpecsCpusInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanSpecsCpusInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanSpecsCpusInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanSpecsCpusInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanSpecsCpusInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanSpecsCpusInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanSpecsCpusInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanSpecsCpusInner - * @throws IOException if the JSON string is invalid with respect to PlanSpecsCpusInner - */ - public static PlanSpecsCpusInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanSpecsCpusInner.class); - } - - /** - * Convert an instance of PlanSpecsCpusInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsDrivesInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsDrivesInner.java deleted file mode 100644 index 69ddc464f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsDrivesInner.java +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanSpecsDrivesInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanSpecsDrivesInner { - public static final String SERIALIZED_NAME_COUNT = "count"; - @SerializedName(SERIALIZED_NAME_COUNT) - private Integer count; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - HDD("HDD"), - - SSD("SSD"), - - NVME("NVME"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - private String size; - - /** - * Gets or Sets category - */ - @JsonAdapter(CategoryEnum.Adapter.class) - public enum CategoryEnum { - BOOT("boot"), - - CACHE("cache"), - - STORAGE("storage"); - - private String value; - - CategoryEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static CategoryEnum fromValue(String value) { - for (CategoryEnum b : CategoryEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final CategoryEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public CategoryEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return CategoryEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - CategoryEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_CATEGORY = "category"; - @SerializedName(SERIALIZED_NAME_CATEGORY) - private CategoryEnum category; - - public PlanSpecsDrivesInner() { - } - - public PlanSpecsDrivesInner count(Integer count) { - - this.count = count; - return this; - } - - /** - * Get count - * @return count - **/ - @javax.annotation.Nullable - public Integer getCount() { - return count; - } - - - public void setCount(Integer count) { - this.count = count; - } - - - public PlanSpecsDrivesInner type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public PlanSpecsDrivesInner size(String size) { - - this.size = size; - return this; - } - - /** - * Get size - * @return size - **/ - @javax.annotation.Nullable - public String getSize() { - return size; - } - - - public void setSize(String size) { - this.size = size; - } - - - public PlanSpecsDrivesInner category(CategoryEnum category) { - - this.category = category; - return this; - } - - /** - * Get category - * @return category - **/ - @javax.annotation.Nullable - public CategoryEnum getCategory() { - return category; - } - - - public void setCategory(CategoryEnum category) { - this.category = category; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanSpecsDrivesInner instance itself - */ - public PlanSpecsDrivesInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanSpecsDrivesInner planSpecsDrivesInner = (PlanSpecsDrivesInner) o; - return Objects.equals(this.count, planSpecsDrivesInner.count) && - Objects.equals(this.type, planSpecsDrivesInner.type) && - Objects.equals(this.size, planSpecsDrivesInner.size) && - Objects.equals(this.category, planSpecsDrivesInner.category)&& - Objects.equals(this.additionalProperties, planSpecsDrivesInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(count, type, size, category, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanSpecsDrivesInner {\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("count"); - openapiFields.add("type"); - openapiFields.add("size"); - openapiFields.add("category"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanSpecsDrivesInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanSpecsDrivesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanSpecsDrivesInner is not found in the empty JSON string", PlanSpecsDrivesInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("size") != null && !jsonObj.get("size").isJsonNull()) && !jsonObj.get("size").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `size` to be a primitive type in the JSON string but got `%s`", jsonObj.get("size").toString())); - } - if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); - } - // validate the optional field `category` - if (jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) { - CategoryEnum.validateJsonElement(jsonObj.get("category")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanSpecsDrivesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanSpecsDrivesInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanSpecsDrivesInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanSpecsDrivesInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanSpecsDrivesInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanSpecsDrivesInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanSpecsDrivesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanSpecsDrivesInner - * @throws IOException if the JSON string is invalid with respect to PlanSpecsDrivesInner - */ - public static PlanSpecsDrivesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanSpecsDrivesInner.class); - } - - /** - * Convert an instance of PlanSpecsDrivesInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsFeatures.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsFeatures.java deleted file mode 100644 index 3ab7bae7f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsFeatures.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanSpecsFeatures - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanSpecsFeatures { - public static final String SERIALIZED_NAME_RAID = "raid"; - @SerializedName(SERIALIZED_NAME_RAID) - private Boolean raid; - - public static final String SERIALIZED_NAME_TXT = "txt"; - @SerializedName(SERIALIZED_NAME_TXT) - private Boolean txt; - - public static final String SERIALIZED_NAME_UEFI = "uefi"; - @SerializedName(SERIALIZED_NAME_UEFI) - private Boolean uefi; - - public PlanSpecsFeatures() { - } - - public PlanSpecsFeatures raid(Boolean raid) { - - this.raid = raid; - return this; - } - - /** - * Get raid - * @return raid - **/ - @javax.annotation.Nullable - public Boolean getRaid() { - return raid; - } - - - public void setRaid(Boolean raid) { - this.raid = raid; - } - - - public PlanSpecsFeatures txt(Boolean txt) { - - this.txt = txt; - return this; - } - - /** - * Get txt - * @return txt - **/ - @javax.annotation.Nullable - public Boolean getTxt() { - return txt; - } - - - public void setTxt(Boolean txt) { - this.txt = txt; - } - - - public PlanSpecsFeatures uefi(Boolean uefi) { - - this.uefi = uefi; - return this; - } - - /** - * Get uefi - * @return uefi - **/ - @javax.annotation.Nullable - public Boolean getUefi() { - return uefi; - } - - - public void setUefi(Boolean uefi) { - this.uefi = uefi; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanSpecsFeatures instance itself - */ - public PlanSpecsFeatures putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanSpecsFeatures planSpecsFeatures = (PlanSpecsFeatures) o; - return Objects.equals(this.raid, planSpecsFeatures.raid) && - Objects.equals(this.txt, planSpecsFeatures.txt) && - Objects.equals(this.uefi, planSpecsFeatures.uefi)&& - Objects.equals(this.additionalProperties, planSpecsFeatures.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(raid, txt, uefi, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanSpecsFeatures {\n"); - sb.append(" raid: ").append(toIndentedString(raid)).append("\n"); - sb.append(" txt: ").append(toIndentedString(txt)).append("\n"); - sb.append(" uefi: ").append(toIndentedString(uefi)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("raid"); - openapiFields.add("txt"); - openapiFields.add("uefi"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanSpecsFeatures - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanSpecsFeatures.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanSpecsFeatures is not found in the empty JSON string", PlanSpecsFeatures.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanSpecsFeatures.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanSpecsFeatures' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanSpecsFeatures.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanSpecsFeatures value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanSpecsFeatures read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanSpecsFeatures instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanSpecsFeatures given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanSpecsFeatures - * @throws IOException if the JSON string is invalid with respect to PlanSpecsFeatures - */ - public static PlanSpecsFeatures fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanSpecsFeatures.class); - } - - /** - * Convert an instance of PlanSpecsFeatures to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsMemory.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsMemory.java deleted file mode 100644 index e9ffbc3ce..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsMemory.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanSpecsMemory - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanSpecsMemory { - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - private String total; - - public PlanSpecsMemory() { - } - - public PlanSpecsMemory total(String total) { - - this.total = total; - return this; - } - - /** - * Get total - * @return total - **/ - @javax.annotation.Nullable - public String getTotal() { - return total; - } - - - public void setTotal(String total) { - this.total = total; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanSpecsMemory instance itself - */ - public PlanSpecsMemory putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanSpecsMemory planSpecsMemory = (PlanSpecsMemory) o; - return Objects.equals(this.total, planSpecsMemory.total)&& - Objects.equals(this.additionalProperties, planSpecsMemory.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(total, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanSpecsMemory {\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("total"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanSpecsMemory - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanSpecsMemory.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanSpecsMemory is not found in the empty JSON string", PlanSpecsMemory.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("total") != null && !jsonObj.get("total").isJsonNull()) && !jsonObj.get("total").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `total` to be a primitive type in the JSON string but got `%s`", jsonObj.get("total").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanSpecsMemory.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanSpecsMemory' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanSpecsMemory.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanSpecsMemory value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanSpecsMemory read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanSpecsMemory instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanSpecsMemory given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanSpecsMemory - * @throws IOException if the JSON string is invalid with respect to PlanSpecsMemory - */ - public static PlanSpecsMemory fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanSpecsMemory.class); - } - - /** - * Convert an instance of PlanSpecsMemory to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsNicsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsNicsInner.java deleted file mode 100644 index 78f06842c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PlanSpecsNicsInner.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PlanSpecsNicsInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PlanSpecsNicsInner { - public static final String SERIALIZED_NAME_COUNT = "count"; - @SerializedName(SERIALIZED_NAME_COUNT) - private Integer count; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1GBPS("1Gbps"), - - _10GBPS("10Gbps"), - - _25GBPS("25Gbps"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public PlanSpecsNicsInner() { - } - - public PlanSpecsNicsInner count(Integer count) { - - this.count = count; - return this; - } - - /** - * Get count - * @return count - **/ - @javax.annotation.Nullable - public Integer getCount() { - return count; - } - - - public void setCount(Integer count) { - this.count = count; - } - - - public PlanSpecsNicsInner type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PlanSpecsNicsInner instance itself - */ - public PlanSpecsNicsInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlanSpecsNicsInner planSpecsNicsInner = (PlanSpecsNicsInner) o; - return Objects.equals(this.count, planSpecsNicsInner.count) && - Objects.equals(this.type, planSpecsNicsInner.type)&& - Objects.equals(this.additionalProperties, planSpecsNicsInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(count, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlanSpecsNicsInner {\n"); - sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("count"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PlanSpecsNicsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PlanSpecsNicsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PlanSpecsNicsInner is not found in the empty JSON string", PlanSpecsNicsInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PlanSpecsNicsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PlanSpecsNicsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PlanSpecsNicsInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PlanSpecsNicsInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PlanSpecsNicsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PlanSpecsNicsInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PlanSpecsNicsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PlanSpecsNicsInner - * @throws IOException if the JSON string is invalid with respect to PlanSpecsNicsInner - */ - public static PlanSpecsNicsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PlanSpecsNicsInner.class); - } - - /** - * Convert an instance of PlanSpecsNicsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java deleted file mode 100644 index 932eff38a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Port.java +++ /dev/null @@ -1,708 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.BondPortData; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.PortData; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Port is a hardware port associated with a reserved or instantiated hardware device. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Port { - public static final String SERIALIZED_NAME_BOND = "bond"; - @SerializedName(SERIALIZED_NAME_BOND) - private BondPortData bond; - - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private PortData data; - - public static final String SERIALIZED_NAME_DISBOND_OPERATION_SUPPORTED = "disbond_operation_supported"; - @SerializedName(SERIALIZED_NAME_DISBOND_OPERATION_SUPPORTED) - private Boolean disbondOperationSupported; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - /** - * Type is either \"NetworkBondPort\" for bond ports or \"NetworkPort\" for bondable ethernet ports - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - NETWORKPORT("NetworkPort"), - - NETWORKBONDPORT("NetworkBondPort"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - /** - * Composite network type of the bond - */ - @JsonAdapter(NetworkTypeEnum.Adapter.class) - public enum NetworkTypeEnum { - LAYER2_BONDED("layer2-bonded"), - - LAYER2_INDIVIDUAL("layer2-individual"), - - LAYER3("layer3"), - - HYBRID("hybrid"), - - HYBRID_BONDED("hybrid-bonded"); - - private String value; - - NetworkTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static NetworkTypeEnum fromValue(String value) { - for (NetworkTypeEnum b : NetworkTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final NetworkTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public NetworkTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return NetworkTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - NetworkTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_NETWORK_TYPE = "network_type"; - @SerializedName(SERIALIZED_NAME_NETWORK_TYPE) - private NetworkTypeEnum networkType; - - public static final String SERIALIZED_NAME_NATIVE_VIRTUAL_NETWORK = "native_virtual_network"; - @SerializedName(SERIALIZED_NAME_NATIVE_VIRTUAL_NETWORK) - private VirtualNetwork nativeVirtualNetwork; - - public static final String SERIALIZED_NAME_VIRTUAL_NETWORKS = "virtual_networks"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORKS) - private List virtualNetworks; - - public Port() { - } - - public Port bond(BondPortData bond) { - - this.bond = bond; - return this; - } - - /** - * Get bond - * @return bond - **/ - @javax.annotation.Nullable - public BondPortData getBond() { - return bond; - } - - - public void setBond(BondPortData bond) { - this.bond = bond; - } - - - public Port data(PortData data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nullable - public PortData getData() { - return data; - } - - - public void setData(PortData data) { - this.data = data; - } - - - public Port disbondOperationSupported(Boolean disbondOperationSupported) { - - this.disbondOperationSupported = disbondOperationSupported; - return this; - } - - /** - * Indicates whether or not the bond can be broken on the port (when applicable). - * @return disbondOperationSupported - **/ - @javax.annotation.Nullable - public Boolean getDisbondOperationSupported() { - return disbondOperationSupported; - } - - - public void setDisbondOperationSupported(Boolean disbondOperationSupported) { - this.disbondOperationSupported = disbondOperationSupported; - } - - - public Port href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public Port id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Port name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Port type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Type is either \"NetworkBondPort\" for bond ports or \"NetworkPort\" for bondable ethernet ports - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Port networkType(NetworkTypeEnum networkType) { - - this.networkType = networkType; - return this; - } - - /** - * Composite network type of the bond - * @return networkType - **/ - @javax.annotation.Nullable - public NetworkTypeEnum getNetworkType() { - return networkType; - } - - - public void setNetworkType(NetworkTypeEnum networkType) { - this.networkType = networkType; - } - - - public Port nativeVirtualNetwork(VirtualNetwork nativeVirtualNetwork) { - - this.nativeVirtualNetwork = nativeVirtualNetwork; - return this; - } - - /** - * Get nativeVirtualNetwork - * @return nativeVirtualNetwork - **/ - @javax.annotation.Nullable - public VirtualNetwork getNativeVirtualNetwork() { - return nativeVirtualNetwork; - } - - - public void setNativeVirtualNetwork(VirtualNetwork nativeVirtualNetwork) { - this.nativeVirtualNetwork = nativeVirtualNetwork; - } - - - public Port virtualNetworks(List virtualNetworks) { - - this.virtualNetworks = virtualNetworks; - return this; - } - - public Port addVirtualNetworksItem(Href virtualNetworksItem) { - if (this.virtualNetworks == null) { - this.virtualNetworks = new ArrayList<>(); - } - this.virtualNetworks.add(virtualNetworksItem); - return this; - } - - /** - * Get virtualNetworks - * @return virtualNetworks - **/ - @javax.annotation.Nullable - public List getVirtualNetworks() { - return virtualNetworks; - } - - - public void setVirtualNetworks(List virtualNetworks) { - this.virtualNetworks = virtualNetworks; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Port instance itself - */ - public Port putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Port port = (Port) o; - return Objects.equals(this.bond, port.bond) && - Objects.equals(this.data, port.data) && - Objects.equals(this.disbondOperationSupported, port.disbondOperationSupported) && - Objects.equals(this.href, port.href) && - Objects.equals(this.id, port.id) && - Objects.equals(this.name, port.name) && - Objects.equals(this.type, port.type) && - Objects.equals(this.networkType, port.networkType) && - Objects.equals(this.nativeVirtualNetwork, port.nativeVirtualNetwork) && - Objects.equals(this.virtualNetworks, port.virtualNetworks)&& - Objects.equals(this.additionalProperties, port.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bond, data, disbondOperationSupported, href, id, name, type, networkType, nativeVirtualNetwork, virtualNetworks, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Port {\n"); - sb.append(" bond: ").append(toIndentedString(bond)).append("\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" disbondOperationSupported: ").append(toIndentedString(disbondOperationSupported)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" networkType: ").append(toIndentedString(networkType)).append("\n"); - sb.append(" nativeVirtualNetwork: ").append(toIndentedString(nativeVirtualNetwork)).append("\n"); - sb.append(" virtualNetworks: ").append(toIndentedString(virtualNetworks)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bond"); - openapiFields.add("data"); - openapiFields.add("disbond_operation_supported"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("type"); - openapiFields.add("network_type"); - openapiFields.add("native_virtual_network"); - openapiFields.add("virtual_networks"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Port - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Port.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Port is not found in the empty JSON string", Port.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `bond` - if (jsonObj.get("bond") != null && !jsonObj.get("bond").isJsonNull()) { - BondPortData.validateJsonElement(jsonObj.get("bond")); - } - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - PortData.validateJsonElement(jsonObj.get("data")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("network_type") != null && !jsonObj.get("network_type").isJsonNull()) && !jsonObj.get("network_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `network_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network_type").toString())); - } - // validate the optional field `network_type` - if (jsonObj.get("network_type") != null && !jsonObj.get("network_type").isJsonNull()) { - NetworkTypeEnum.validateJsonElement(jsonObj.get("network_type")); - } - // validate the optional field `native_virtual_network` - if (jsonObj.get("native_virtual_network") != null && !jsonObj.get("native_virtual_network").isJsonNull()) { - VirtualNetwork.validateJsonElement(jsonObj.get("native_virtual_network")); - } - if (jsonObj.get("virtual_networks") != null && !jsonObj.get("virtual_networks").isJsonNull()) { - JsonArray jsonArrayvirtualNetworks = jsonObj.getAsJsonArray("virtual_networks"); - if (jsonArrayvirtualNetworks != null) { - // ensure the json data is an array - if (!jsonObj.get("virtual_networks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `virtual_networks` to be an array in the JSON string but got `%s`", jsonObj.get("virtual_networks").toString())); - } - - // validate the optional field `virtual_networks` (array) - for (int i = 0; i < jsonArrayvirtualNetworks.size(); i++) { - Href.validateJsonElement(jsonArrayvirtualNetworks.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Port.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Port' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Port.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Port value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Port read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Port instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Port given an JSON string - * - * @param jsonString JSON string - * @return An instance of Port - * @throws IOException if the JSON string is invalid with respect to Port - */ - public static Port fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Port.class); - } - - /** - * Convert an instance of Port to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java deleted file mode 100644 index f197afca3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortAssignInput.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortAssignInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortAssignInput { - public static final String SERIALIZED_NAME_VNID = "vnid"; - @SerializedName(SERIALIZED_NAME_VNID) - private String vnid; - - public PortAssignInput() { - } - - public PortAssignInput vnid(String vnid) { - - this.vnid = vnid; - return this; - } - - /** - * Virtual Network ID. May be the UUID of the Virtual Network record, or the VLAN value itself. - * @return vnid - **/ - @javax.annotation.Nullable - public String getVnid() { - return vnid; - } - - - public void setVnid(String vnid) { - this.vnid = vnid; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortAssignInput instance itself - */ - public PortAssignInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortAssignInput portAssignInput = (PortAssignInput) o; - return Objects.equals(this.vnid, portAssignInput.vnid)&& - Objects.equals(this.additionalProperties, portAssignInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(vnid, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortAssignInput {\n"); - sb.append(" vnid: ").append(toIndentedString(vnid)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("vnid"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortAssignInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortAssignInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortAssignInput is not found in the empty JSON string", PortAssignInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("vnid") != null && !jsonObj.get("vnid").isJsonNull()) && !jsonObj.get("vnid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vnid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vnid").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortAssignInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortAssignInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortAssignInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortAssignInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortAssignInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortAssignInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortAssignInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortAssignInput - * @throws IOException if the JSON string is invalid with respect to PortAssignInput - */ - public static PortAssignInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortAssignInput.class); - } - - /** - * Convert an instance of PortAssignInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java deleted file mode 100644 index 5eb614f6d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3Input.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PortConvertLayer3InputRequestIpsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortConvertLayer3Input - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortConvertLayer3Input { - public static final String SERIALIZED_NAME_REQUEST_IPS = "request_ips"; - @SerializedName(SERIALIZED_NAME_REQUEST_IPS) - private List requestIps; - - public PortConvertLayer3Input() { - } - - public PortConvertLayer3Input requestIps(List requestIps) { - - this.requestIps = requestIps; - return this; - } - - public PortConvertLayer3Input addRequestIpsItem(PortConvertLayer3InputRequestIpsInner requestIpsItem) { - if (this.requestIps == null) { - this.requestIps = new ArrayList<>(); - } - this.requestIps.add(requestIpsItem); - return this; - } - - /** - * Get requestIps - * @return requestIps - **/ - @javax.annotation.Nullable - public List getRequestIps() { - return requestIps; - } - - - public void setRequestIps(List requestIps) { - this.requestIps = requestIps; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortConvertLayer3Input instance itself - */ - public PortConvertLayer3Input putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortConvertLayer3Input portConvertLayer3Input = (PortConvertLayer3Input) o; - return Objects.equals(this.requestIps, portConvertLayer3Input.requestIps)&& - Objects.equals(this.additionalProperties, portConvertLayer3Input.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(requestIps, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortConvertLayer3Input {\n"); - sb.append(" requestIps: ").append(toIndentedString(requestIps)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("request_ips"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortConvertLayer3Input - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortConvertLayer3Input.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortConvertLayer3Input is not found in the empty JSON string", PortConvertLayer3Input.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("request_ips") != null && !jsonObj.get("request_ips").isJsonNull()) { - JsonArray jsonArrayrequestIps = jsonObj.getAsJsonArray("request_ips"); - if (jsonArrayrequestIps != null) { - // ensure the json data is an array - if (!jsonObj.get("request_ips").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `request_ips` to be an array in the JSON string but got `%s`", jsonObj.get("request_ips").toString())); - } - - // validate the optional field `request_ips` (array) - for (int i = 0; i < jsonArrayrequestIps.size(); i++) { - PortConvertLayer3InputRequestIpsInner.validateJsonElement(jsonArrayrequestIps.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortConvertLayer3Input.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortConvertLayer3Input' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortConvertLayer3Input.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortConvertLayer3Input value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortConvertLayer3Input read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortConvertLayer3Input instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortConvertLayer3Input given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortConvertLayer3Input - * @throws IOException if the JSON string is invalid with respect to PortConvertLayer3Input - */ - public static PortConvertLayer3Input fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortConvertLayer3Input.class); - } - - /** - * Convert an instance of PortConvertLayer3Input to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java deleted file mode 100644 index 76a67c5e9..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInner.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortConvertLayer3InputRequestIpsInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortConvertLayer3InputRequestIpsInner { - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private Integer addressFamily; - - public static final String SERIALIZED_NAME_PUBLIC = "public"; - @SerializedName(SERIALIZED_NAME_PUBLIC) - private Boolean _public; - - public PortConvertLayer3InputRequestIpsInner() { - } - - public PortConvertLayer3InputRequestIpsInner addressFamily(Integer addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Get addressFamily - * @return addressFamily - **/ - @javax.annotation.Nullable - public Integer getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(Integer addressFamily) { - this.addressFamily = addressFamily; - } - - - public PortConvertLayer3InputRequestIpsInner _public(Boolean _public) { - - this._public = _public; - return this; - } - - /** - * Get _public - * @return _public - **/ - @javax.annotation.Nullable - public Boolean getPublic() { - return _public; - } - - - public void setPublic(Boolean _public) { - this._public = _public; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortConvertLayer3InputRequestIpsInner instance itself - */ - public PortConvertLayer3InputRequestIpsInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortConvertLayer3InputRequestIpsInner portConvertLayer3InputRequestIpsInner = (PortConvertLayer3InputRequestIpsInner) o; - return Objects.equals(this.addressFamily, portConvertLayer3InputRequestIpsInner.addressFamily) && - Objects.equals(this._public, portConvertLayer3InputRequestIpsInner._public)&& - Objects.equals(this.additionalProperties, portConvertLayer3InputRequestIpsInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(addressFamily, _public, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortConvertLayer3InputRequestIpsInner {\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address_family"); - openapiFields.add("public"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortConvertLayer3InputRequestIpsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortConvertLayer3InputRequestIpsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortConvertLayer3InputRequestIpsInner is not found in the empty JSON string", PortConvertLayer3InputRequestIpsInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortConvertLayer3InputRequestIpsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortConvertLayer3InputRequestIpsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortConvertLayer3InputRequestIpsInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortConvertLayer3InputRequestIpsInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortConvertLayer3InputRequestIpsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortConvertLayer3InputRequestIpsInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortConvertLayer3InputRequestIpsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortConvertLayer3InputRequestIpsInner - * @throws IOException if the JSON string is invalid with respect to PortConvertLayer3InputRequestIpsInner - */ - public static PortConvertLayer3InputRequestIpsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortConvertLayer3InputRequestIpsInner.class); - } - - /** - * Convert an instance of PortConvertLayer3InputRequestIpsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortData.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortData.java deleted file mode 100644 index ab49ce898..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortData.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortData - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortData { - public static final String SERIALIZED_NAME_MAC = "mac"; - @SerializedName(SERIALIZED_NAME_MAC) - private String mac; - - public static final String SERIALIZED_NAME_BONDED = "bonded"; - @SerializedName(SERIALIZED_NAME_BONDED) - private Boolean bonded; - - public PortData() { - } - - public PortData mac(String mac) { - - this.mac = mac; - return this; - } - - /** - * MAC address is set for NetworkPort ports - * @return mac - **/ - @javax.annotation.Nullable - public String getMac() { - return mac; - } - - - public void setMac(String mac) { - this.mac = mac; - } - - - public PortData bonded(Boolean bonded) { - - this.bonded = bonded; - return this; - } - - /** - * Bonded is true for NetworkPort ports in a bond and NetworkBondPort ports that are active - * @return bonded - **/ - @javax.annotation.Nullable - public Boolean getBonded() { - return bonded; - } - - - public void setBonded(Boolean bonded) { - this.bonded = bonded; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortData instance itself - */ - public PortData putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortData portData = (PortData) o; - return Objects.equals(this.mac, portData.mac) && - Objects.equals(this.bonded, portData.bonded)&& - Objects.equals(this.additionalProperties, portData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(mac, bonded, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortData {\n"); - sb.append(" mac: ").append(toIndentedString(mac)).append("\n"); - sb.append(" bonded: ").append(toIndentedString(bonded)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("mac"); - openapiFields.add("bonded"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortData is not found in the empty JSON string", PortData.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("mac") != null && !jsonObj.get("mac").isJsonNull()) && !jsonObj.get("mac").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mac` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mac").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortData instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortData given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortData - * @throws IOException if the JSON string is invalid with respect to PortData - */ - public static PortData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortData.class); - } - - /** - * Convert an instance of PortData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java deleted file mode 100644 index 27c9b2880..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignment.java +++ /dev/null @@ -1,551 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortVlanAssignment - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortVlanAssignment { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NATIVE = "native"; - @SerializedName(SERIALIZED_NAME_NATIVE) - private Boolean _native; - - public static final String SERIALIZED_NAME_PORT = "port"; - @SerializedName(SERIALIZED_NAME_PORT) - private Href port; - - /** - * Gets or Sets state - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - ASSIGNED("assigned"), - - UNASSIGNING("unassigning"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_VIRTUAL_NETWORK = "virtual_network"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORK) - private Href virtualNetwork; - - public static final String SERIALIZED_NAME_VLAN = "vlan"; - @SerializedName(SERIALIZED_NAME_VLAN) - private Integer vlan; - - public PortVlanAssignment() { - } - - public PortVlanAssignment createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public PortVlanAssignment id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public PortVlanAssignment _native(Boolean _native) { - - this._native = _native; - return this; - } - - /** - * Get _native - * @return _native - **/ - @javax.annotation.Nullable - public Boolean getNative() { - return _native; - } - - - public void setNative(Boolean _native) { - this._native = _native; - } - - - public PortVlanAssignment port(Href port) { - - this.port = port; - return this; - } - - /** - * Get port - * @return port - **/ - @javax.annotation.Nullable - public Href getPort() { - return port; - } - - - public void setPort(Href port) { - this.port = port; - } - - - public PortVlanAssignment state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public PortVlanAssignment updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public PortVlanAssignment virtualNetwork(Href virtualNetwork) { - - this.virtualNetwork = virtualNetwork; - return this; - } - - /** - * Get virtualNetwork - * @return virtualNetwork - **/ - @javax.annotation.Nullable - public Href getVirtualNetwork() { - return virtualNetwork; - } - - - public void setVirtualNetwork(Href virtualNetwork) { - this.virtualNetwork = virtualNetwork; - } - - - public PortVlanAssignment vlan(Integer vlan) { - - this.vlan = vlan; - return this; - } - - /** - * Get vlan - * @return vlan - **/ - @javax.annotation.Nullable - public Integer getVlan() { - return vlan; - } - - - public void setVlan(Integer vlan) { - this.vlan = vlan; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortVlanAssignment instance itself - */ - public PortVlanAssignment putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortVlanAssignment portVlanAssignment = (PortVlanAssignment) o; - return Objects.equals(this.createdAt, portVlanAssignment.createdAt) && - Objects.equals(this.id, portVlanAssignment.id) && - Objects.equals(this._native, portVlanAssignment._native) && - Objects.equals(this.port, portVlanAssignment.port) && - Objects.equals(this.state, portVlanAssignment.state) && - Objects.equals(this.updatedAt, portVlanAssignment.updatedAt) && - Objects.equals(this.virtualNetwork, portVlanAssignment.virtualNetwork) && - Objects.equals(this.vlan, portVlanAssignment.vlan)&& - Objects.equals(this.additionalProperties, portVlanAssignment.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, id, _native, port, state, updatedAt, virtualNetwork, vlan, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortVlanAssignment {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" _native: ").append(toIndentedString(_native)).append("\n"); - sb.append(" port: ").append(toIndentedString(port)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" virtualNetwork: ").append(toIndentedString(virtualNetwork)).append("\n"); - sb.append(" vlan: ").append(toIndentedString(vlan)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("id"); - openapiFields.add("native"); - openapiFields.add("port"); - openapiFields.add("state"); - openapiFields.add("updated_at"); - openapiFields.add("virtual_network"); - openapiFields.add("vlan"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortVlanAssignment - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortVlanAssignment.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignment is not found in the empty JSON string", PortVlanAssignment.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `port` - if (jsonObj.get("port") != null && !jsonObj.get("port").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("port")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - // validate the optional field `virtual_network` - if (jsonObj.get("virtual_network") != null && !jsonObj.get("virtual_network").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("virtual_network")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortVlanAssignment.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortVlanAssignment' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortVlanAssignment.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortVlanAssignment value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortVlanAssignment read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortVlanAssignment instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortVlanAssignment given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortVlanAssignment - * @throws IOException if the JSON string is invalid with respect to PortVlanAssignment - */ - public static PortVlanAssignment fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortVlanAssignment.class); - } - - /** - * Convert an instance of PortVlanAssignment to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java deleted file mode 100644 index dbacd5cd3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatch.java +++ /dev/null @@ -1,621 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Port; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchVlanAssignmentsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortVlanAssignmentBatch - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortVlanAssignmentBatch { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_ERROR_MESSAGES = "error_messages"; - @SerializedName(SERIALIZED_NAME_ERROR_MESSAGES) - private List errorMessages; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_PORT = "port"; - @SerializedName(SERIALIZED_NAME_PORT) - private Port port; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private Integer quantity; - - /** - * Gets or Sets state - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - QUEUED("queued"), - - IN_PROGRESS("in_progress"), - - COMPLETED("completed"), - - FAILED("failed"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_VLAN_ASSIGNMENTS = "vlan_assignments"; - @SerializedName(SERIALIZED_NAME_VLAN_ASSIGNMENTS) - private List vlanAssignments; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public PortVlanAssignmentBatch() { - } - - public PortVlanAssignmentBatch createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public PortVlanAssignmentBatch errorMessages(List errorMessages) { - - this.errorMessages = errorMessages; - return this; - } - - public PortVlanAssignmentBatch addErrorMessagesItem(String errorMessagesItem) { - if (this.errorMessages == null) { - this.errorMessages = new ArrayList<>(); - } - this.errorMessages.add(errorMessagesItem); - return this; - } - - /** - * Get errorMessages - * @return errorMessages - **/ - @javax.annotation.Nullable - public List getErrorMessages() { - return errorMessages; - } - - - public void setErrorMessages(List errorMessages) { - this.errorMessages = errorMessages; - } - - - public PortVlanAssignmentBatch id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public PortVlanAssignmentBatch port(Port port) { - - this.port = port; - return this; - } - - /** - * Get port - * @return port - **/ - @javax.annotation.Nullable - public Port getPort() { - return port; - } - - - public void setPort(Port port) { - this.port = port; - } - - - public PortVlanAssignmentBatch quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - public Integer getQuantity() { - return quantity; - } - - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public PortVlanAssignmentBatch state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public PortVlanAssignmentBatch updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public PortVlanAssignmentBatch vlanAssignments(List vlanAssignments) { - - this.vlanAssignments = vlanAssignments; - return this; - } - - public PortVlanAssignmentBatch addVlanAssignmentsItem(PortVlanAssignmentBatchVlanAssignmentsInner vlanAssignmentsItem) { - if (this.vlanAssignments == null) { - this.vlanAssignments = new ArrayList<>(); - } - this.vlanAssignments.add(vlanAssignmentsItem); - return this; - } - - /** - * Get vlanAssignments - * @return vlanAssignments - **/ - @javax.annotation.Nullable - public List getVlanAssignments() { - return vlanAssignments; - } - - - public void setVlanAssignments(List vlanAssignments) { - this.vlanAssignments = vlanAssignments; - } - - - public PortVlanAssignmentBatch project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortVlanAssignmentBatch instance itself - */ - public PortVlanAssignmentBatch putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortVlanAssignmentBatch portVlanAssignmentBatch = (PortVlanAssignmentBatch) o; - return Objects.equals(this.createdAt, portVlanAssignmentBatch.createdAt) && - Objects.equals(this.errorMessages, portVlanAssignmentBatch.errorMessages) && - Objects.equals(this.id, portVlanAssignmentBatch.id) && - Objects.equals(this.port, portVlanAssignmentBatch.port) && - Objects.equals(this.quantity, portVlanAssignmentBatch.quantity) && - Objects.equals(this.state, portVlanAssignmentBatch.state) && - Objects.equals(this.updatedAt, portVlanAssignmentBatch.updatedAt) && - Objects.equals(this.vlanAssignments, portVlanAssignmentBatch.vlanAssignments) && - Objects.equals(this.project, portVlanAssignmentBatch.project)&& - Objects.equals(this.additionalProperties, portVlanAssignmentBatch.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, errorMessages, id, port, quantity, state, updatedAt, vlanAssignments, project, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortVlanAssignmentBatch {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" port: ").append(toIndentedString(port)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" vlanAssignments: ").append(toIndentedString(vlanAssignments)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("error_messages"); - openapiFields.add("id"); - openapiFields.add("port"); - openapiFields.add("quantity"); - openapiFields.add("state"); - openapiFields.add("updated_at"); - openapiFields.add("vlan_assignments"); - openapiFields.add("project"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortVlanAssignmentBatch - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortVlanAssignmentBatch.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatch is not found in the empty JSON string", PortVlanAssignmentBatch.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("error_messages") != null && !jsonObj.get("error_messages").isJsonNull() && !jsonObj.get("error_messages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `error_messages` to be an array in the JSON string but got `%s`", jsonObj.get("error_messages").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `port` - if (jsonObj.get("port") != null && !jsonObj.get("port").isJsonNull()) { - Port.validateJsonElement(jsonObj.get("port")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - if (jsonObj.get("vlan_assignments") != null && !jsonObj.get("vlan_assignments").isJsonNull()) { - JsonArray jsonArrayvlanAssignments = jsonObj.getAsJsonArray("vlan_assignments"); - if (jsonArrayvlanAssignments != null) { - // ensure the json data is an array - if (!jsonObj.get("vlan_assignments").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `vlan_assignments` to be an array in the JSON string but got `%s`", jsonObj.get("vlan_assignments").toString())); - } - - // validate the optional field `vlan_assignments` (array) - for (int i = 0; i < jsonArrayvlanAssignments.size(); i++) { - PortVlanAssignmentBatchVlanAssignmentsInner.validateJsonElement(jsonArrayvlanAssignments.get(i)); - }; - } - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortVlanAssignmentBatch.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortVlanAssignmentBatch' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortVlanAssignmentBatch.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortVlanAssignmentBatch value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortVlanAssignmentBatch read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortVlanAssignmentBatch instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortVlanAssignmentBatch given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortVlanAssignmentBatch - * @throws IOException if the JSON string is invalid with respect to PortVlanAssignmentBatch - */ - public static PortVlanAssignmentBatch fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortVlanAssignmentBatch.class); - } - - /** - * Convert an instance of PortVlanAssignmentBatch to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java deleted file mode 100644 index 82e202d2f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInput.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchCreateInputVlanAssignmentsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortVlanAssignmentBatchCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortVlanAssignmentBatchCreateInput { - public static final String SERIALIZED_NAME_VLAN_ASSIGNMENTS = "vlan_assignments"; - @SerializedName(SERIALIZED_NAME_VLAN_ASSIGNMENTS) - private List vlanAssignments; - - public PortVlanAssignmentBatchCreateInput() { - } - - public PortVlanAssignmentBatchCreateInput vlanAssignments(List vlanAssignments) { - - this.vlanAssignments = vlanAssignments; - return this; - } - - public PortVlanAssignmentBatchCreateInput addVlanAssignmentsItem(PortVlanAssignmentBatchCreateInputVlanAssignmentsInner vlanAssignmentsItem) { - if (this.vlanAssignments == null) { - this.vlanAssignments = new ArrayList<>(); - } - this.vlanAssignments.add(vlanAssignmentsItem); - return this; - } - - /** - * Get vlanAssignments - * @return vlanAssignments - **/ - @javax.annotation.Nullable - public List getVlanAssignments() { - return vlanAssignments; - } - - - public void setVlanAssignments(List vlanAssignments) { - this.vlanAssignments = vlanAssignments; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortVlanAssignmentBatchCreateInput instance itself - */ - public PortVlanAssignmentBatchCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput = (PortVlanAssignmentBatchCreateInput) o; - return Objects.equals(this.vlanAssignments, portVlanAssignmentBatchCreateInput.vlanAssignments)&& - Objects.equals(this.additionalProperties, portVlanAssignmentBatchCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(vlanAssignments, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortVlanAssignmentBatchCreateInput {\n"); - sb.append(" vlanAssignments: ").append(toIndentedString(vlanAssignments)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("vlan_assignments"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortVlanAssignmentBatchCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortVlanAssignmentBatchCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatchCreateInput is not found in the empty JSON string", PortVlanAssignmentBatchCreateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("vlan_assignments") != null && !jsonObj.get("vlan_assignments").isJsonNull()) { - JsonArray jsonArrayvlanAssignments = jsonObj.getAsJsonArray("vlan_assignments"); - if (jsonArrayvlanAssignments != null) { - // ensure the json data is an array - if (!jsonObj.get("vlan_assignments").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `vlan_assignments` to be an array in the JSON string but got `%s`", jsonObj.get("vlan_assignments").toString())); - } - - // validate the optional field `vlan_assignments` (array) - for (int i = 0; i < jsonArrayvlanAssignments.size(); i++) { - PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.validateJsonElement(jsonArrayvlanAssignments.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortVlanAssignmentBatchCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortVlanAssignmentBatchCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortVlanAssignmentBatchCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortVlanAssignmentBatchCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortVlanAssignmentBatchCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortVlanAssignmentBatchCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortVlanAssignmentBatchCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortVlanAssignmentBatchCreateInput - * @throws IOException if the JSON string is invalid with respect to PortVlanAssignmentBatchCreateInput - */ - public static PortVlanAssignmentBatchCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortVlanAssignmentBatchCreateInput.class); - } - - /** - * Convert an instance of PortVlanAssignmentBatchCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java deleted file mode 100644 index b277d0abf..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.java +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortVlanAssignmentBatchCreateInputVlanAssignmentsInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortVlanAssignmentBatchCreateInputVlanAssignmentsInner { - public static final String SERIALIZED_NAME_NATIVE = "native"; - @SerializedName(SERIALIZED_NAME_NATIVE) - private Boolean _native; - - /** - * Gets or Sets state - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - ASSIGNED("assigned"), - - UNASSIGNED("unassigned"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_VLAN = "vlan"; - @SerializedName(SERIALIZED_NAME_VLAN) - private String vlan; - - public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner() { - } - - public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner _native(Boolean _native) { - - this._native = _native; - return this; - } - - /** - * Get _native - * @return _native - **/ - @javax.annotation.Nullable - public Boolean getNative() { - return _native; - } - - - public void setNative(Boolean _native) { - this._native = _native; - } - - - public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner vlan(String vlan) { - - this.vlan = vlan; - return this; - } - - /** - * Get vlan - * @return vlan - **/ - @javax.annotation.Nullable - public String getVlan() { - return vlan; - } - - - public void setVlan(String vlan) { - this.vlan = vlan; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortVlanAssignmentBatchCreateInputVlanAssignmentsInner instance itself - */ - public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortVlanAssignmentBatchCreateInputVlanAssignmentsInner portVlanAssignmentBatchCreateInputVlanAssignmentsInner = (PortVlanAssignmentBatchCreateInputVlanAssignmentsInner) o; - return Objects.equals(this._native, portVlanAssignmentBatchCreateInputVlanAssignmentsInner._native) && - Objects.equals(this.state, portVlanAssignmentBatchCreateInputVlanAssignmentsInner.state) && - Objects.equals(this.vlan, portVlanAssignmentBatchCreateInputVlanAssignmentsInner.vlan)&& - Objects.equals(this.additionalProperties, portVlanAssignmentBatchCreateInputVlanAssignmentsInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(_native, state, vlan, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortVlanAssignmentBatchCreateInputVlanAssignmentsInner {\n"); - sb.append(" _native: ").append(toIndentedString(_native)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" vlan: ").append(toIndentedString(vlan)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("native"); - openapiFields.add("state"); - openapiFields.add("vlan"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortVlanAssignmentBatchCreateInputVlanAssignmentsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatchCreateInputVlanAssignmentsInner is not found in the empty JSON string", PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - if ((jsonObj.get("vlan") != null && !jsonObj.get("vlan").isJsonNull()) && !jsonObj.get("vlan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vlan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vlan").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortVlanAssignmentBatchCreateInputVlanAssignmentsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortVlanAssignmentBatchCreateInputVlanAssignmentsInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortVlanAssignmentBatchCreateInputVlanAssignmentsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortVlanAssignmentBatchCreateInputVlanAssignmentsInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortVlanAssignmentBatchCreateInputVlanAssignmentsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortVlanAssignmentBatchCreateInputVlanAssignmentsInner - * @throws IOException if the JSON string is invalid with respect to PortVlanAssignmentBatchCreateInputVlanAssignmentsInner - */ - public static PortVlanAssignmentBatchCreateInputVlanAssignmentsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortVlanAssignmentBatchCreateInputVlanAssignmentsInner.class); - } - - /** - * Convert an instance of PortVlanAssignmentBatchCreateInputVlanAssignmentsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java deleted file mode 100644 index 0c23994e0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatch; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortVlanAssignmentBatchList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortVlanAssignmentBatchList { - public static final String SERIALIZED_NAME_BATCHES = "batches"; - @SerializedName(SERIALIZED_NAME_BATCHES) - private List batches; - - public PortVlanAssignmentBatchList() { - } - - public PortVlanAssignmentBatchList batches(List batches) { - - this.batches = batches; - return this; - } - - public PortVlanAssignmentBatchList addBatchesItem(PortVlanAssignmentBatch batchesItem) { - if (this.batches == null) { - this.batches = new ArrayList<>(); - } - this.batches.add(batchesItem); - return this; - } - - /** - * Get batches - * @return batches - **/ - @javax.annotation.Nullable - public List getBatches() { - return batches; - } - - - public void setBatches(List batches) { - this.batches = batches; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortVlanAssignmentBatchList instance itself - */ - public PortVlanAssignmentBatchList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortVlanAssignmentBatchList portVlanAssignmentBatchList = (PortVlanAssignmentBatchList) o; - return Objects.equals(this.batches, portVlanAssignmentBatchList.batches)&& - Objects.equals(this.additionalProperties, portVlanAssignmentBatchList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(batches, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortVlanAssignmentBatchList {\n"); - sb.append(" batches: ").append(toIndentedString(batches)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("batches"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortVlanAssignmentBatchList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortVlanAssignmentBatchList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatchList is not found in the empty JSON string", PortVlanAssignmentBatchList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("batches") != null && !jsonObj.get("batches").isJsonNull()) { - JsonArray jsonArraybatches = jsonObj.getAsJsonArray("batches"); - if (jsonArraybatches != null) { - // ensure the json data is an array - if (!jsonObj.get("batches").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `batches` to be an array in the JSON string but got `%s`", jsonObj.get("batches").toString())); - } - - // validate the optional field `batches` (array) - for (int i = 0; i < jsonArraybatches.size(); i++) { - PortVlanAssignmentBatch.validateJsonElement(jsonArraybatches.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortVlanAssignmentBatchList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortVlanAssignmentBatchList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortVlanAssignmentBatchList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortVlanAssignmentBatchList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortVlanAssignmentBatchList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortVlanAssignmentBatchList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortVlanAssignmentBatchList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortVlanAssignmentBatchList - * @throws IOException if the JSON string is invalid with respect to PortVlanAssignmentBatchList - */ - public static PortVlanAssignmentBatchList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortVlanAssignmentBatchList.class); - } - - /** - * Convert an instance of PortVlanAssignmentBatchList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java deleted file mode 100644 index 0a0982e97..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInner.java +++ /dev/null @@ -1,429 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortVlanAssignmentBatchVlanAssignmentsInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortVlanAssignmentBatchVlanAssignmentsInner { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NATIVE = "native"; - @SerializedName(SERIALIZED_NAME_NATIVE) - private Boolean _native; - - /** - * Gets or Sets state - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - ASSIGNED("assigned"), - - UNASSIGNED("unassigned"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_VLAN = "vlan"; - @SerializedName(SERIALIZED_NAME_VLAN) - private Integer vlan; - - public PortVlanAssignmentBatchVlanAssignmentsInner() { - } - - public PortVlanAssignmentBatchVlanAssignmentsInner id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public PortVlanAssignmentBatchVlanAssignmentsInner _native(Boolean _native) { - - this._native = _native; - return this; - } - - /** - * Get _native - * @return _native - **/ - @javax.annotation.Nullable - public Boolean getNative() { - return _native; - } - - - public void setNative(Boolean _native) { - this._native = _native; - } - - - public PortVlanAssignmentBatchVlanAssignmentsInner state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public PortVlanAssignmentBatchVlanAssignmentsInner vlan(Integer vlan) { - - this.vlan = vlan; - return this; - } - - /** - * Get vlan - * @return vlan - **/ - @javax.annotation.Nullable - public Integer getVlan() { - return vlan; - } - - - public void setVlan(Integer vlan) { - this.vlan = vlan; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortVlanAssignmentBatchVlanAssignmentsInner instance itself - */ - public PortVlanAssignmentBatchVlanAssignmentsInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortVlanAssignmentBatchVlanAssignmentsInner portVlanAssignmentBatchVlanAssignmentsInner = (PortVlanAssignmentBatchVlanAssignmentsInner) o; - return Objects.equals(this.id, portVlanAssignmentBatchVlanAssignmentsInner.id) && - Objects.equals(this._native, portVlanAssignmentBatchVlanAssignmentsInner._native) && - Objects.equals(this.state, portVlanAssignmentBatchVlanAssignmentsInner.state) && - Objects.equals(this.vlan, portVlanAssignmentBatchVlanAssignmentsInner.vlan)&& - Objects.equals(this.additionalProperties, portVlanAssignmentBatchVlanAssignmentsInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, _native, state, vlan, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortVlanAssignmentBatchVlanAssignmentsInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" _native: ").append(toIndentedString(_native)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" vlan: ").append(toIndentedString(vlan)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("native"); - openapiFields.add("state"); - openapiFields.add("vlan"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortVlanAssignmentBatchVlanAssignmentsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortVlanAssignmentBatchVlanAssignmentsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentBatchVlanAssignmentsInner is not found in the empty JSON string", PortVlanAssignmentBatchVlanAssignmentsInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortVlanAssignmentBatchVlanAssignmentsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortVlanAssignmentBatchVlanAssignmentsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortVlanAssignmentBatchVlanAssignmentsInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortVlanAssignmentBatchVlanAssignmentsInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortVlanAssignmentBatchVlanAssignmentsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortVlanAssignmentBatchVlanAssignmentsInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortVlanAssignmentBatchVlanAssignmentsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortVlanAssignmentBatchVlanAssignmentsInner - * @throws IOException if the JSON string is invalid with respect to PortVlanAssignmentBatchVlanAssignmentsInner - */ - public static PortVlanAssignmentBatchVlanAssignmentsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortVlanAssignmentBatchVlanAssignmentsInner.class); - } - - /** - * Convert an instance of PortVlanAssignmentBatchVlanAssignmentsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java deleted file mode 100644 index a4bec91e4..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.PortVlanAssignment; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * PortVlanAssignmentList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PortVlanAssignmentList { - public static final String SERIALIZED_NAME_VLAN_ASSIGNMENTS = "vlan_assignments"; - @SerializedName(SERIALIZED_NAME_VLAN_ASSIGNMENTS) - private List vlanAssignments; - - public PortVlanAssignmentList() { - } - - public PortVlanAssignmentList vlanAssignments(List vlanAssignments) { - - this.vlanAssignments = vlanAssignments; - return this; - } - - public PortVlanAssignmentList addVlanAssignmentsItem(PortVlanAssignment vlanAssignmentsItem) { - if (this.vlanAssignments == null) { - this.vlanAssignments = new ArrayList<>(); - } - this.vlanAssignments.add(vlanAssignmentsItem); - return this; - } - - /** - * Get vlanAssignments - * @return vlanAssignments - **/ - @javax.annotation.Nullable - public List getVlanAssignments() { - return vlanAssignments; - } - - - public void setVlanAssignments(List vlanAssignments) { - this.vlanAssignments = vlanAssignments; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the PortVlanAssignmentList instance itself - */ - public PortVlanAssignmentList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PortVlanAssignmentList portVlanAssignmentList = (PortVlanAssignmentList) o; - return Objects.equals(this.vlanAssignments, portVlanAssignmentList.vlanAssignments)&& - Objects.equals(this.additionalProperties, portVlanAssignmentList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(vlanAssignments, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PortVlanAssignmentList {\n"); - sb.append(" vlanAssignments: ").append(toIndentedString(vlanAssignments)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("vlan_assignments"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PortVlanAssignmentList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PortVlanAssignmentList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PortVlanAssignmentList is not found in the empty JSON string", PortVlanAssignmentList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("vlan_assignments") != null && !jsonObj.get("vlan_assignments").isJsonNull()) { - JsonArray jsonArrayvlanAssignments = jsonObj.getAsJsonArray("vlan_assignments"); - if (jsonArrayvlanAssignments != null) { - // ensure the json data is an array - if (!jsonObj.get("vlan_assignments").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `vlan_assignments` to be an array in the JSON string but got `%s`", jsonObj.get("vlan_assignments").toString())); - } - - // validate the optional field `vlan_assignments` (array) - for (int i = 0; i < jsonArrayvlanAssignments.size(); i++) { - PortVlanAssignment.validateJsonElement(jsonArrayvlanAssignments.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PortVlanAssignmentList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PortVlanAssignmentList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PortVlanAssignmentList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PortVlanAssignmentList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public PortVlanAssignmentList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - PortVlanAssignmentList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PortVlanAssignmentList given an JSON string - * - * @param jsonString JSON string - * @return An instance of PortVlanAssignmentList - * @throws IOException if the JSON string is invalid with respect to PortVlanAssignmentList - */ - public static PortVlanAssignmentList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PortVlanAssignmentList.class); - } - - /** - * Convert an instance of PortVlanAssignmentList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java deleted file mode 100644 index 5b3c21458..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Project.java +++ /dev/null @@ -1,985 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Organization; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Project - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Project { - public static final String SERIALIZED_NAME_BGP_CONFIG = "bgp_config"; - @SerializedName(SERIALIZED_NAME_BGP_CONFIG) - private Href bgpConfig; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DEVICES = "devices"; - @SerializedName(SERIALIZED_NAME_DEVICES) - private List devices; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_INVITATIONS = "invitations"; - @SerializedName(SERIALIZED_NAME_INVITATIONS) - private List invitations; - - public static final String SERIALIZED_NAME_MAX_DEVICES = "max_devices"; - @SerializedName(SERIALIZED_NAME_MAX_DEVICES) - private Object maxDevices; - - public static final String SERIALIZED_NAME_MEMBERS = "members"; - @SerializedName(SERIALIZED_NAME_MEMBERS) - private List members; - - public static final String SERIALIZED_NAME_MEMBERSHIPS = "memberships"; - @SerializedName(SERIALIZED_NAME_MEMBERSHIPS) - private List memberships; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NETWORK_STATUS = "network_status"; - @SerializedName(SERIALIZED_NAME_NETWORK_STATUS) - private Object networkStatus; - - public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION) - private Organization organization; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD = "payment_method"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) - private Href paymentMethod; - - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_VOLUMES = "volumes"; - @SerializedName(SERIALIZED_NAME_VOLUMES) - private List volumes; - - /** - * The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEFAULT("default"), - - VMCE("vmce"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public Project() { - } - - public Project bgpConfig(Href bgpConfig) { - - this.bgpConfig = bgpConfig; - return this; - } - - /** - * Get bgpConfig - * @return bgpConfig - **/ - @javax.annotation.Nullable - public Href getBgpConfig() { - return bgpConfig; - } - - - public void setBgpConfig(Href bgpConfig) { - this.bgpConfig = bgpConfig; - } - - - public Project createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Project customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public Project devices(List devices) { - - this.devices = devices; - return this; - } - - public Project addDevicesItem(Href devicesItem) { - if (this.devices == null) { - this.devices = new ArrayList<>(); - } - this.devices.add(devicesItem); - return this; - } - - /** - * Get devices - * @return devices - **/ - @javax.annotation.Nullable - public List getDevices() { - return devices; - } - - - public void setDevices(List devices) { - this.devices = devices; - } - - - public Project id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Project invitations(List invitations) { - - this.invitations = invitations; - return this; - } - - public Project addInvitationsItem(Href invitationsItem) { - if (this.invitations == null) { - this.invitations = new ArrayList<>(); - } - this.invitations.add(invitationsItem); - return this; - } - - /** - * Get invitations - * @return invitations - **/ - @javax.annotation.Nullable - public List getInvitations() { - return invitations; - } - - - public void setInvitations(List invitations) { - this.invitations = invitations; - } - - - public Project maxDevices(Object maxDevices) { - - this.maxDevices = maxDevices; - return this; - } - - /** - * Get maxDevices - * @return maxDevices - **/ - @javax.annotation.Nullable - public Object getMaxDevices() { - return maxDevices; - } - - - public void setMaxDevices(Object maxDevices) { - this.maxDevices = maxDevices; - } - - - public Project members(List members) { - - this.members = members; - return this; - } - - public Project addMembersItem(Href membersItem) { - if (this.members == null) { - this.members = new ArrayList<>(); - } - this.members.add(membersItem); - return this; - } - - /** - * Get members - * @return members - **/ - @javax.annotation.Nullable - public List getMembers() { - return members; - } - - - public void setMembers(List members) { - this.members = members; - } - - - public Project memberships(List memberships) { - - this.memberships = memberships; - return this; - } - - public Project addMembershipsItem(Href membershipsItem) { - if (this.memberships == null) { - this.memberships = new ArrayList<>(); - } - this.memberships.add(membershipsItem); - return this; - } - - /** - * Get memberships - * @return memberships - **/ - @javax.annotation.Nullable - public List getMemberships() { - return memberships; - } - - - public void setMemberships(List memberships) { - this.memberships = memberships; - } - - - public Project name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Project networkStatus(Object networkStatus) { - - this.networkStatus = networkStatus; - return this; - } - - /** - * Get networkStatus - * @return networkStatus - **/ - @javax.annotation.Nullable - public Object getNetworkStatus() { - return networkStatus; - } - - - public void setNetworkStatus(Object networkStatus) { - this.networkStatus = networkStatus; - } - - - public Project organization(Organization organization) { - - this.organization = organization; - return this; - } - - /** - * Get organization - * @return organization - **/ - @javax.annotation.Nullable - public Organization getOrganization() { - return organization; - } - - - public void setOrganization(Organization organization) { - this.organization = organization; - } - - - public Project paymentMethod(Href paymentMethod) { - - this.paymentMethod = paymentMethod; - return this; - } - - /** - * Get paymentMethod - * @return paymentMethod - **/ - @javax.annotation.Nullable - public Href getPaymentMethod() { - return paymentMethod; - } - - - public void setPaymentMethod(Href paymentMethod) { - this.paymentMethod = paymentMethod; - } - - - public Project sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public Project addSshKeysItem(Href sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * Get sshKeys - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - - public Project updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Project volumes(List volumes) { - - this.volumes = volumes; - return this; - } - - public Project addVolumesItem(Href volumesItem) { - if (this.volumes == null) { - this.volumes = new ArrayList<>(); - } - this.volumes.add(volumesItem); - return this; - } - - /** - * Get volumes - * @return volumes - **/ - @javax.annotation.Nullable - public List getVolumes() { - return volumes; - } - - - public void setVolumes(List volumes) { - this.volumes = volumes; - } - - - public Project type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * The type of the project. Projects of type `vmce` are part of an in development feature and not available to all customers. - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Project tags(List tags) { - - this.tags = tags; - return this; - } - - public Project addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Project instance itself - */ - public Project putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Project project = (Project) o; - return Objects.equals(this.bgpConfig, project.bgpConfig) && - Objects.equals(this.createdAt, project.createdAt) && - Objects.equals(this.customdata, project.customdata) && - Objects.equals(this.devices, project.devices) && - Objects.equals(this.id, project.id) && - Objects.equals(this.invitations, project.invitations) && - Objects.equals(this.maxDevices, project.maxDevices) && - Objects.equals(this.members, project.members) && - Objects.equals(this.memberships, project.memberships) && - Objects.equals(this.name, project.name) && - Objects.equals(this.networkStatus, project.networkStatus) && - Objects.equals(this.organization, project.organization) && - Objects.equals(this.paymentMethod, project.paymentMethod) && - Objects.equals(this.sshKeys, project.sshKeys) && - Objects.equals(this.updatedAt, project.updatedAt) && - Objects.equals(this.volumes, project.volumes) && - Objects.equals(this.type, project.type) && - Objects.equals(this.tags, project.tags)&& - Objects.equals(this.additionalProperties, project.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bgpConfig, createdAt, customdata, devices, id, invitations, maxDevices, members, memberships, name, networkStatus, organization, paymentMethod, sshKeys, updatedAt, volumes, type, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Project {\n"); - sb.append(" bgpConfig: ").append(toIndentedString(bgpConfig)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" devices: ").append(toIndentedString(devices)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" invitations: ").append(toIndentedString(invitations)).append("\n"); - sb.append(" maxDevices: ").append(toIndentedString(maxDevices)).append("\n"); - sb.append(" members: ").append(toIndentedString(members)).append("\n"); - sb.append(" memberships: ").append(toIndentedString(memberships)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" networkStatus: ").append(toIndentedString(networkStatus)).append("\n"); - sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bgp_config"); - openapiFields.add("created_at"); - openapiFields.add("customdata"); - openapiFields.add("devices"); - openapiFields.add("id"); - openapiFields.add("invitations"); - openapiFields.add("max_devices"); - openapiFields.add("members"); - openapiFields.add("memberships"); - openapiFields.add("name"); - openapiFields.add("network_status"); - openapiFields.add("organization"); - openapiFields.add("payment_method"); - openapiFields.add("ssh_keys"); - openapiFields.add("updated_at"); - openapiFields.add("volumes"); - openapiFields.add("type"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Project - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Project.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Project is not found in the empty JSON string", Project.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `bgp_config` - if (jsonObj.get("bgp_config") != null && !jsonObj.get("bgp_config").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("bgp_config")); - } - if (jsonObj.get("devices") != null && !jsonObj.get("devices").isJsonNull()) { - JsonArray jsonArraydevices = jsonObj.getAsJsonArray("devices"); - if (jsonArraydevices != null) { - // ensure the json data is an array - if (!jsonObj.get("devices").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); - } - - // validate the optional field `devices` (array) - for (int i = 0; i < jsonArraydevices.size(); i++) { - Href.validateJsonElement(jsonArraydevices.get(i)); - }; - } - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (jsonObj.get("invitations") != null && !jsonObj.get("invitations").isJsonNull()) { - JsonArray jsonArrayinvitations = jsonObj.getAsJsonArray("invitations"); - if (jsonArrayinvitations != null) { - // ensure the json data is an array - if (!jsonObj.get("invitations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `invitations` to be an array in the JSON string but got `%s`", jsonObj.get("invitations").toString())); - } - - // validate the optional field `invitations` (array) - for (int i = 0; i < jsonArrayinvitations.size(); i++) { - Href.validateJsonElement(jsonArrayinvitations.get(i)); - }; - } - } - if (jsonObj.get("members") != null && !jsonObj.get("members").isJsonNull()) { - JsonArray jsonArraymembers = jsonObj.getAsJsonArray("members"); - if (jsonArraymembers != null) { - // ensure the json data is an array - if (!jsonObj.get("members").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `members` to be an array in the JSON string but got `%s`", jsonObj.get("members").toString())); - } - - // validate the optional field `members` (array) - for (int i = 0; i < jsonArraymembers.size(); i++) { - Href.validateJsonElement(jsonArraymembers.get(i)); - }; - } - } - if (jsonObj.get("memberships") != null && !jsonObj.get("memberships").isJsonNull()) { - JsonArray jsonArraymemberships = jsonObj.getAsJsonArray("memberships"); - if (jsonArraymemberships != null) { - // ensure the json data is an array - if (!jsonObj.get("memberships").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `memberships` to be an array in the JSON string but got `%s`", jsonObj.get("memberships").toString())); - } - - // validate the optional field `memberships` (array) - for (int i = 0; i < jsonArraymemberships.size(); i++) { - Href.validateJsonElement(jsonArraymemberships.get(i)); - }; - } - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `organization` - if (jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) { - Organization.validateJsonElement(jsonObj.get("organization")); - } - // validate the optional field `payment_method` - if (jsonObj.get("payment_method") != null && !jsonObj.get("payment_method").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("payment_method")); - } - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { - JsonArray jsonArraysshKeys = jsonObj.getAsJsonArray("ssh_keys"); - if (jsonArraysshKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - - // validate the optional field `ssh_keys` (array) - for (int i = 0; i < jsonArraysshKeys.size(); i++) { - Href.validateJsonElement(jsonArraysshKeys.get(i)); - }; - } - } - if (jsonObj.get("volumes") != null && !jsonObj.get("volumes").isJsonNull()) { - JsonArray jsonArrayvolumes = jsonObj.getAsJsonArray("volumes"); - if (jsonArrayvolumes != null) { - // ensure the json data is an array - if (!jsonObj.get("volumes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `volumes` to be an array in the JSON string but got `%s`", jsonObj.get("volumes").toString())); - } - - // validate the optional field `volumes` (array) - for (int i = 0; i < jsonArrayvolumes.size(); i++) { - Href.validateJsonElement(jsonArrayvolumes.get(i)); - }; - } - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Project.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Project' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Project.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Project value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Project read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Project instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Project given an JSON string - * - * @param jsonString JSON string - * @return An instance of Project - * @throws IOException if the JSON string is invalid with respect to Project - */ - public static Project fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Project.class); - } - - /** - * Convert an instance of Project to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java deleted file mode 100644 index 60ebac648..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInput.java +++ /dev/null @@ -1,513 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ProjectCreateFromRootInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProjectCreateFromRootInput { - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organization_id"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) - private UUID organizationId; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD_ID = "payment_method_id"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_ID) - private UUID paymentMethodId; - - /** - * The type of the project. If no type is specified the project type will automatically be `default` Projects of type 'vmce' are part of an in development feature and not available to all customers. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEFAULT("default"), - - VMCE("vmce"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public ProjectCreateFromRootInput() { - } - - public ProjectCreateFromRootInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public ProjectCreateFromRootInput name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public ProjectCreateFromRootInput organizationId(UUID organizationId) { - - this.organizationId = organizationId; - return this; - } - - /** - * Get organizationId - * @return organizationId - **/ - @javax.annotation.Nullable - public UUID getOrganizationId() { - return organizationId; - } - - - public void setOrganizationId(UUID organizationId) { - this.organizationId = organizationId; - } - - - public ProjectCreateFromRootInput paymentMethodId(UUID paymentMethodId) { - - this.paymentMethodId = paymentMethodId; - return this; - } - - /** - * Get paymentMethodId - * @return paymentMethodId - **/ - @javax.annotation.Nullable - public UUID getPaymentMethodId() { - return paymentMethodId; - } - - - public void setPaymentMethodId(UUID paymentMethodId) { - this.paymentMethodId = paymentMethodId; - } - - - public ProjectCreateFromRootInput type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * The type of the project. If no type is specified the project type will automatically be `default` Projects of type 'vmce' are part of an in development feature and not available to all customers. - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public ProjectCreateFromRootInput tags(List tags) { - - this.tags = tags; - return this; - } - - public ProjectCreateFromRootInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ProjectCreateFromRootInput instance itself - */ - public ProjectCreateFromRootInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProjectCreateFromRootInput projectCreateFromRootInput = (ProjectCreateFromRootInput) o; - return Objects.equals(this.customdata, projectCreateFromRootInput.customdata) && - Objects.equals(this.name, projectCreateFromRootInput.name) && - Objects.equals(this.organizationId, projectCreateFromRootInput.organizationId) && - Objects.equals(this.paymentMethodId, projectCreateFromRootInput.paymentMethodId) && - Objects.equals(this.type, projectCreateFromRootInput.type) && - Objects.equals(this.tags, projectCreateFromRootInput.tags)&& - Objects.equals(this.additionalProperties, projectCreateFromRootInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(customdata, name, organizationId, paymentMethodId, type, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProjectCreateFromRootInput {\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n"); - sb.append(" paymentMethodId: ").append(toIndentedString(paymentMethodId)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customdata"); - openapiFields.add("name"); - openapiFields.add("organization_id"); - openapiFields.add("payment_method_id"); - openapiFields.add("type"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ProjectCreateFromRootInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ProjectCreateFromRootInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectCreateFromRootInput is not found in the empty JSON string", ProjectCreateFromRootInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProjectCreateFromRootInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("organization_id") != null && !jsonObj.get("organization_id").isJsonNull()) && !jsonObj.get("organization_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_id").toString())); - } - if ((jsonObj.get("payment_method_id") != null && !jsonObj.get("payment_method_id").isJsonNull()) && !jsonObj.get("payment_method_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `payment_method_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payment_method_id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProjectCreateFromRootInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProjectCreateFromRootInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ProjectCreateFromRootInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ProjectCreateFromRootInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ProjectCreateFromRootInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ProjectCreateFromRootInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ProjectCreateFromRootInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProjectCreateFromRootInput - * @throws IOException if the JSON string is invalid with respect to ProjectCreateFromRootInput - */ - public static ProjectCreateFromRootInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProjectCreateFromRootInput.class); - } - - /** - * Convert an instance of ProjectCreateFromRootInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java deleted file mode 100644 index de0d248e0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectCreateInput.java +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ProjectCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProjectCreateInput { - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD_ID = "payment_method_id"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_ID) - private UUID paymentMethodId; - - /** - * The type of the project. If no type is specified the project type will automatically be `default` Projects of type 'vmce' are part of an in development feature and not available to all customers. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - DEFAULT("default"), - - VMCE("vmce"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public ProjectCreateInput() { - } - - public ProjectCreateInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public ProjectCreateInput name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public ProjectCreateInput paymentMethodId(UUID paymentMethodId) { - - this.paymentMethodId = paymentMethodId; - return this; - } - - /** - * Get paymentMethodId - * @return paymentMethodId - **/ - @javax.annotation.Nullable - public UUID getPaymentMethodId() { - return paymentMethodId; - } - - - public void setPaymentMethodId(UUID paymentMethodId) { - this.paymentMethodId = paymentMethodId; - } - - - public ProjectCreateInput type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * The type of the project. If no type is specified the project type will automatically be `default` Projects of type 'vmce' are part of an in development feature and not available to all customers. - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public ProjectCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public ProjectCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ProjectCreateInput instance itself - */ - public ProjectCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProjectCreateInput projectCreateInput = (ProjectCreateInput) o; - return Objects.equals(this.customdata, projectCreateInput.customdata) && - Objects.equals(this.name, projectCreateInput.name) && - Objects.equals(this.paymentMethodId, projectCreateInput.paymentMethodId) && - Objects.equals(this.type, projectCreateInput.type) && - Objects.equals(this.tags, projectCreateInput.tags)&& - Objects.equals(this.additionalProperties, projectCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(customdata, name, paymentMethodId, type, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProjectCreateInput {\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" paymentMethodId: ").append(toIndentedString(paymentMethodId)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customdata"); - openapiFields.add("name"); - openapiFields.add("payment_method_id"); - openapiFields.add("type"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ProjectCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ProjectCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectCreateInput is not found in the empty JSON string", ProjectCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ProjectCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("payment_method_id") != null && !jsonObj.get("payment_method_id").isJsonNull()) && !jsonObj.get("payment_method_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `payment_method_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payment_method_id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProjectCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProjectCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ProjectCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ProjectCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ProjectCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ProjectCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ProjectCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProjectCreateInput - * @throws IOException if the JSON string is invalid with respect to ProjectCreateInput - */ - public static ProjectCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProjectCreateInput.class); - } - - /** - * Convert an instance of ProjectCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectIdName.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectIdName.java deleted file mode 100644 index 71e499bb3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectIdName.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ProjectIdName - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProjectIdName { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public ProjectIdName() { - } - - public ProjectIdName id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public ProjectIdName name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ProjectIdName instance itself - */ - public ProjectIdName putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProjectIdName projectIdName = (ProjectIdName) o; - return Objects.equals(this.id, projectIdName.id) && - Objects.equals(this.name, projectIdName.name)&& - Objects.equals(this.additionalProperties, projectIdName.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProjectIdName {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ProjectIdName - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ProjectIdName.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectIdName is not found in the empty JSON string", ProjectIdName.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProjectIdName.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProjectIdName' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ProjectIdName.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ProjectIdName value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ProjectIdName read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ProjectIdName instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ProjectIdName given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProjectIdName - * @throws IOException if the JSON string is invalid with respect to ProjectIdName - */ - public static ProjectIdName fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProjectIdName.class); - } - - /** - * Convert an instance of ProjectIdName to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java deleted file mode 100644 index b3452a85c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.Project; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ProjectList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProjectList { - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public static final String SERIALIZED_NAME_PROJECTS = "projects"; - @SerializedName(SERIALIZED_NAME_PROJECTS) - private List projects; - - public ProjectList() { - } - - public ProjectList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - - public ProjectList projects(List projects) { - - this.projects = projects; - return this; - } - - public ProjectList addProjectsItem(Project projectsItem) { - if (this.projects == null) { - this.projects = new ArrayList<>(); - } - this.projects.add(projectsItem); - return this; - } - - /** - * Get projects - * @return projects - **/ - @javax.annotation.Nullable - public List getProjects() { - return projects; - } - - - public void setProjects(List projects) { - this.projects = projects; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ProjectList instance itself - */ - public ProjectList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProjectList projectList = (ProjectList) o; - return Objects.equals(this.meta, projectList.meta) && - Objects.equals(this.projects, projectList.projects)&& - Objects.equals(this.additionalProperties, projectList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(meta, projects, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProjectList {\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" projects: ").append(toIndentedString(projects)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("meta"); - openapiFields.add("projects"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ProjectList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ProjectList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectList is not found in the empty JSON string", ProjectList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - if (jsonObj.get("projects") != null && !jsonObj.get("projects").isJsonNull()) { - JsonArray jsonArrayprojects = jsonObj.getAsJsonArray("projects"); - if (jsonArrayprojects != null) { - // ensure the json data is an array - if (!jsonObj.get("projects").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `projects` to be an array in the JSON string but got `%s`", jsonObj.get("projects").toString())); - } - - // validate the optional field `projects` (array) - for (int i = 0; i < jsonArrayprojects.size(); i++) { - Project.validateJsonElement(jsonArrayprojects.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProjectList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProjectList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ProjectList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ProjectList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ProjectList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ProjectList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ProjectList given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProjectList - * @throws IOException if the JSON string is invalid with respect to ProjectList - */ - public static ProjectList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProjectList.class); - } - - /** - * Convert an instance of ProjectList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java deleted file mode 100644 index cfb50d421..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInput.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ProjectUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProjectUpdateInput { - public static final String SERIALIZED_NAME_BACKEND_TRANSFER_ENABLED = "backend_transfer_enabled"; - @SerializedName(SERIALIZED_NAME_BACKEND_TRANSFER_ENABLED) - private Boolean backendTransferEnabled; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PAYMENT_METHOD_ID = "payment_method_id"; - @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_ID) - private UUID paymentMethodId; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public ProjectUpdateInput() { - } - - public ProjectUpdateInput backendTransferEnabled(Boolean backendTransferEnabled) { - - this.backendTransferEnabled = backendTransferEnabled; - return this; - } - - /** - * Get backendTransferEnabled - * @return backendTransferEnabled - **/ - @javax.annotation.Nullable - public Boolean getBackendTransferEnabled() { - return backendTransferEnabled; - } - - - public void setBackendTransferEnabled(Boolean backendTransferEnabled) { - this.backendTransferEnabled = backendTransferEnabled; - } - - - public ProjectUpdateInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public ProjectUpdateInput name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the project. Cannot contain characters encoded in greater than 3 bytes such as emojis. - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public ProjectUpdateInput paymentMethodId(UUID paymentMethodId) { - - this.paymentMethodId = paymentMethodId; - return this; - } - - /** - * Get paymentMethodId - * @return paymentMethodId - **/ - @javax.annotation.Nullable - public UUID getPaymentMethodId() { - return paymentMethodId; - } - - - public void setPaymentMethodId(UUID paymentMethodId) { - this.paymentMethodId = paymentMethodId; - } - - - public ProjectUpdateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public ProjectUpdateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ProjectUpdateInput instance itself - */ - public ProjectUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProjectUpdateInput projectUpdateInput = (ProjectUpdateInput) o; - return Objects.equals(this.backendTransferEnabled, projectUpdateInput.backendTransferEnabled) && - Objects.equals(this.customdata, projectUpdateInput.customdata) && - Objects.equals(this.name, projectUpdateInput.name) && - Objects.equals(this.paymentMethodId, projectUpdateInput.paymentMethodId) && - Objects.equals(this.tags, projectUpdateInput.tags)&& - Objects.equals(this.additionalProperties, projectUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(backendTransferEnabled, customdata, name, paymentMethodId, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProjectUpdateInput {\n"); - sb.append(" backendTransferEnabled: ").append(toIndentedString(backendTransferEnabled)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" paymentMethodId: ").append(toIndentedString(paymentMethodId)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("backend_transfer_enabled"); - openapiFields.add("customdata"); - openapiFields.add("name"); - openapiFields.add("payment_method_id"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ProjectUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ProjectUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectUpdateInput is not found in the empty JSON string", ProjectUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("payment_method_id") != null && !jsonObj.get("payment_method_id").isJsonNull()) && !jsonObj.get("payment_method_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `payment_method_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payment_method_id").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProjectUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProjectUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ProjectUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ProjectUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ProjectUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ProjectUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ProjectUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProjectUpdateInput - * @throws IOException if the JSON string is invalid with respect to ProjectUpdateInput - */ - public static ProjectUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProjectUpdateInput.class); - } - - /** - * Convert an instance of ProjectUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java deleted file mode 100644 index a0c75c7ef..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsage.java +++ /dev/null @@ -1,533 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ProjectUsage - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProjectUsage { - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private String facility; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_PLAN_VERSION = "plan_version"; - @SerializedName(SERIALIZED_NAME_PLAN_VERSION) - private String planVersion; - - public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_PRICE) - private String price; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private String quantity; - - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - private String total; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_UNIT = "unit"; - @SerializedName(SERIALIZED_NAME_UNIT) - private String unit; - - public ProjectUsage() { - } - - public ProjectUsage facility(String facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - **/ - @javax.annotation.Nullable - public String getFacility() { - return facility; - } - - - public void setFacility(String facility) { - this.facility = facility; - } - - - public ProjectUsage name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public ProjectUsage plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * Get plan - * @return plan - **/ - @javax.annotation.Nullable - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public ProjectUsage planVersion(String planVersion) { - - this.planVersion = planVersion; - return this; - } - - /** - * Get planVersion - * @return planVersion - **/ - @javax.annotation.Nullable - public String getPlanVersion() { - return planVersion; - } - - - public void setPlanVersion(String planVersion) { - this.planVersion = planVersion; - } - - - public ProjectUsage price(String price) { - - this.price = price; - return this; - } - - /** - * Get price - * @return price - **/ - @javax.annotation.Nullable - public String getPrice() { - return price; - } - - - public void setPrice(String price) { - this.price = price; - } - - - public ProjectUsage quantity(String quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - public String getQuantity() { - return quantity; - } - - - public void setQuantity(String quantity) { - this.quantity = quantity; - } - - - public ProjectUsage total(String total) { - - this.total = total; - return this; - } - - /** - * Get total - * @return total - **/ - @javax.annotation.Nullable - public String getTotal() { - return total; - } - - - public void setTotal(String total) { - this.total = total; - } - - - public ProjectUsage type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public ProjectUsage unit(String unit) { - - this.unit = unit; - return this; - } - - /** - * Get unit - * @return unit - **/ - @javax.annotation.Nullable - public String getUnit() { - return unit; - } - - - public void setUnit(String unit) { - this.unit = unit; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ProjectUsage instance itself - */ - public ProjectUsage putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProjectUsage projectUsage = (ProjectUsage) o; - return Objects.equals(this.facility, projectUsage.facility) && - Objects.equals(this.name, projectUsage.name) && - Objects.equals(this.plan, projectUsage.plan) && - Objects.equals(this.planVersion, projectUsage.planVersion) && - Objects.equals(this.price, projectUsage.price) && - Objects.equals(this.quantity, projectUsage.quantity) && - Objects.equals(this.total, projectUsage.total) && - Objects.equals(this.type, projectUsage.type) && - Objects.equals(this.unit, projectUsage.unit)&& - Objects.equals(this.additionalProperties, projectUsage.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(facility, name, plan, planVersion, price, quantity, total, type, unit, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProjectUsage {\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" planVersion: ").append(toIndentedString(planVersion)).append("\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("facility"); - openapiFields.add("name"); - openapiFields.add("plan"); - openapiFields.add("plan_version"); - openapiFields.add("price"); - openapiFields.add("quantity"); - openapiFields.add("total"); - openapiFields.add("type"); - openapiFields.add("unit"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ProjectUsage - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ProjectUsage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectUsage is not found in the empty JSON string", ProjectUsage.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) && !jsonObj.get("facility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - if ((jsonObj.get("plan_version") != null && !jsonObj.get("plan_version").isJsonNull()) && !jsonObj.get("plan_version").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan_version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan_version").toString())); - } - if ((jsonObj.get("price") != null && !jsonObj.get("price").isJsonNull()) && !jsonObj.get("price").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `price` to be a primitive type in the JSON string but got `%s`", jsonObj.get("price").toString())); - } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); - } - if ((jsonObj.get("total") != null && !jsonObj.get("total").isJsonNull()) && !jsonObj.get("total").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `total` to be a primitive type in the JSON string but got `%s`", jsonObj.get("total").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("unit") != null && !jsonObj.get("unit").isJsonNull()) && !jsonObj.get("unit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unit").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProjectUsage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProjectUsage' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ProjectUsage.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ProjectUsage value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ProjectUsage read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ProjectUsage instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ProjectUsage given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProjectUsage - * @throws IOException if the JSON string is invalid with respect to ProjectUsage - */ - public static ProjectUsage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProjectUsage.class); - } - - /** - * Convert an instance of ProjectUsage to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java deleted file mode 100644 index da98dbd49..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ProjectUsageList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.ProjectUsage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ProjectUsageList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProjectUsageList { - public static final String SERIALIZED_NAME_USAGES = "usages"; - @SerializedName(SERIALIZED_NAME_USAGES) - private List usages; - - public ProjectUsageList() { - } - - public ProjectUsageList usages(List usages) { - - this.usages = usages; - return this; - } - - public ProjectUsageList addUsagesItem(ProjectUsage usagesItem) { - if (this.usages == null) { - this.usages = new ArrayList<>(); - } - this.usages.add(usagesItem); - return this; - } - - /** - * Get usages - * @return usages - **/ - @javax.annotation.Nullable - public List getUsages() { - return usages; - } - - - public void setUsages(List usages) { - this.usages = usages; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ProjectUsageList instance itself - */ - public ProjectUsageList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProjectUsageList projectUsageList = (ProjectUsageList) o; - return Objects.equals(this.usages, projectUsageList.usages)&& - Objects.equals(this.additionalProperties, projectUsageList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(usages, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProjectUsageList {\n"); - sb.append(" usages: ").append(toIndentedString(usages)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("usages"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ProjectUsageList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ProjectUsageList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProjectUsageList is not found in the empty JSON string", ProjectUsageList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("usages") != null && !jsonObj.get("usages").isJsonNull()) { - JsonArray jsonArrayusages = jsonObj.getAsJsonArray("usages"); - if (jsonArrayusages != null) { - // ensure the json data is an array - if (!jsonObj.get("usages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `usages` to be an array in the JSON string but got `%s`", jsonObj.get("usages").toString())); - } - - // validate the optional field `usages` (array) - for (int i = 0; i < jsonArrayusages.size(); i++) { - ProjectUsage.validateJsonElement(jsonArrayusages.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProjectUsageList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProjectUsageList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ProjectUsageList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ProjectUsageList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ProjectUsageList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ProjectUsageList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ProjectUsageList given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProjectUsageList - * @throws IOException if the JSON string is invalid with respect to ProjectUsageList - */ - public static ProjectUsageList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProjectUsageList.class); - } - - /** - * Convert an instance of ProjectUsageList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Raid.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Raid.java deleted file mode 100644 index d5502e7dc..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Raid.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Raid - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Raid { - public static final String SERIALIZED_NAME_DEVICES = "devices"; - @SerializedName(SERIALIZED_NAME_DEVICES) - private List devices; - - public static final String SERIALIZED_NAME_LEVEL = "level"; - @SerializedName(SERIALIZED_NAME_LEVEL) - private String level; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public Raid() { - } - - public Raid devices(List devices) { - - this.devices = devices; - return this; - } - - public Raid addDevicesItem(String devicesItem) { - if (this.devices == null) { - this.devices = new ArrayList<>(); - } - this.devices.add(devicesItem); - return this; - } - - /** - * Get devices - * @return devices - **/ - @javax.annotation.Nullable - public List getDevices() { - return devices; - } - - - public void setDevices(List devices) { - this.devices = devices; - } - - - public Raid level(String level) { - - this.level = level; - return this; - } - - /** - * Get level - * @return level - **/ - @javax.annotation.Nullable - public String getLevel() { - return level; - } - - - public void setLevel(String level) { - this.level = level; - } - - - public Raid name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Raid instance itself - */ - public Raid putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Raid raid = (Raid) o; - return Objects.equals(this.devices, raid.devices) && - Objects.equals(this.level, raid.level) && - Objects.equals(this.name, raid.name)&& - Objects.equals(this.additionalProperties, raid.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(devices, level, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Raid {\n"); - sb.append(" devices: ").append(toIndentedString(devices)).append("\n"); - sb.append(" level: ").append(toIndentedString(level)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("devices"); - openapiFields.add("level"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Raid - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Raid.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Raid is not found in the empty JSON string", Raid.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("devices") != null && !jsonObj.get("devices").isJsonNull() && !jsonObj.get("devices").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `devices` to be an array in the JSON string but got `%s`", jsonObj.get("devices").toString())); - } - if ((jsonObj.get("level") != null && !jsonObj.get("level").isJsonNull()) && !jsonObj.get("level").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `level` to be a primitive type in the JSON string but got `%s`", jsonObj.get("level").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Raid.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Raid' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Raid.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Raid value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Raid read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Raid instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Raid given an JSON string - * - * @param jsonString JSON string - * @return An instance of Raid - * @throws IOException if the JSON string is invalid with respect to Raid - */ - public static Raid fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Raid.class); - } - - /** - * Convert an instance of Raid to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java deleted file mode 100644 index de46fb983..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RecoveryCodeList.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * RecoveryCodeList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RecoveryCodeList { - public static final String SERIALIZED_NAME_RECOVERY_CODES = "recovery_codes"; - @SerializedName(SERIALIZED_NAME_RECOVERY_CODES) - private List recoveryCodes; - - public RecoveryCodeList() { - } - - public RecoveryCodeList recoveryCodes(List recoveryCodes) { - - this.recoveryCodes = recoveryCodes; - return this; - } - - public RecoveryCodeList addRecoveryCodesItem(String recoveryCodesItem) { - if (this.recoveryCodes == null) { - this.recoveryCodes = new ArrayList<>(); - } - this.recoveryCodes.add(recoveryCodesItem); - return this; - } - - /** - * Get recoveryCodes - * @return recoveryCodes - **/ - @javax.annotation.Nullable - public List getRecoveryCodes() { - return recoveryCodes; - } - - - public void setRecoveryCodes(List recoveryCodes) { - this.recoveryCodes = recoveryCodes; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the RecoveryCodeList instance itself - */ - public RecoveryCodeList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RecoveryCodeList recoveryCodeList = (RecoveryCodeList) o; - return Objects.equals(this.recoveryCodes, recoveryCodeList.recoveryCodes)&& - Objects.equals(this.additionalProperties, recoveryCodeList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(recoveryCodes, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RecoveryCodeList {\n"); - sb.append(" recoveryCodes: ").append(toIndentedString(recoveryCodes)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("recovery_codes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RecoveryCodeList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!RecoveryCodeList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecoveryCodeList is not found in the empty JSON string", RecoveryCodeList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("recovery_codes") != null && !jsonObj.get("recovery_codes").isJsonNull() && !jsonObj.get("recovery_codes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `recovery_codes` to be an array in the JSON string but got `%s`", jsonObj.get("recovery_codes").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RecoveryCodeList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RecoveryCodeList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RecoveryCodeList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RecoveryCodeList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public RecoveryCodeList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - RecoveryCodeList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RecoveryCodeList given an JSON string - * - * @param jsonString JSON string - * @return An instance of RecoveryCodeList - * @throws IOException if the JSON string is invalid with respect to RecoveryCodeList - */ - public static RecoveryCodeList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RecoveryCodeList.class); - } - - /** - * Convert an instance of RecoveryCodeList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservation201Response.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservation201Response.java deleted file mode 100644 index 543c1d7a7..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservation201Response.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservation; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RequestIPReservation201Response extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(RequestIPReservation201Response.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RequestIPReservation201Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RequestIPReservation201Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterIPReservation = gson.getDelegateAdapter(this, TypeToken.get(IPReservation.class)); - final TypeAdapter adapterVrfIpReservation = gson.getDelegateAdapter(this, TypeToken.get(VrfIpReservation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RequestIPReservation201Response value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `IPReservation` - if (value.getActualInstance() instanceof IPReservation) { - JsonElement element = adapterIPReservation.toJsonTree((IPReservation)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfIpReservation` - if (value.getActualInstance() instanceof VrfIpReservation) { - JsonElement element = adapterVrfIpReservation.toJsonTree((VrfIpReservation)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: IPReservation, VrfIpReservation"); - } - - @Override - public RequestIPReservation201Response read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize IPReservation - try { - // validate the JSON object to see if any exception is thrown - IPReservation.validateJsonElement(jsonElement); - actualAdapter = adapterIPReservation; - match++; - log.log(Level.FINER, "Input data matches schema 'IPReservation'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for IPReservation failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'IPReservation'", e); - } - // deserialize VrfIpReservation - try { - // validate the JSON object to see if any exception is thrown - VrfIpReservation.validateJsonElement(jsonElement); - actualAdapter = adapterVrfIpReservation; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfIpReservation'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfIpReservation failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfIpReservation'", e); - } - - if (match == 1) { - RequestIPReservation201Response ret = new RequestIPReservation201Response(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for RequestIPReservation201Response: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public RequestIPReservation201Response() { - super("oneOf", Boolean.FALSE); - } - - public RequestIPReservation201Response(IPReservation o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public RequestIPReservation201Response(VrfIpReservation o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("IPReservation", IPReservation.class); - schemas.put("VrfIpReservation", VrfIpReservation.class); - } - - @Override - public Map> getSchemas() { - return RequestIPReservation201Response.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * IPReservation, VrfIpReservation - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof IPReservation) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfIpReservation) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be IPReservation, VrfIpReservation"); - } - - /** - * Get the actual instance, which can be the following: - * IPReservation, VrfIpReservation - * - * @return The actual instance (IPReservation, VrfIpReservation) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IPReservation`. If the actual instance is not `IPReservation`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `IPReservation` - * @throws ClassCastException if the instance is not `IPReservation` - */ - public IPReservation getIPReservation() throws ClassCastException { - return (IPReservation)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfIpReservation`. If the actual instance is not `VrfIpReservation`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfIpReservation` - * @throws ClassCastException if the instance is not `VrfIpReservation` - */ - public VrfIpReservation getVrfIpReservation() throws ClassCastException { - return (VrfIpReservation)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RequestIPReservation201Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with IPReservation - try { - IPReservation.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for IPReservation failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfIpReservation - try { - VrfIpReservation.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfIpReservation failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for RequestIPReservation201Response with oneOf schemas: IPReservation, VrfIpReservation. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of RequestIPReservation201Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of RequestIPReservation201Response - * @throws IOException if the JSON string is invalid with respect to RequestIPReservation201Response - */ - public static RequestIPReservation201Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RequestIPReservation201Response.class); - } - - /** - * Convert an instance of RequestIPReservation201Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequest.java deleted file mode 100644 index 153653877..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.IPReservationRequestInput; -import com.equinix.openapi.metal.v1.model.VrfIpReservationCreateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RequestIPReservationRequest extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(RequestIPReservationRequest.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RequestIPReservationRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RequestIPReservationRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterIPReservationRequestInput = gson.getDelegateAdapter(this, TypeToken.get(IPReservationRequestInput.class)); - final TypeAdapter adapterVrfIpReservationCreateInput = gson.getDelegateAdapter(this, TypeToken.get(VrfIpReservationCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RequestIPReservationRequest value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `IPReservationRequestInput` - if (value.getActualInstance() instanceof IPReservationRequestInput) { - JsonElement element = adapterIPReservationRequestInput.toJsonTree((IPReservationRequestInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfIpReservationCreateInput` - if (value.getActualInstance() instanceof VrfIpReservationCreateInput) { - JsonElement element = adapterVrfIpReservationCreateInput.toJsonTree((VrfIpReservationCreateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: IPReservationRequestInput, VrfIpReservationCreateInput"); - } - - @Override - public RequestIPReservationRequest read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize IPReservationRequestInput - try { - // validate the JSON object to see if any exception is thrown - IPReservationRequestInput.validateJsonElement(jsonElement); - actualAdapter = adapterIPReservationRequestInput; - match++; - log.log(Level.FINER, "Input data matches schema 'IPReservationRequestInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for IPReservationRequestInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'IPReservationRequestInput'", e); - } - // deserialize VrfIpReservationCreateInput - try { - // validate the JSON object to see if any exception is thrown - VrfIpReservationCreateInput.validateJsonElement(jsonElement); - actualAdapter = adapterVrfIpReservationCreateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfIpReservationCreateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfIpReservationCreateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfIpReservationCreateInput'", e); - } - - if (match == 1) { - RequestIPReservationRequest ret = new RequestIPReservationRequest(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for RequestIPReservationRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public RequestIPReservationRequest() { - super("oneOf", Boolean.FALSE); - } - - public RequestIPReservationRequest(IPReservationRequestInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public RequestIPReservationRequest(VrfIpReservationCreateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("IPReservationRequestInput", IPReservationRequestInput.class); - schemas.put("VrfIpReservationCreateInput", VrfIpReservationCreateInput.class); - } - - @Override - public Map> getSchemas() { - return RequestIPReservationRequest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * IPReservationRequestInput, VrfIpReservationCreateInput - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof IPReservationRequestInput) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfIpReservationCreateInput) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be IPReservationRequestInput, VrfIpReservationCreateInput"); - } - - /** - * Get the actual instance, which can be the following: - * IPReservationRequestInput, VrfIpReservationCreateInput - * - * @return The actual instance (IPReservationRequestInput, VrfIpReservationCreateInput) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `IPReservationRequestInput`. If the actual instance is not `IPReservationRequestInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `IPReservationRequestInput` - * @throws ClassCastException if the instance is not `IPReservationRequestInput` - */ - public IPReservationRequestInput getIPReservationRequestInput() throws ClassCastException { - return (IPReservationRequestInput)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfIpReservationCreateInput`. If the actual instance is not `VrfIpReservationCreateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfIpReservationCreateInput` - * @throws ClassCastException if the instance is not `VrfIpReservationCreateInput` - */ - public VrfIpReservationCreateInput getVrfIpReservationCreateInput() throws ClassCastException { - return (VrfIpReservationCreateInput)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to RequestIPReservationRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with IPReservationRequestInput - try { - IPReservationRequestInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for IPReservationRequestInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfIpReservationCreateInput - try { - VrfIpReservationCreateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfIpReservationCreateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for RequestIPReservationRequest with oneOf schemas: IPReservationRequestInput, VrfIpReservationCreateInput. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of RequestIPReservationRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of RequestIPReservationRequest - * @throws IOException if the JSON string is invalid with respect to RequestIPReservationRequest - */ - public static RequestIPReservationRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RequestIPReservationRequest.class); - } - - /** - * Convert an instance of RequestIPReservationRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java deleted file mode 100644 index d81028f9c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKey.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SSHKey - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SSHKey { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_ENTITY = "entity"; - @SerializedName(SERIALIZED_NAME_ENTITY) - private Href entity; - - public static final String SERIALIZED_NAME_FINGERPRINT = "fingerprint"; - @SerializedName(SERIALIZED_NAME_FINGERPRINT) - private String fingerprint; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_LABEL = "label"; - @SerializedName(SERIALIZED_NAME_LABEL) - private String label; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public SSHKey() { - } - - public SSHKey createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public SSHKey entity(Href entity) { - - this.entity = entity; - return this; - } - - /** - * Get entity - * @return entity - **/ - @javax.annotation.Nullable - public Href getEntity() { - return entity; - } - - - public void setEntity(Href entity) { - this.entity = entity; - } - - - public SSHKey fingerprint(String fingerprint) { - - this.fingerprint = fingerprint; - return this; - } - - /** - * Get fingerprint - * @return fingerprint - **/ - @javax.annotation.Nullable - public String getFingerprint() { - return fingerprint; - } - - - public void setFingerprint(String fingerprint) { - this.fingerprint = fingerprint; - } - - - public SSHKey href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public SSHKey id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public SSHKey key(String key) { - - this.key = key; - return this; - } - - /** - * Get key - * @return key - **/ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - - public void setKey(String key) { - this.key = key; - } - - - public SSHKey label(String label) { - - this.label = label; - return this; - } - - /** - * Get label - * @return label - **/ - @javax.annotation.Nullable - public String getLabel() { - return label; - } - - - public void setLabel(String label) { - this.label = label; - } - - - public SSHKey updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public SSHKey tags(List tags) { - - this.tags = tags; - return this; - } - - public SSHKey addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SSHKey instance itself - */ - public SSHKey putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SSHKey ssHKey = (SSHKey) o; - return Objects.equals(this.createdAt, ssHKey.createdAt) && - Objects.equals(this.entity, ssHKey.entity) && - Objects.equals(this.fingerprint, ssHKey.fingerprint) && - Objects.equals(this.href, ssHKey.href) && - Objects.equals(this.id, ssHKey.id) && - Objects.equals(this.key, ssHKey.key) && - Objects.equals(this.label, ssHKey.label) && - Objects.equals(this.updatedAt, ssHKey.updatedAt) && - Objects.equals(this.tags, ssHKey.tags)&& - Objects.equals(this.additionalProperties, ssHKey.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, entity, fingerprint, href, id, key, label, updatedAt, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SSHKey {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); - sb.append(" fingerprint: ").append(toIndentedString(fingerprint)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("entity"); - openapiFields.add("fingerprint"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("key"); - openapiFields.add("label"); - openapiFields.add("updated_at"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SSHKey - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SSHKey.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKey is not found in the empty JSON string", SSHKey.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `entity` - if (jsonObj.get("entity") != null && !jsonObj.get("entity").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("entity")); - } - if ((jsonObj.get("fingerprint") != null && !jsonObj.get("fingerprint").isJsonNull()) && !jsonObj.get("fingerprint").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fingerprint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fingerprint").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SSHKey.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SSHKey' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SSHKey.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SSHKey value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SSHKey read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SSHKey instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SSHKey given an JSON string - * - * @param jsonString JSON string - * @return An instance of SSHKey - * @throws IOException if the JSON string is invalid with respect to SSHKey - */ - public static SSHKey fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SSHKey.class); - } - - /** - * Convert an instance of SSHKey to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java deleted file mode 100644 index fa360d479..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInput.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SSHKeyCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SSHKeyCreateInput { - public static final String SERIALIZED_NAME_INSTANCES_IDS = "instances_ids"; - @SerializedName(SERIALIZED_NAME_INSTANCES_IDS) - private List instancesIds; - - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_LABEL = "label"; - @SerializedName(SERIALIZED_NAME_LABEL) - private String label; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public SSHKeyCreateInput() { - } - - public SSHKeyCreateInput instancesIds(List instancesIds) { - - this.instancesIds = instancesIds; - return this; - } - - public SSHKeyCreateInput addInstancesIdsItem(UUID instancesIdsItem) { - if (this.instancesIds == null) { - this.instancesIds = new ArrayList<>(); - } - this.instancesIds.add(instancesIdsItem); - return this; - } - - /** - * List of instance UUIDs to associate SSH key with, when empty array is sent all instances belonging to entity will be included - * @return instancesIds - **/ - @javax.annotation.Nullable - public List getInstancesIds() { - return instancesIds; - } - - - public void setInstancesIds(List instancesIds) { - this.instancesIds = instancesIds; - } - - - public SSHKeyCreateInput key(String key) { - - this.key = key; - return this; - } - - /** - * Get key - * @return key - **/ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - - public void setKey(String key) { - this.key = key; - } - - - public SSHKeyCreateInput label(String label) { - - this.label = label; - return this; - } - - /** - * Get label - * @return label - **/ - @javax.annotation.Nullable - public String getLabel() { - return label; - } - - - public void setLabel(String label) { - this.label = label; - } - - - public SSHKeyCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public SSHKeyCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SSHKeyCreateInput instance itself - */ - public SSHKeyCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SSHKeyCreateInput ssHKeyCreateInput = (SSHKeyCreateInput) o; - return Objects.equals(this.instancesIds, ssHKeyCreateInput.instancesIds) && - Objects.equals(this.key, ssHKeyCreateInput.key) && - Objects.equals(this.label, ssHKeyCreateInput.label) && - Objects.equals(this.tags, ssHKeyCreateInput.tags)&& - Objects.equals(this.additionalProperties, ssHKeyCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(instancesIds, key, label, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SSHKeyCreateInput {\n"); - sb.append(" instancesIds: ").append(toIndentedString(instancesIds)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("instances_ids"); - openapiFields.add("key"); - openapiFields.add("label"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SSHKeyCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SSHKeyCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKeyCreateInput is not found in the empty JSON string", SSHKeyCreateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("instances_ids") != null && !jsonObj.get("instances_ids").isJsonNull() && !jsonObj.get("instances_ids").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `instances_ids` to be an array in the JSON string but got `%s`", jsonObj.get("instances_ids").toString())); - } - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SSHKeyCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SSHKeyCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SSHKeyCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SSHKeyCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SSHKeyCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SSHKeyCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SSHKeyCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of SSHKeyCreateInput - * @throws IOException if the JSON string is invalid with respect to SSHKeyCreateInput - */ - public static SSHKeyCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SSHKeyCreateInput.class); - } - - /** - * Convert an instance of SSHKeyCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java deleted file mode 100644 index bfbd28c7c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyInput.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SSHKeyInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SSHKeyInput { - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_LABEL = "label"; - @SerializedName(SERIALIZED_NAME_LABEL) - private String label; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public SSHKeyInput() { - } - - public SSHKeyInput key(String key) { - - this.key = key; - return this; - } - - /** - * Get key - * @return key - **/ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - - public void setKey(String key) { - this.key = key; - } - - - public SSHKeyInput label(String label) { - - this.label = label; - return this; - } - - /** - * Get label - * @return label - **/ - @javax.annotation.Nullable - public String getLabel() { - return label; - } - - - public void setLabel(String label) { - this.label = label; - } - - - public SSHKeyInput tags(List tags) { - - this.tags = tags; - return this; - } - - public SSHKeyInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SSHKeyInput instance itself - */ - public SSHKeyInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SSHKeyInput ssHKeyInput = (SSHKeyInput) o; - return Objects.equals(this.key, ssHKeyInput.key) && - Objects.equals(this.label, ssHKeyInput.label) && - Objects.equals(this.tags, ssHKeyInput.tags)&& - Objects.equals(this.additionalProperties, ssHKeyInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(key, label, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SSHKeyInput {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" label: ").append(toIndentedString(label)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("key"); - openapiFields.add("label"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SSHKeyInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SSHKeyInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKeyInput is not found in the empty JSON string", SSHKeyInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SSHKeyInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SSHKeyInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SSHKeyInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SSHKeyInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SSHKeyInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SSHKeyInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SSHKeyInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of SSHKeyInput - * @throws IOException if the JSON string is invalid with respect to SSHKeyInput - */ - public static SSHKeyInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SSHKeyInput.class); - } - - /** - * Convert an instance of SSHKeyInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java deleted file mode 100644 index 5b4b3900e..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SSHKeyList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SSHKey; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SSHKeyList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SSHKeyList { - public static final String SERIALIZED_NAME_SSH_KEYS = "ssh_keys"; - @SerializedName(SERIALIZED_NAME_SSH_KEYS) - private List sshKeys; - - public SSHKeyList() { - } - - public SSHKeyList sshKeys(List sshKeys) { - - this.sshKeys = sshKeys; - return this; - } - - public SSHKeyList addSshKeysItem(SSHKey sshKeysItem) { - if (this.sshKeys == null) { - this.sshKeys = new ArrayList<>(); - } - this.sshKeys.add(sshKeysItem); - return this; - } - - /** - * Get sshKeys - * @return sshKeys - **/ - @javax.annotation.Nullable - public List getSshKeys() { - return sshKeys; - } - - - public void setSshKeys(List sshKeys) { - this.sshKeys = sshKeys; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SSHKeyList instance itself - */ - public SSHKeyList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SSHKeyList ssHKeyList = (SSHKeyList) o; - return Objects.equals(this.sshKeys, ssHKeyList.sshKeys)&& - Objects.equals(this.additionalProperties, ssHKeyList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(sshKeys, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SSHKeyList {\n"); - sb.append(" sshKeys: ").append(toIndentedString(sshKeys)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ssh_keys"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SSHKeyList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SSHKeyList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SSHKeyList is not found in the empty JSON string", SSHKeyList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("ssh_keys") != null && !jsonObj.get("ssh_keys").isJsonNull()) { - JsonArray jsonArraysshKeys = jsonObj.getAsJsonArray("ssh_keys"); - if (jsonArraysshKeys != null) { - // ensure the json data is an array - if (!jsonObj.get("ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("ssh_keys").toString())); - } - - // validate the optional field `ssh_keys` (array) - for (int i = 0; i < jsonArraysshKeys.size(); i++) { - SSHKey.validateJsonElement(jsonArraysshKeys.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SSHKeyList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SSHKeyList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SSHKeyList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SSHKeyList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SSHKeyList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SSHKeyList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SSHKeyList given an JSON string - * - * @param jsonString JSON string - * @return An instance of SSHKeyList - * @throws IOException if the JSON string is invalid with respect to SSHKeyList - */ - public static SSHKeyList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SSHKeyList.class); - } - - /** - * Convert an instance of SSHKeyList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java deleted file mode 100644 index adc2ee3dd..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequest.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SelfServiceReservationItemRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SelfServiceReservationItemRequest { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Float amount; - - public static final String SERIALIZED_NAME_METRO_ID = "metro_id"; - @SerializedName(SERIALIZED_NAME_METRO_ID) - private UUID metroId; - - public static final String SERIALIZED_NAME_PLAN_ID = "plan_id"; - @SerializedName(SERIALIZED_NAME_PLAN_ID) - private UUID planId; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private Integer quantity; - - public static final String SERIALIZED_NAME_TERM = "term"; - @SerializedName(SERIALIZED_NAME_TERM) - private String term; - - public SelfServiceReservationItemRequest() { - } - - public SelfServiceReservationItemRequest amount(Float amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nullable - public Float getAmount() { - return amount; - } - - - public void setAmount(Float amount) { - this.amount = amount; - } - - - public SelfServiceReservationItemRequest metroId(UUID metroId) { - - this.metroId = metroId; - return this; - } - - /** - * Get metroId - * @return metroId - **/ - @javax.annotation.Nullable - public UUID getMetroId() { - return metroId; - } - - - public void setMetroId(UUID metroId) { - this.metroId = metroId; - } - - - public SelfServiceReservationItemRequest planId(UUID planId) { - - this.planId = planId; - return this; - } - - /** - * Get planId - * @return planId - **/ - @javax.annotation.Nullable - public UUID getPlanId() { - return planId; - } - - - public void setPlanId(UUID planId) { - this.planId = planId; - } - - - public SelfServiceReservationItemRequest quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - public Integer getQuantity() { - return quantity; - } - - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public SelfServiceReservationItemRequest term(String term) { - - this.term = term; - return this; - } - - /** - * Get term - * @return term - **/ - @javax.annotation.Nullable - public String getTerm() { - return term; - } - - - public void setTerm(String term) { - this.term = term; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SelfServiceReservationItemRequest instance itself - */ - public SelfServiceReservationItemRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SelfServiceReservationItemRequest selfServiceReservationItemRequest = (SelfServiceReservationItemRequest) o; - return Objects.equals(this.amount, selfServiceReservationItemRequest.amount) && - Objects.equals(this.metroId, selfServiceReservationItemRequest.metroId) && - Objects.equals(this.planId, selfServiceReservationItemRequest.planId) && - Objects.equals(this.quantity, selfServiceReservationItemRequest.quantity) && - Objects.equals(this.term, selfServiceReservationItemRequest.term)&& - Objects.equals(this.additionalProperties, selfServiceReservationItemRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(amount, metroId, planId, quantity, term, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SelfServiceReservationItemRequest {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" metroId: ").append(toIndentedString(metroId)).append("\n"); - sb.append(" planId: ").append(toIndentedString(planId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" term: ").append(toIndentedString(term)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("metro_id"); - openapiFields.add("plan_id"); - openapiFields.add("quantity"); - openapiFields.add("term"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SelfServiceReservationItemRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SelfServiceReservationItemRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SelfServiceReservationItemRequest is not found in the empty JSON string", SelfServiceReservationItemRequest.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("metro_id") != null && !jsonObj.get("metro_id").isJsonNull()) && !jsonObj.get("metro_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro_id").toString())); - } - if ((jsonObj.get("plan_id") != null && !jsonObj.get("plan_id").isJsonNull()) && !jsonObj.get("plan_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan_id").toString())); - } - if ((jsonObj.get("term") != null && !jsonObj.get("term").isJsonNull()) && !jsonObj.get("term").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `term` to be a primitive type in the JSON string but got `%s`", jsonObj.get("term").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SelfServiceReservationItemRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SelfServiceReservationItemRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SelfServiceReservationItemRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SelfServiceReservationItemRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SelfServiceReservationItemRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SelfServiceReservationItemRequest instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SelfServiceReservationItemRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SelfServiceReservationItemRequest - * @throws IOException if the JSON string is invalid with respect to SelfServiceReservationItemRequest - */ - public static SelfServiceReservationItemRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SelfServiceReservationItemRequest.class); - } - - /** - * Convert an instance of SelfServiceReservationItemRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java deleted file mode 100644 index 101516be6..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponse.java +++ /dev/null @@ -1,601 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SelfServiceReservationItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SelfServiceReservationItemResponse { - public static final String SERIALIZED_NAME_AMOUNT = "amount"; - @SerializedName(SERIALIZED_NAME_AMOUNT) - private Float amount; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_METRO_CODE = "metro_code"; - @SerializedName(SERIALIZED_NAME_METRO_CODE) - private String metroCode; - - public static final String SERIALIZED_NAME_METRO_ID = "metro_id"; - @SerializedName(SERIALIZED_NAME_METRO_ID) - private UUID metroId; - - public static final String SERIALIZED_NAME_METRO_NAME = "metro_name"; - @SerializedName(SERIALIZED_NAME_METRO_NAME) - private String metroName; - - public static final String SERIALIZED_NAME_PLAN_ID = "plan_id"; - @SerializedName(SERIALIZED_NAME_PLAN_ID) - private UUID planId; - - public static final String SERIALIZED_NAME_PLAN_NAME = "plan_name"; - @SerializedName(SERIALIZED_NAME_PLAN_NAME) - private String planName; - - public static final String SERIALIZED_NAME_PLAN_SLUG = "plan_slug"; - @SerializedName(SERIALIZED_NAME_PLAN_SLUG) - private String planSlug; - - public static final String SERIALIZED_NAME_PLAN_CATEGORIES = "plan_categories"; - @SerializedName(SERIALIZED_NAME_PLAN_CATEGORIES) - private List planCategories; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private Integer quantity; - - public static final String SERIALIZED_NAME_TERM = "term"; - @SerializedName(SERIALIZED_NAME_TERM) - private String term; - - public SelfServiceReservationItemResponse() { - } - - public SelfServiceReservationItemResponse amount(Float amount) { - - this.amount = amount; - return this; - } - - /** - * Get amount - * @return amount - **/ - @javax.annotation.Nullable - public Float getAmount() { - return amount; - } - - - public void setAmount(Float amount) { - this.amount = amount; - } - - - public SelfServiceReservationItemResponse id(String id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - - public void setId(String id) { - this.id = id; - } - - - public SelfServiceReservationItemResponse metroCode(String metroCode) { - - this.metroCode = metroCode; - return this; - } - - /** - * Get metroCode - * @return metroCode - **/ - @javax.annotation.Nullable - public String getMetroCode() { - return metroCode; - } - - - public void setMetroCode(String metroCode) { - this.metroCode = metroCode; - } - - - public SelfServiceReservationItemResponse metroId(UUID metroId) { - - this.metroId = metroId; - return this; - } - - /** - * Get metroId - * @return metroId - **/ - @javax.annotation.Nullable - public UUID getMetroId() { - return metroId; - } - - - public void setMetroId(UUID metroId) { - this.metroId = metroId; - } - - - public SelfServiceReservationItemResponse metroName(String metroName) { - - this.metroName = metroName; - return this; - } - - /** - * Get metroName - * @return metroName - **/ - @javax.annotation.Nullable - public String getMetroName() { - return metroName; - } - - - public void setMetroName(String metroName) { - this.metroName = metroName; - } - - - public SelfServiceReservationItemResponse planId(UUID planId) { - - this.planId = planId; - return this; - } - - /** - * Get planId - * @return planId - **/ - @javax.annotation.Nullable - public UUID getPlanId() { - return planId; - } - - - public void setPlanId(UUID planId) { - this.planId = planId; - } - - - public SelfServiceReservationItemResponse planName(String planName) { - - this.planName = planName; - return this; - } - - /** - * Get planName - * @return planName - **/ - @javax.annotation.Nullable - public String getPlanName() { - return planName; - } - - - public void setPlanName(String planName) { - this.planName = planName; - } - - - public SelfServiceReservationItemResponse planSlug(String planSlug) { - - this.planSlug = planSlug; - return this; - } - - /** - * Get planSlug - * @return planSlug - **/ - @javax.annotation.Nullable - public String getPlanSlug() { - return planSlug; - } - - - public void setPlanSlug(String planSlug) { - this.planSlug = planSlug; - } - - - public SelfServiceReservationItemResponse planCategories(List planCategories) { - - this.planCategories = planCategories; - return this; - } - - public SelfServiceReservationItemResponse addPlanCategoriesItem(String planCategoriesItem) { - if (this.planCategories == null) { - this.planCategories = new ArrayList<>(); - } - this.planCategories.add(planCategoriesItem); - return this; - } - - /** - * Get planCategories - * @return planCategories - **/ - @javax.annotation.Nullable - public List getPlanCategories() { - return planCategories; - } - - - public void setPlanCategories(List planCategories) { - this.planCategories = planCategories; - } - - - public SelfServiceReservationItemResponse quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - public Integer getQuantity() { - return quantity; - } - - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public SelfServiceReservationItemResponse term(String term) { - - this.term = term; - return this; - } - - /** - * Get term - * @return term - **/ - @javax.annotation.Nullable - public String getTerm() { - return term; - } - - - public void setTerm(String term) { - this.term = term; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SelfServiceReservationItemResponse instance itself - */ - public SelfServiceReservationItemResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SelfServiceReservationItemResponse selfServiceReservationItemResponse = (SelfServiceReservationItemResponse) o; - return Objects.equals(this.amount, selfServiceReservationItemResponse.amount) && - Objects.equals(this.id, selfServiceReservationItemResponse.id) && - Objects.equals(this.metroCode, selfServiceReservationItemResponse.metroCode) && - Objects.equals(this.metroId, selfServiceReservationItemResponse.metroId) && - Objects.equals(this.metroName, selfServiceReservationItemResponse.metroName) && - Objects.equals(this.planId, selfServiceReservationItemResponse.planId) && - Objects.equals(this.planName, selfServiceReservationItemResponse.planName) && - Objects.equals(this.planSlug, selfServiceReservationItemResponse.planSlug) && - Objects.equals(this.planCategories, selfServiceReservationItemResponse.planCategories) && - Objects.equals(this.quantity, selfServiceReservationItemResponse.quantity) && - Objects.equals(this.term, selfServiceReservationItemResponse.term)&& - Objects.equals(this.additionalProperties, selfServiceReservationItemResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(amount, id, metroCode, metroId, metroName, planId, planName, planSlug, planCategories, quantity, term, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SelfServiceReservationItemResponse {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" metroCode: ").append(toIndentedString(metroCode)).append("\n"); - sb.append(" metroId: ").append(toIndentedString(metroId)).append("\n"); - sb.append(" metroName: ").append(toIndentedString(metroName)).append("\n"); - sb.append(" planId: ").append(toIndentedString(planId)).append("\n"); - sb.append(" planName: ").append(toIndentedString(planName)).append("\n"); - sb.append(" planSlug: ").append(toIndentedString(planSlug)).append("\n"); - sb.append(" planCategories: ").append(toIndentedString(planCategories)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" term: ").append(toIndentedString(term)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("amount"); - openapiFields.add("id"); - openapiFields.add("metro_code"); - openapiFields.add("metro_id"); - openapiFields.add("metro_name"); - openapiFields.add("plan_id"); - openapiFields.add("plan_name"); - openapiFields.add("plan_slug"); - openapiFields.add("plan_categories"); - openapiFields.add("quantity"); - openapiFields.add("term"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SelfServiceReservationItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SelfServiceReservationItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SelfServiceReservationItemResponse is not found in the empty JSON string", SelfServiceReservationItemResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("metro_code") != null && !jsonObj.get("metro_code").isJsonNull()) && !jsonObj.get("metro_code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro_code").toString())); - } - if ((jsonObj.get("metro_id") != null && !jsonObj.get("metro_id").isJsonNull()) && !jsonObj.get("metro_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro_id").toString())); - } - if ((jsonObj.get("metro_name") != null && !jsonObj.get("metro_name").isJsonNull()) && !jsonObj.get("metro_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro_name").toString())); - } - if ((jsonObj.get("plan_id") != null && !jsonObj.get("plan_id").isJsonNull()) && !jsonObj.get("plan_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan_id").toString())); - } - if ((jsonObj.get("plan_name") != null && !jsonObj.get("plan_name").isJsonNull()) && !jsonObj.get("plan_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan_name").toString())); - } - if ((jsonObj.get("plan_slug") != null && !jsonObj.get("plan_slug").isJsonNull()) && !jsonObj.get("plan_slug").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan_slug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan_slug").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("plan_categories") != null && !jsonObj.get("plan_categories").isJsonNull() && !jsonObj.get("plan_categories").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `plan_categories` to be an array in the JSON string but got `%s`", jsonObj.get("plan_categories").toString())); - } - if ((jsonObj.get("term") != null && !jsonObj.get("term").isJsonNull()) && !jsonObj.get("term").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `term` to be a primitive type in the JSON string but got `%s`", jsonObj.get("term").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SelfServiceReservationItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SelfServiceReservationItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SelfServiceReservationItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SelfServiceReservationItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SelfServiceReservationItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SelfServiceReservationItemResponse instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SelfServiceReservationItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SelfServiceReservationItemResponse - * @throws IOException if the JSON string is invalid with respect to SelfServiceReservationItemResponse - */ - public static SelfServiceReservationItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SelfServiceReservationItemResponse.class); - } - - /** - * Convert an instance of SelfServiceReservationItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java deleted file mode 100644 index ee2ad00e9..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SelfServiceReservationList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SelfServiceReservationList { - public static final String SERIALIZED_NAME_RESERVATIONS = "reservations"; - @SerializedName(SERIALIZED_NAME_RESERVATIONS) - private List reservations; - - public SelfServiceReservationList() { - } - - public SelfServiceReservationList reservations(List reservations) { - - this.reservations = reservations; - return this; - } - - public SelfServiceReservationList addReservationsItem(SelfServiceReservationResponse reservationsItem) { - if (this.reservations == null) { - this.reservations = new ArrayList<>(); - } - this.reservations.add(reservationsItem); - return this; - } - - /** - * Get reservations - * @return reservations - **/ - @javax.annotation.Nullable - public List getReservations() { - return reservations; - } - - - public void setReservations(List reservations) { - this.reservations = reservations; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SelfServiceReservationList instance itself - */ - public SelfServiceReservationList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SelfServiceReservationList selfServiceReservationList = (SelfServiceReservationList) o; - return Objects.equals(this.reservations, selfServiceReservationList.reservations)&& - Objects.equals(this.additionalProperties, selfServiceReservationList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(reservations, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SelfServiceReservationList {\n"); - sb.append(" reservations: ").append(toIndentedString(reservations)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reservations"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SelfServiceReservationList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SelfServiceReservationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SelfServiceReservationList is not found in the empty JSON string", SelfServiceReservationList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("reservations") != null && !jsonObj.get("reservations").isJsonNull()) { - JsonArray jsonArrayreservations = jsonObj.getAsJsonArray("reservations"); - if (jsonArrayreservations != null) { - // ensure the json data is an array - if (!jsonObj.get("reservations").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `reservations` to be an array in the JSON string but got `%s`", jsonObj.get("reservations").toString())); - } - - // validate the optional field `reservations` (array) - for (int i = 0; i < jsonArrayreservations.size(); i++) { - SelfServiceReservationResponse.validateJsonElement(jsonArrayreservations.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SelfServiceReservationList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SelfServiceReservationList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SelfServiceReservationList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SelfServiceReservationList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SelfServiceReservationList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SelfServiceReservationList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SelfServiceReservationList given an JSON string - * - * @param jsonString JSON string - * @return An instance of SelfServiceReservationList - * @throws IOException if the JSON string is invalid with respect to SelfServiceReservationList - */ - public static SelfServiceReservationList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SelfServiceReservationList.class); - } - - /** - * Convert an instance of SelfServiceReservationList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java deleted file mode 100644 index e9ab79186..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponse.java +++ /dev/null @@ -1,612 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.CreateSelfServiceReservationRequestPeriod; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationItemResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SelfServiceReservationResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SelfServiceReservationResponse { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_ITEM = "item"; - @SerializedName(SERIALIZED_NAME_ITEM) - private List item; - - public static final String SERIALIZED_NAME_NOTES = "notes"; - @SerializedName(SERIALIZED_NAME_NOTES) - private String notes; - - public static final String SERIALIZED_NAME_ORGANIZATION = "organization"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION) - private String organization; - - public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organization_id"; - @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) - private UUID organizationId; - - public static final String SERIALIZED_NAME_PERIOD = "period"; - @SerializedName(SERIALIZED_NAME_PERIOD) - private CreateSelfServiceReservationRequestPeriod period; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private String project; - - public static final String SERIALIZED_NAME_PROJECT_ID = "project_id"; - @SerializedName(SERIALIZED_NAME_PROJECT_ID) - private UUID projectId; - - public static final String SERIALIZED_NAME_START_DATE = "start_date"; - @SerializedName(SERIALIZED_NAME_START_DATE) - private OffsetDateTime startDate; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_TOTAL_COST = "total_cost"; - @SerializedName(SERIALIZED_NAME_TOTAL_COST) - private Integer totalCost; - - public SelfServiceReservationResponse() { - } - - public SelfServiceReservationResponse createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public SelfServiceReservationResponse item(List item) { - - this.item = item; - return this; - } - - public SelfServiceReservationResponse addItemItem(SelfServiceReservationItemResponse itemItem) { - if (this.item == null) { - this.item = new ArrayList<>(); - } - this.item.add(itemItem); - return this; - } - - /** - * Get item - * @return item - **/ - @javax.annotation.Nullable - public List getItem() { - return item; - } - - - public void setItem(List item) { - this.item = item; - } - - - public SelfServiceReservationResponse notes(String notes) { - - this.notes = notes; - return this; - } - - /** - * Get notes - * @return notes - **/ - @javax.annotation.Nullable - public String getNotes() { - return notes; - } - - - public void setNotes(String notes) { - this.notes = notes; - } - - - public SelfServiceReservationResponse organization(String organization) { - - this.organization = organization; - return this; - } - - /** - * Get organization - * @return organization - **/ - @javax.annotation.Nullable - public String getOrganization() { - return organization; - } - - - public void setOrganization(String organization) { - this.organization = organization; - } - - - public SelfServiceReservationResponse organizationId(UUID organizationId) { - - this.organizationId = organizationId; - return this; - } - - /** - * Get organizationId - * @return organizationId - **/ - @javax.annotation.Nullable - public UUID getOrganizationId() { - return organizationId; - } - - - public void setOrganizationId(UUID organizationId) { - this.organizationId = organizationId; - } - - - public SelfServiceReservationResponse period(CreateSelfServiceReservationRequestPeriod period) { - - this.period = period; - return this; - } - - /** - * Get period - * @return period - **/ - @javax.annotation.Nullable - public CreateSelfServiceReservationRequestPeriod getPeriod() { - return period; - } - - - public void setPeriod(CreateSelfServiceReservationRequestPeriod period) { - this.period = period; - } - - - public SelfServiceReservationResponse project(String project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public String getProject() { - return project; - } - - - public void setProject(String project) { - this.project = project; - } - - - public SelfServiceReservationResponse projectId(UUID projectId) { - - this.projectId = projectId; - return this; - } - - /** - * Get projectId - * @return projectId - **/ - @javax.annotation.Nullable - public UUID getProjectId() { - return projectId; - } - - - public void setProjectId(UUID projectId) { - this.projectId = projectId; - } - - - public SelfServiceReservationResponse startDate(OffsetDateTime startDate) { - - this.startDate = startDate; - return this; - } - - /** - * Get startDate - * @return startDate - **/ - @javax.annotation.Nullable - public OffsetDateTime getStartDate() { - return startDate; - } - - - public void setStartDate(OffsetDateTime startDate) { - this.startDate = startDate; - } - - - public SelfServiceReservationResponse status(String status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - - public void setStatus(String status) { - this.status = status; - } - - - public SelfServiceReservationResponse totalCost(Integer totalCost) { - - this.totalCost = totalCost; - return this; - } - - /** - * Get totalCost - * @return totalCost - **/ - @javax.annotation.Nullable - public Integer getTotalCost() { - return totalCost; - } - - - public void setTotalCost(Integer totalCost) { - this.totalCost = totalCost; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SelfServiceReservationResponse instance itself - */ - public SelfServiceReservationResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SelfServiceReservationResponse selfServiceReservationResponse = (SelfServiceReservationResponse) o; - return Objects.equals(this.createdAt, selfServiceReservationResponse.createdAt) && - Objects.equals(this.item, selfServiceReservationResponse.item) && - Objects.equals(this.notes, selfServiceReservationResponse.notes) && - Objects.equals(this.organization, selfServiceReservationResponse.organization) && - Objects.equals(this.organizationId, selfServiceReservationResponse.organizationId) && - Objects.equals(this.period, selfServiceReservationResponse.period) && - Objects.equals(this.project, selfServiceReservationResponse.project) && - Objects.equals(this.projectId, selfServiceReservationResponse.projectId) && - Objects.equals(this.startDate, selfServiceReservationResponse.startDate) && - Objects.equals(this.status, selfServiceReservationResponse.status) && - Objects.equals(this.totalCost, selfServiceReservationResponse.totalCost)&& - Objects.equals(this.additionalProperties, selfServiceReservationResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, item, notes, organization, organizationId, period, project, projectId, startDate, status, totalCost, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SelfServiceReservationResponse {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" item: ").append(toIndentedString(item)).append("\n"); - sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); - sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); - sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n"); - sb.append(" period: ").append(toIndentedString(period)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" totalCost: ").append(toIndentedString(totalCost)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("item"); - openapiFields.add("notes"); - openapiFields.add("organization"); - openapiFields.add("organization_id"); - openapiFields.add("period"); - openapiFields.add("project"); - openapiFields.add("project_id"); - openapiFields.add("start_date"); - openapiFields.add("status"); - openapiFields.add("total_cost"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SelfServiceReservationResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SelfServiceReservationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SelfServiceReservationResponse is not found in the empty JSON string", SelfServiceReservationResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("item") != null && !jsonObj.get("item").isJsonNull()) { - JsonArray jsonArrayitem = jsonObj.getAsJsonArray("item"); - if (jsonArrayitem != null) { - // ensure the json data is an array - if (!jsonObj.get("item").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `item` to be an array in the JSON string but got `%s`", jsonObj.get("item").toString())); - } - - // validate the optional field `item` (array) - for (int i = 0; i < jsonArrayitem.size(); i++) { - SelfServiceReservationItemResponse.validateJsonElement(jsonArrayitem.get(i)); - }; - } - } - if ((jsonObj.get("notes") != null && !jsonObj.get("notes").isJsonNull()) && !jsonObj.get("notes").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `notes` to be a primitive type in the JSON string but got `%s`", jsonObj.get("notes").toString())); - } - if ((jsonObj.get("organization") != null && !jsonObj.get("organization").isJsonNull()) && !jsonObj.get("organization").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `organization` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization").toString())); - } - if ((jsonObj.get("organization_id") != null && !jsonObj.get("organization_id").isJsonNull()) && !jsonObj.get("organization_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("organization_id").toString())); - } - // validate the optional field `period` - if (jsonObj.get("period") != null && !jsonObj.get("period").isJsonNull()) { - CreateSelfServiceReservationRequestPeriod.validateJsonElement(jsonObj.get("period")); - } - if ((jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) && !jsonObj.get("project").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project").toString())); - } - if ((jsonObj.get("project_id") != null && !jsonObj.get("project_id").isJsonNull()) && !jsonObj.get("project_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_id").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SelfServiceReservationResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SelfServiceReservationResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SelfServiceReservationResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SelfServiceReservationResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SelfServiceReservationResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SelfServiceReservationResponse instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SelfServiceReservationResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of SelfServiceReservationResponse - * @throws IOException if the JSON string is invalid with respect to SelfServiceReservationResponse - */ - public static SelfServiceReservationResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SelfServiceReservationResponse.class); - } - - /** - * Convert an instance of SelfServiceReservationResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java deleted file mode 100644 index deaeab364..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/ServerInfo.java +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * ServerInfo - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ServerInfo { - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @Deprecated - @SerializedName(SERIALIZED_NAME_FACILITY) - private String facility; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_QUANTITY = "quantity"; - @SerializedName(SERIALIZED_NAME_QUANTITY) - private String quantity; - - public ServerInfo() { - } - - @Deprecated - public ServerInfo facility(String facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - * @deprecated - **/ - @Deprecated - @javax.annotation.Nullable - public String getFacility() { - return facility; - } - - - @Deprecated - public void setFacility(String facility) { - this.facility = facility; - } - - - public ServerInfo metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * The metro ID or code to check the capacity in. - * @return metro - **/ - @javax.annotation.Nullable - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public ServerInfo plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * The plan ID or slug to check the capacity of. - * @return plan - **/ - @javax.annotation.Nullable - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public ServerInfo quantity(String quantity) { - - this.quantity = quantity; - return this; - } - - /** - * The number of servers to check the capacity of. - * @return quantity - **/ - @javax.annotation.Nullable - public String getQuantity() { - return quantity; - } - - - public void setQuantity(String quantity) { - this.quantity = quantity; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ServerInfo instance itself - */ - public ServerInfo putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ServerInfo serverInfo = (ServerInfo) o; - return Objects.equals(this.facility, serverInfo.facility) && - Objects.equals(this.metro, serverInfo.metro) && - Objects.equals(this.plan, serverInfo.plan) && - Objects.equals(this.quantity, serverInfo.quantity)&& - Objects.equals(this.additionalProperties, serverInfo.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(facility, metro, plan, quantity, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ServerInfo {\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("facility"); - openapiFields.add("metro"); - openapiFields.add("plan"); - openapiFields.add("quantity"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ServerInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ServerInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ServerInfo is not found in the empty JSON string", ServerInfo.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) && !jsonObj.get("facility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - if ((jsonObj.get("quantity") != null && !jsonObj.get("quantity").isJsonNull()) && !jsonObj.get("quantity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `quantity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("quantity").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ServerInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ServerInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ServerInfo.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ServerInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ServerInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ServerInfo instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ServerInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of ServerInfo - * @throws IOException if the JSON string is invalid with respect to ServerInfo - */ - public static ServerInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ServerInfo.class); - } - - /** - * Convert an instance of ServerInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java deleted file mode 100644 index e65b404ca..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesList.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotPricesReport; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotMarketPricesList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotMarketPricesList { - public static final String SERIALIZED_NAME_SPOT_MARKET_PRICES = "spot_market_prices"; - @SerializedName(SERIALIZED_NAME_SPOT_MARKET_PRICES) - private SpotPricesReport spotMarketPrices; - - public SpotMarketPricesList() { - } - - public SpotMarketPricesList spotMarketPrices(SpotPricesReport spotMarketPrices) { - - this.spotMarketPrices = spotMarketPrices; - return this; - } - - /** - * Get spotMarketPrices - * @return spotMarketPrices - **/ - @javax.annotation.Nullable - public SpotPricesReport getSpotMarketPrices() { - return spotMarketPrices; - } - - - public void setSpotMarketPrices(SpotPricesReport spotMarketPrices) { - this.spotMarketPrices = spotMarketPrices; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotMarketPricesList instance itself - */ - public SpotMarketPricesList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotMarketPricesList spotMarketPricesList = (SpotMarketPricesList) o; - return Objects.equals(this.spotMarketPrices, spotMarketPricesList.spotMarketPrices)&& - Objects.equals(this.additionalProperties, spotMarketPricesList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(spotMarketPrices, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotMarketPricesList {\n"); - sb.append(" spotMarketPrices: ").append(toIndentedString(spotMarketPrices)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("spot_market_prices"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotMarketPricesList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotMarketPricesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketPricesList is not found in the empty JSON string", SpotMarketPricesList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `spot_market_prices` - if (jsonObj.get("spot_market_prices") != null && !jsonObj.get("spot_market_prices").isJsonNull()) { - SpotPricesReport.validateJsonElement(jsonObj.get("spot_market_prices")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotMarketPricesList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotMarketPricesList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotMarketPricesList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotMarketPricesList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotMarketPricesList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotMarketPricesList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotMarketPricesList given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotMarketPricesList - * @throws IOException if the JSON string is invalid with respect to SpotMarketPricesList - */ - public static SpotMarketPricesList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotMarketPricesList.class); - } - - /** - * Convert an instance of SpotMarketPricesList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java deleted file mode 100644 index 57ab3ab72..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroList.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotMarketPricesPerMetroReport; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotMarketPricesPerMetroList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotMarketPricesPerMetroList { - public static final String SERIALIZED_NAME_SPOT_MARKET_PRICES = "spot_market_prices"; - @SerializedName(SERIALIZED_NAME_SPOT_MARKET_PRICES) - private SpotMarketPricesPerMetroReport spotMarketPrices; - - public SpotMarketPricesPerMetroList() { - } - - public SpotMarketPricesPerMetroList spotMarketPrices(SpotMarketPricesPerMetroReport spotMarketPrices) { - - this.spotMarketPrices = spotMarketPrices; - return this; - } - - /** - * Get spotMarketPrices - * @return spotMarketPrices - **/ - @javax.annotation.Nullable - public SpotMarketPricesPerMetroReport getSpotMarketPrices() { - return spotMarketPrices; - } - - - public void setSpotMarketPrices(SpotMarketPricesPerMetroReport spotMarketPrices) { - this.spotMarketPrices = spotMarketPrices; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotMarketPricesPerMetroList instance itself - */ - public SpotMarketPricesPerMetroList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotMarketPricesPerMetroList spotMarketPricesPerMetroList = (SpotMarketPricesPerMetroList) o; - return Objects.equals(this.spotMarketPrices, spotMarketPricesPerMetroList.spotMarketPrices)&& - Objects.equals(this.additionalProperties, spotMarketPricesPerMetroList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(spotMarketPrices, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotMarketPricesPerMetroList {\n"); - sb.append(" spotMarketPrices: ").append(toIndentedString(spotMarketPrices)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("spot_market_prices"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotMarketPricesPerMetroList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotMarketPricesPerMetroList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketPricesPerMetroList is not found in the empty JSON string", SpotMarketPricesPerMetroList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `spot_market_prices` - if (jsonObj.get("spot_market_prices") != null && !jsonObj.get("spot_market_prices").isJsonNull()) { - SpotMarketPricesPerMetroReport.validateJsonElement(jsonObj.get("spot_market_prices")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotMarketPricesPerMetroList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotMarketPricesPerMetroList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotMarketPricesPerMetroList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotMarketPricesPerMetroList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotMarketPricesPerMetroList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotMarketPricesPerMetroList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotMarketPricesPerMetroList given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotMarketPricesPerMetroList - * @throws IOException if the JSON string is invalid with respect to SpotMarketPricesPerMetroList - */ - public static SpotMarketPricesPerMetroList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotMarketPricesPerMetroList.class); - } - - /** - * Convert an instance of SpotMarketPricesPerMetroList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java deleted file mode 100644 index 7283215ae..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReport.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotPricesPerFacility; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotMarketPricesPerMetroReport - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotMarketPricesPerMetroReport { - public static final String SERIALIZED_NAME_AM = "am"; - @SerializedName(SERIALIZED_NAME_AM) - private SpotPricesPerFacility am; - - public static final String SERIALIZED_NAME_CH = "ch"; - @SerializedName(SERIALIZED_NAME_CH) - private SpotPricesPerFacility ch; - - public static final String SERIALIZED_NAME_DA = "da"; - @SerializedName(SERIALIZED_NAME_DA) - private SpotPricesPerFacility da; - - public static final String SERIALIZED_NAME_LA = "la"; - @SerializedName(SERIALIZED_NAME_LA) - private SpotPricesPerFacility la; - - public static final String SERIALIZED_NAME_NY = "ny"; - @SerializedName(SERIALIZED_NAME_NY) - private SpotPricesPerFacility ny; - - public static final String SERIALIZED_NAME_SG = "sg"; - @SerializedName(SERIALIZED_NAME_SG) - private SpotPricesPerFacility sg; - - public static final String SERIALIZED_NAME_SV = "sv"; - @SerializedName(SERIALIZED_NAME_SV) - private SpotPricesPerFacility sv; - - public SpotMarketPricesPerMetroReport() { - } - - public SpotMarketPricesPerMetroReport am(SpotPricesPerFacility am) { - - this.am = am; - return this; - } - - /** - * Get am - * @return am - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getAm() { - return am; - } - - - public void setAm(SpotPricesPerFacility am) { - this.am = am; - } - - - public SpotMarketPricesPerMetroReport ch(SpotPricesPerFacility ch) { - - this.ch = ch; - return this; - } - - /** - * Get ch - * @return ch - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getCh() { - return ch; - } - - - public void setCh(SpotPricesPerFacility ch) { - this.ch = ch; - } - - - public SpotMarketPricesPerMetroReport da(SpotPricesPerFacility da) { - - this.da = da; - return this; - } - - /** - * Get da - * @return da - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getDa() { - return da; - } - - - public void setDa(SpotPricesPerFacility da) { - this.da = da; - } - - - public SpotMarketPricesPerMetroReport la(SpotPricesPerFacility la) { - - this.la = la; - return this; - } - - /** - * Get la - * @return la - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getLa() { - return la; - } - - - public void setLa(SpotPricesPerFacility la) { - this.la = la; - } - - - public SpotMarketPricesPerMetroReport ny(SpotPricesPerFacility ny) { - - this.ny = ny; - return this; - } - - /** - * Get ny - * @return ny - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getNy() { - return ny; - } - - - public void setNy(SpotPricesPerFacility ny) { - this.ny = ny; - } - - - public SpotMarketPricesPerMetroReport sg(SpotPricesPerFacility sg) { - - this.sg = sg; - return this; - } - - /** - * Get sg - * @return sg - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getSg() { - return sg; - } - - - public void setSg(SpotPricesPerFacility sg) { - this.sg = sg; - } - - - public SpotMarketPricesPerMetroReport sv(SpotPricesPerFacility sv) { - - this.sv = sv; - return this; - } - - /** - * Get sv - * @return sv - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getSv() { - return sv; - } - - - public void setSv(SpotPricesPerFacility sv) { - this.sv = sv; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotMarketPricesPerMetroReport instance itself - */ - public SpotMarketPricesPerMetroReport putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotMarketPricesPerMetroReport spotMarketPricesPerMetroReport = (SpotMarketPricesPerMetroReport) o; - return Objects.equals(this.am, spotMarketPricesPerMetroReport.am) && - Objects.equals(this.ch, spotMarketPricesPerMetroReport.ch) && - Objects.equals(this.da, spotMarketPricesPerMetroReport.da) && - Objects.equals(this.la, spotMarketPricesPerMetroReport.la) && - Objects.equals(this.ny, spotMarketPricesPerMetroReport.ny) && - Objects.equals(this.sg, spotMarketPricesPerMetroReport.sg) && - Objects.equals(this.sv, spotMarketPricesPerMetroReport.sv)&& - Objects.equals(this.additionalProperties, spotMarketPricesPerMetroReport.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(am, ch, da, la, ny, sg, sv, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotMarketPricesPerMetroReport {\n"); - sb.append(" am: ").append(toIndentedString(am)).append("\n"); - sb.append(" ch: ").append(toIndentedString(ch)).append("\n"); - sb.append(" da: ").append(toIndentedString(da)).append("\n"); - sb.append(" la: ").append(toIndentedString(la)).append("\n"); - sb.append(" ny: ").append(toIndentedString(ny)).append("\n"); - sb.append(" sg: ").append(toIndentedString(sg)).append("\n"); - sb.append(" sv: ").append(toIndentedString(sv)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("am"); - openapiFields.add("ch"); - openapiFields.add("da"); - openapiFields.add("la"); - openapiFields.add("ny"); - openapiFields.add("sg"); - openapiFields.add("sv"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotMarketPricesPerMetroReport - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotMarketPricesPerMetroReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketPricesPerMetroReport is not found in the empty JSON string", SpotMarketPricesPerMetroReport.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `am` - if (jsonObj.get("am") != null && !jsonObj.get("am").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("am")); - } - // validate the optional field `ch` - if (jsonObj.get("ch") != null && !jsonObj.get("ch").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("ch")); - } - // validate the optional field `da` - if (jsonObj.get("da") != null && !jsonObj.get("da").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("da")); - } - // validate the optional field `la` - if (jsonObj.get("la") != null && !jsonObj.get("la").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("la")); - } - // validate the optional field `ny` - if (jsonObj.get("ny") != null && !jsonObj.get("ny").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("ny")); - } - // validate the optional field `sg` - if (jsonObj.get("sg") != null && !jsonObj.get("sg").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("sg")); - } - // validate the optional field `sv` - if (jsonObj.get("sv") != null && !jsonObj.get("sv").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("sv")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotMarketPricesPerMetroReport.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotMarketPricesPerMetroReport' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotMarketPricesPerMetroReport.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotMarketPricesPerMetroReport value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotMarketPricesPerMetroReport read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotMarketPricesPerMetroReport instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotMarketPricesPerMetroReport given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotMarketPricesPerMetroReport - * @throws IOException if the JSON string is invalid with respect to SpotMarketPricesPerMetroReport - */ - public static SpotMarketPricesPerMetroReport fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotMarketPricesPerMetroReport.class); - } - - /** - * Convert an instance of SpotMarketPricesPerMetroReport to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java deleted file mode 100644 index ffcbac151..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequest.java +++ /dev/null @@ -1,588 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.SpotMarketRequestMetro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotMarketRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotMarketRequest { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_DEVICES_MAX = "devices_max"; - @SerializedName(SERIALIZED_NAME_DEVICES_MAX) - private Integer devicesMax; - - public static final String SERIALIZED_NAME_DEVICES_MIN = "devices_min"; - @SerializedName(SERIALIZED_NAME_DEVICES_MIN) - private Integer devicesMin; - - public static final String SERIALIZED_NAME_END_AT = "end_at"; - @SerializedName(SERIALIZED_NAME_END_AT) - private OffsetDateTime endAt; - - public static final String SERIALIZED_NAME_FACILITIES = "facilities"; - @SerializedName(SERIALIZED_NAME_FACILITIES) - private Href facilities; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_INSTANCES = "instances"; - @SerializedName(SERIALIZED_NAME_INSTANCES) - private Href instances; - - public static final String SERIALIZED_NAME_MAX_BID_PRICE = "max_bid_price"; - @SerializedName(SERIALIZED_NAME_MAX_BID_PRICE) - private Float maxBidPrice; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private SpotMarketRequestMetro metro; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public SpotMarketRequest() { - } - - public SpotMarketRequest createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public SpotMarketRequest devicesMax(Integer devicesMax) { - - this.devicesMax = devicesMax; - return this; - } - - /** - * Get devicesMax - * @return devicesMax - **/ - @javax.annotation.Nullable - public Integer getDevicesMax() { - return devicesMax; - } - - - public void setDevicesMax(Integer devicesMax) { - this.devicesMax = devicesMax; - } - - - public SpotMarketRequest devicesMin(Integer devicesMin) { - - this.devicesMin = devicesMin; - return this; - } - - /** - * Get devicesMin - * @return devicesMin - **/ - @javax.annotation.Nullable - public Integer getDevicesMin() { - return devicesMin; - } - - - public void setDevicesMin(Integer devicesMin) { - this.devicesMin = devicesMin; - } - - - public SpotMarketRequest endAt(OffsetDateTime endAt) { - - this.endAt = endAt; - return this; - } - - /** - * Get endAt - * @return endAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getEndAt() { - return endAt; - } - - - public void setEndAt(OffsetDateTime endAt) { - this.endAt = endAt; - } - - - public SpotMarketRequest facilities(Href facilities) { - - this.facilities = facilities; - return this; - } - - /** - * Get facilities - * @return facilities - **/ - @javax.annotation.Nullable - public Href getFacilities() { - return facilities; - } - - - public void setFacilities(Href facilities) { - this.facilities = facilities; - } - - - public SpotMarketRequest href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public SpotMarketRequest id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public SpotMarketRequest instances(Href instances) { - - this.instances = instances; - return this; - } - - /** - * Get instances - * @return instances - **/ - @javax.annotation.Nullable - public Href getInstances() { - return instances; - } - - - public void setInstances(Href instances) { - this.instances = instances; - } - - - public SpotMarketRequest maxBidPrice(Float maxBidPrice) { - - this.maxBidPrice = maxBidPrice; - return this; - } - - /** - * Get maxBidPrice - * @return maxBidPrice - **/ - @javax.annotation.Nullable - public Float getMaxBidPrice() { - return maxBidPrice; - } - - - public void setMaxBidPrice(Float maxBidPrice) { - this.maxBidPrice = maxBidPrice; - } - - - public SpotMarketRequest metro(SpotMarketRequestMetro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public SpotMarketRequestMetro getMetro() { - return metro; - } - - - public void setMetro(SpotMarketRequestMetro metro) { - this.metro = metro; - } - - - public SpotMarketRequest project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotMarketRequest instance itself - */ - public SpotMarketRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotMarketRequest spotMarketRequest = (SpotMarketRequest) o; - return Objects.equals(this.createdAt, spotMarketRequest.createdAt) && - Objects.equals(this.devicesMax, spotMarketRequest.devicesMax) && - Objects.equals(this.devicesMin, spotMarketRequest.devicesMin) && - Objects.equals(this.endAt, spotMarketRequest.endAt) && - Objects.equals(this.facilities, spotMarketRequest.facilities) && - Objects.equals(this.href, spotMarketRequest.href) && - Objects.equals(this.id, spotMarketRequest.id) && - Objects.equals(this.instances, spotMarketRequest.instances) && - Objects.equals(this.maxBidPrice, spotMarketRequest.maxBidPrice) && - Objects.equals(this.metro, spotMarketRequest.metro) && - Objects.equals(this.project, spotMarketRequest.project)&& - Objects.equals(this.additionalProperties, spotMarketRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, devicesMax, devicesMin, endAt, facilities, href, id, instances, maxBidPrice, metro, project, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotMarketRequest {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" devicesMax: ").append(toIndentedString(devicesMax)).append("\n"); - sb.append(" devicesMin: ").append(toIndentedString(devicesMin)).append("\n"); - sb.append(" endAt: ").append(toIndentedString(endAt)).append("\n"); - sb.append(" facilities: ").append(toIndentedString(facilities)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); - sb.append(" maxBidPrice: ").append(toIndentedString(maxBidPrice)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("devices_max"); - openapiFields.add("devices_min"); - openapiFields.add("end_at"); - openapiFields.add("facilities"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("instances"); - openapiFields.add("max_bid_price"); - openapiFields.add("metro"); - openapiFields.add("project"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotMarketRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotMarketRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequest is not found in the empty JSON string", SpotMarketRequest.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `facilities` - if (jsonObj.get("facilities") != null && !jsonObj.get("facilities").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("facilities")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `instances` - if (jsonObj.get("instances") != null && !jsonObj.get("instances").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("instances")); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - SpotMarketRequestMetro.validateJsonElement(jsonObj.get("metro")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotMarketRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotMarketRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotMarketRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotMarketRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotMarketRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotMarketRequest instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotMarketRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotMarketRequest - * @throws IOException if the JSON string is invalid with respect to SpotMarketRequest - */ - public static SpotMarketRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotMarketRequest.class); - } - - /** - * Convert an instance of SpotMarketRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java deleted file mode 100644 index 68ed97e9a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInput.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotMarketRequestCreateInputInstanceParameters; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotMarketRequestCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotMarketRequestCreateInput { - public static final String SERIALIZED_NAME_DEVICES_MAX = "devices_max"; - @SerializedName(SERIALIZED_NAME_DEVICES_MAX) - private Integer devicesMax; - - public static final String SERIALIZED_NAME_DEVICES_MIN = "devices_min"; - @SerializedName(SERIALIZED_NAME_DEVICES_MIN) - private Integer devicesMin; - - public static final String SERIALIZED_NAME_END_AT = "end_at"; - @SerializedName(SERIALIZED_NAME_END_AT) - private OffsetDateTime endAt; - - public static final String SERIALIZED_NAME_FACILITIES = "facilities"; - @Deprecated - @SerializedName(SERIALIZED_NAME_FACILITIES) - private List facilities; - - public static final String SERIALIZED_NAME_INSTANCE_PARAMETERS = "instance_parameters"; - @SerializedName(SERIALIZED_NAME_INSTANCE_PARAMETERS) - private SpotMarketRequestCreateInputInstanceParameters instanceParameters; - - public static final String SERIALIZED_NAME_MAX_BID_PRICE = "max_bid_price"; - @SerializedName(SERIALIZED_NAME_MAX_BID_PRICE) - private Float maxBidPrice; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public SpotMarketRequestCreateInput() { - } - - public SpotMarketRequestCreateInput devicesMax(Integer devicesMax) { - - this.devicesMax = devicesMax; - return this; - } - - /** - * Get devicesMax - * @return devicesMax - **/ - @javax.annotation.Nullable - public Integer getDevicesMax() { - return devicesMax; - } - - - public void setDevicesMax(Integer devicesMax) { - this.devicesMax = devicesMax; - } - - - public SpotMarketRequestCreateInput devicesMin(Integer devicesMin) { - - this.devicesMin = devicesMin; - return this; - } - - /** - * Get devicesMin - * @return devicesMin - **/ - @javax.annotation.Nullable - public Integer getDevicesMin() { - return devicesMin; - } - - - public void setDevicesMin(Integer devicesMin) { - this.devicesMin = devicesMin; - } - - - public SpotMarketRequestCreateInput endAt(OffsetDateTime endAt) { - - this.endAt = endAt; - return this; - } - - /** - * Get endAt - * @return endAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getEndAt() { - return endAt; - } - - - public void setEndAt(OffsetDateTime endAt) { - this.endAt = endAt; - } - - - @Deprecated - public SpotMarketRequestCreateInput facilities(List facilities) { - - this.facilities = facilities; - return this; - } - - public SpotMarketRequestCreateInput addFacilitiesItem(UUID facilitiesItem) { - if (this.facilities == null) { - this.facilities = new ArrayList<>(); - } - this.facilities.add(facilitiesItem); - return this; - } - - /** - * Get facilities - * @return facilities - * @deprecated - **/ - @Deprecated - @javax.annotation.Nullable - public List getFacilities() { - return facilities; - } - - - @Deprecated - public void setFacilities(List facilities) { - this.facilities = facilities; - } - - - public SpotMarketRequestCreateInput instanceParameters(SpotMarketRequestCreateInputInstanceParameters instanceParameters) { - - this.instanceParameters = instanceParameters; - return this; - } - - /** - * Get instanceParameters - * @return instanceParameters - **/ - @javax.annotation.Nullable - public SpotMarketRequestCreateInputInstanceParameters getInstanceParameters() { - return instanceParameters; - } - - - public void setInstanceParameters(SpotMarketRequestCreateInputInstanceParameters instanceParameters) { - this.instanceParameters = instanceParameters; - } - - - public SpotMarketRequestCreateInput maxBidPrice(Float maxBidPrice) { - - this.maxBidPrice = maxBidPrice; - return this; - } - - /** - * Get maxBidPrice - * @return maxBidPrice - **/ - @javax.annotation.Nullable - public Float getMaxBidPrice() { - return maxBidPrice; - } - - - public void setMaxBidPrice(Float maxBidPrice) { - this.maxBidPrice = maxBidPrice; - } - - - public SpotMarketRequestCreateInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * The metro ID or code the spot market request will be created in. - * @return metro - **/ - @javax.annotation.Nullable - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotMarketRequestCreateInput instance itself - */ - public SpotMarketRequestCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotMarketRequestCreateInput spotMarketRequestCreateInput = (SpotMarketRequestCreateInput) o; - return Objects.equals(this.devicesMax, spotMarketRequestCreateInput.devicesMax) && - Objects.equals(this.devicesMin, spotMarketRequestCreateInput.devicesMin) && - Objects.equals(this.endAt, spotMarketRequestCreateInput.endAt) && - Objects.equals(this.facilities, spotMarketRequestCreateInput.facilities) && - Objects.equals(this.instanceParameters, spotMarketRequestCreateInput.instanceParameters) && - Objects.equals(this.maxBidPrice, spotMarketRequestCreateInput.maxBidPrice) && - Objects.equals(this.metro, spotMarketRequestCreateInput.metro)&& - Objects.equals(this.additionalProperties, spotMarketRequestCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(devicesMax, devicesMin, endAt, facilities, instanceParameters, maxBidPrice, metro, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotMarketRequestCreateInput {\n"); - sb.append(" devicesMax: ").append(toIndentedString(devicesMax)).append("\n"); - sb.append(" devicesMin: ").append(toIndentedString(devicesMin)).append("\n"); - sb.append(" endAt: ").append(toIndentedString(endAt)).append("\n"); - sb.append(" facilities: ").append(toIndentedString(facilities)).append("\n"); - sb.append(" instanceParameters: ").append(toIndentedString(instanceParameters)).append("\n"); - sb.append(" maxBidPrice: ").append(toIndentedString(maxBidPrice)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("devices_max"); - openapiFields.add("devices_min"); - openapiFields.add("end_at"); - openapiFields.add("facilities"); - openapiFields.add("instance_parameters"); - openapiFields.add("max_bid_price"); - openapiFields.add("metro"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotMarketRequestCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotMarketRequestCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestCreateInput is not found in the empty JSON string", SpotMarketRequestCreateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("facilities") != null && !jsonObj.get("facilities").isJsonNull() && !jsonObj.get("facilities").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `facilities` to be an array in the JSON string but got `%s`", jsonObj.get("facilities").toString())); - } - // validate the optional field `instance_parameters` - if (jsonObj.get("instance_parameters") != null && !jsonObj.get("instance_parameters").isJsonNull()) { - SpotMarketRequestCreateInputInstanceParameters.validateJsonElement(jsonObj.get("instance_parameters")); - } - if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotMarketRequestCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotMarketRequestCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotMarketRequestCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotMarketRequestCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotMarketRequestCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotMarketRequestCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotMarketRequestCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotMarketRequestCreateInput - * @throws IOException if the JSON string is invalid with respect to SpotMarketRequestCreateInput - */ - public static SpotMarketRequestCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotMarketRequestCreateInput.class); - } - - /** - * Convert an instance of SpotMarketRequestCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceParameters.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceParameters.java deleted file mode 100644 index 107f11746..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceParameters.java +++ /dev/null @@ -1,840 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotMarketRequestCreateInputInstanceParameters - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotMarketRequestCreateInputInstanceParameters { - public static final String SERIALIZED_NAME_ALWAYS_PXE = "always_pxe"; - @SerializedName(SERIALIZED_NAME_ALWAYS_PXE) - private Boolean alwaysPxe; - - public static final String SERIALIZED_NAME_BILLING_CYCLE = "billing_cycle"; - @SerializedName(SERIALIZED_NAME_BILLING_CYCLE) - private String billingCycle; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FEATURES = "features"; - @SerializedName(SERIALIZED_NAME_FEATURES) - private List features; - - public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; - @SerializedName(SERIALIZED_NAME_HOSTNAME) - private String hostname; - - public static final String SERIALIZED_NAME_HOSTNAMES = "hostnames"; - @SerializedName(SERIALIZED_NAME_HOSTNAMES) - private List hostnames; - - public static final String SERIALIZED_NAME_LOCKED = "locked"; - @SerializedName(SERIALIZED_NAME_LOCKED) - private Boolean locked; - - public static final String SERIALIZED_NAME_NO_SSH_KEYS = "no_ssh_keys"; - @SerializedName(SERIALIZED_NAME_NO_SSH_KEYS) - private Boolean noSshKeys; - - public static final String SERIALIZED_NAME_OPERATING_SYSTEM = "operating_system"; - @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEM) - private String operatingSystem; - - public static final String SERIALIZED_NAME_PLAN = "plan"; - @SerializedName(SERIALIZED_NAME_PLAN) - private String plan; - - public static final String SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE = "private_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PRIVATE_IPV4_SUBNET_SIZE) - private Integer privateIpv4SubnetSize; - - public static final String SERIALIZED_NAME_PROJECT_SSH_KEYS = "project_ssh_keys"; - @SerializedName(SERIALIZED_NAME_PROJECT_SSH_KEYS) - private List projectSshKeys; - - public static final String SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE = "public_ipv4_subnet_size"; - @SerializedName(SERIALIZED_NAME_PUBLIC_IPV4_SUBNET_SIZE) - private Integer publicIpv4SubnetSize; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TERMINATION_TIME = "termination_time"; - @SerializedName(SERIALIZED_NAME_TERMINATION_TIME) - private OffsetDateTime terminationTime; - - public static final String SERIALIZED_NAME_USER_SSH_KEYS = "user_ssh_keys"; - @SerializedName(SERIALIZED_NAME_USER_SSH_KEYS) - private List userSshKeys; - - public static final String SERIALIZED_NAME_USERDATA = "userdata"; - @SerializedName(SERIALIZED_NAME_USERDATA) - private String userdata; - - public SpotMarketRequestCreateInputInstanceParameters() { - } - - public SpotMarketRequestCreateInputInstanceParameters alwaysPxe(Boolean alwaysPxe) { - - this.alwaysPxe = alwaysPxe; - return this; - } - - /** - * Get alwaysPxe - * @return alwaysPxe - **/ - @javax.annotation.Nullable - public Boolean getAlwaysPxe() { - return alwaysPxe; - } - - - public void setAlwaysPxe(Boolean alwaysPxe) { - this.alwaysPxe = alwaysPxe; - } - - - public SpotMarketRequestCreateInputInstanceParameters billingCycle(String billingCycle) { - - this.billingCycle = billingCycle; - return this; - } - - /** - * Get billingCycle - * @return billingCycle - **/ - @javax.annotation.Nullable - public String getBillingCycle() { - return billingCycle; - } - - - public void setBillingCycle(String billingCycle) { - this.billingCycle = billingCycle; - } - - - public SpotMarketRequestCreateInputInstanceParameters customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public SpotMarketRequestCreateInputInstanceParameters description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public SpotMarketRequestCreateInputInstanceParameters features(List features) { - - this.features = features; - return this; - } - - public SpotMarketRequestCreateInputInstanceParameters addFeaturesItem(String featuresItem) { - if (this.features == null) { - this.features = new ArrayList<>(); - } - this.features.add(featuresItem); - return this; - } - - /** - * Get features - * @return features - **/ - @javax.annotation.Nullable - public List getFeatures() { - return features; - } - - - public void setFeatures(List features) { - this.features = features; - } - - - public SpotMarketRequestCreateInputInstanceParameters hostname(String hostname) { - - this.hostname = hostname; - return this; - } - - /** - * Get hostname - * @return hostname - **/ - @javax.annotation.Nullable - public String getHostname() { - return hostname; - } - - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - - public SpotMarketRequestCreateInputInstanceParameters hostnames(List hostnames) { - - this.hostnames = hostnames; - return this; - } - - public SpotMarketRequestCreateInputInstanceParameters addHostnamesItem(String hostnamesItem) { - if (this.hostnames == null) { - this.hostnames = new ArrayList<>(); - } - this.hostnames.add(hostnamesItem); - return this; - } - - /** - * Get hostnames - * @return hostnames - **/ - @javax.annotation.Nullable - public List getHostnames() { - return hostnames; - } - - - public void setHostnames(List hostnames) { - this.hostnames = hostnames; - } - - - public SpotMarketRequestCreateInputInstanceParameters locked(Boolean locked) { - - this.locked = locked; - return this; - } - - /** - * Whether the device should be locked, preventing accidental deletion. - * @return locked - **/ - @javax.annotation.Nullable - public Boolean getLocked() { - return locked; - } - - - public void setLocked(Boolean locked) { - this.locked = locked; - } - - - public SpotMarketRequestCreateInputInstanceParameters noSshKeys(Boolean noSshKeys) { - - this.noSshKeys = noSshKeys; - return this; - } - - /** - * Get noSshKeys - * @return noSshKeys - **/ - @javax.annotation.Nullable - public Boolean getNoSshKeys() { - return noSshKeys; - } - - - public void setNoSshKeys(Boolean noSshKeys) { - this.noSshKeys = noSshKeys; - } - - - public SpotMarketRequestCreateInputInstanceParameters operatingSystem(String operatingSystem) { - - this.operatingSystem = operatingSystem; - return this; - } - - /** - * Get operatingSystem - * @return operatingSystem - **/ - @javax.annotation.Nullable - public String getOperatingSystem() { - return operatingSystem; - } - - - public void setOperatingSystem(String operatingSystem) { - this.operatingSystem = operatingSystem; - } - - - public SpotMarketRequestCreateInputInstanceParameters plan(String plan) { - - this.plan = plan; - return this; - } - - /** - * Get plan - * @return plan - **/ - @javax.annotation.Nullable - public String getPlan() { - return plan; - } - - - public void setPlan(String plan) { - this.plan = plan; - } - - - public SpotMarketRequestCreateInputInstanceParameters privateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - return this; - } - - /** - * Get privateIpv4SubnetSize - * @return privateIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPrivateIpv4SubnetSize() { - return privateIpv4SubnetSize; - } - - - public void setPrivateIpv4SubnetSize(Integer privateIpv4SubnetSize) { - this.privateIpv4SubnetSize = privateIpv4SubnetSize; - } - - - public SpotMarketRequestCreateInputInstanceParameters projectSshKeys(List projectSshKeys) { - - this.projectSshKeys = projectSshKeys; - return this; - } - - public SpotMarketRequestCreateInputInstanceParameters addProjectSshKeysItem(UUID projectSshKeysItem) { - if (this.projectSshKeys == null) { - this.projectSshKeys = new ArrayList<>(); - } - this.projectSshKeys.add(projectSshKeysItem); - return this; - } - - /** - * Get projectSshKeys - * @return projectSshKeys - **/ - @javax.annotation.Nullable - public List getProjectSshKeys() { - return projectSshKeys; - } - - - public void setProjectSshKeys(List projectSshKeys) { - this.projectSshKeys = projectSshKeys; - } - - - public SpotMarketRequestCreateInputInstanceParameters publicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - return this; - } - - /** - * Get publicIpv4SubnetSize - * @return publicIpv4SubnetSize - **/ - @javax.annotation.Nullable - public Integer getPublicIpv4SubnetSize() { - return publicIpv4SubnetSize; - } - - - public void setPublicIpv4SubnetSize(Integer publicIpv4SubnetSize) { - this.publicIpv4SubnetSize = publicIpv4SubnetSize; - } - - - public SpotMarketRequestCreateInputInstanceParameters tags(List tags) { - - this.tags = tags; - return this; - } - - public SpotMarketRequestCreateInputInstanceParameters addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public SpotMarketRequestCreateInputInstanceParameters terminationTime(OffsetDateTime terminationTime) { - - this.terminationTime = terminationTime; - return this; - } - - /** - * Get terminationTime - * @return terminationTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getTerminationTime() { - return terminationTime; - } - - - public void setTerminationTime(OffsetDateTime terminationTime) { - this.terminationTime = terminationTime; - } - - - public SpotMarketRequestCreateInputInstanceParameters userSshKeys(List userSshKeys) { - - this.userSshKeys = userSshKeys; - return this; - } - - public SpotMarketRequestCreateInputInstanceParameters addUserSshKeysItem(UUID userSshKeysItem) { - if (this.userSshKeys == null) { - this.userSshKeys = new ArrayList<>(); - } - this.userSshKeys.add(userSshKeysItem); - return this; - } - - /** - * The UUIDs of users whose SSH keys should be included on the provisioned device. - * @return userSshKeys - **/ - @javax.annotation.Nullable - public List getUserSshKeys() { - return userSshKeys; - } - - - public void setUserSshKeys(List userSshKeys) { - this.userSshKeys = userSshKeys; - } - - - public SpotMarketRequestCreateInputInstanceParameters userdata(String userdata) { - - this.userdata = userdata; - return this; - } - - /** - * Get userdata - * @return userdata - **/ - @javax.annotation.Nullable - public String getUserdata() { - return userdata; - } - - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotMarketRequestCreateInputInstanceParameters instance itself - */ - public SpotMarketRequestCreateInputInstanceParameters putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotMarketRequestCreateInputInstanceParameters spotMarketRequestCreateInputInstanceParameters = (SpotMarketRequestCreateInputInstanceParameters) o; - return Objects.equals(this.alwaysPxe, spotMarketRequestCreateInputInstanceParameters.alwaysPxe) && - Objects.equals(this.billingCycle, spotMarketRequestCreateInputInstanceParameters.billingCycle) && - Objects.equals(this.customdata, spotMarketRequestCreateInputInstanceParameters.customdata) && - Objects.equals(this.description, spotMarketRequestCreateInputInstanceParameters.description) && - Objects.equals(this.features, spotMarketRequestCreateInputInstanceParameters.features) && - Objects.equals(this.hostname, spotMarketRequestCreateInputInstanceParameters.hostname) && - Objects.equals(this.hostnames, spotMarketRequestCreateInputInstanceParameters.hostnames) && - Objects.equals(this.locked, spotMarketRequestCreateInputInstanceParameters.locked) && - Objects.equals(this.noSshKeys, spotMarketRequestCreateInputInstanceParameters.noSshKeys) && - Objects.equals(this.operatingSystem, spotMarketRequestCreateInputInstanceParameters.operatingSystem) && - Objects.equals(this.plan, spotMarketRequestCreateInputInstanceParameters.plan) && - Objects.equals(this.privateIpv4SubnetSize, spotMarketRequestCreateInputInstanceParameters.privateIpv4SubnetSize) && - Objects.equals(this.projectSshKeys, spotMarketRequestCreateInputInstanceParameters.projectSshKeys) && - Objects.equals(this.publicIpv4SubnetSize, spotMarketRequestCreateInputInstanceParameters.publicIpv4SubnetSize) && - Objects.equals(this.tags, spotMarketRequestCreateInputInstanceParameters.tags) && - Objects.equals(this.terminationTime, spotMarketRequestCreateInputInstanceParameters.terminationTime) && - Objects.equals(this.userSshKeys, spotMarketRequestCreateInputInstanceParameters.userSshKeys) && - Objects.equals(this.userdata, spotMarketRequestCreateInputInstanceParameters.userdata)&& - Objects.equals(this.additionalProperties, spotMarketRequestCreateInputInstanceParameters.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(alwaysPxe, billingCycle, customdata, description, features, hostname, hostnames, locked, noSshKeys, operatingSystem, plan, privateIpv4SubnetSize, projectSshKeys, publicIpv4SubnetSize, tags, terminationTime, userSshKeys, userdata, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotMarketRequestCreateInputInstanceParameters {\n"); - sb.append(" alwaysPxe: ").append(toIndentedString(alwaysPxe)).append("\n"); - sb.append(" billingCycle: ").append(toIndentedString(billingCycle)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" features: ").append(toIndentedString(features)).append("\n"); - sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); - sb.append(" hostnames: ").append(toIndentedString(hostnames)).append("\n"); - sb.append(" locked: ").append(toIndentedString(locked)).append("\n"); - sb.append(" noSshKeys: ").append(toIndentedString(noSshKeys)).append("\n"); - sb.append(" operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n"); - sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); - sb.append(" privateIpv4SubnetSize: ").append(toIndentedString(privateIpv4SubnetSize)).append("\n"); - sb.append(" projectSshKeys: ").append(toIndentedString(projectSshKeys)).append("\n"); - sb.append(" publicIpv4SubnetSize: ").append(toIndentedString(publicIpv4SubnetSize)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" terminationTime: ").append(toIndentedString(terminationTime)).append("\n"); - sb.append(" userSshKeys: ").append(toIndentedString(userSshKeys)).append("\n"); - sb.append(" userdata: ").append(toIndentedString(userdata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("always_pxe"); - openapiFields.add("billing_cycle"); - openapiFields.add("customdata"); - openapiFields.add("description"); - openapiFields.add("features"); - openapiFields.add("hostname"); - openapiFields.add("hostnames"); - openapiFields.add("locked"); - openapiFields.add("no_ssh_keys"); - openapiFields.add("operating_system"); - openapiFields.add("plan"); - openapiFields.add("private_ipv4_subnet_size"); - openapiFields.add("project_ssh_keys"); - openapiFields.add("public_ipv4_subnet_size"); - openapiFields.add("tags"); - openapiFields.add("termination_time"); - openapiFields.add("user_ssh_keys"); - openapiFields.add("userdata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotMarketRequestCreateInputInstanceParameters - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotMarketRequestCreateInputInstanceParameters.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestCreateInputInstanceParameters is not found in the empty JSON string", SpotMarketRequestCreateInputInstanceParameters.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("billing_cycle") != null && !jsonObj.get("billing_cycle").isJsonNull()) && !jsonObj.get("billing_cycle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `billing_cycle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billing_cycle").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("features") != null && !jsonObj.get("features").isJsonNull() && !jsonObj.get("features").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `features` to be an array in the JSON string but got `%s`", jsonObj.get("features").toString())); - } - if ((jsonObj.get("hostname") != null && !jsonObj.get("hostname").isJsonNull()) && !jsonObj.get("hostname").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `hostname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("hostname").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("hostnames") != null && !jsonObj.get("hostnames").isJsonNull() && !jsonObj.get("hostnames").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `hostnames` to be an array in the JSON string but got `%s`", jsonObj.get("hostnames").toString())); - } - if ((jsonObj.get("operating_system") != null && !jsonObj.get("operating_system").isJsonNull()) && !jsonObj.get("operating_system").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operating_system` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operating_system").toString())); - } - if ((jsonObj.get("plan") != null && !jsonObj.get("plan").isJsonNull()) && !jsonObj.get("plan").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `plan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plan").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("project_ssh_keys") != null && !jsonObj.get("project_ssh_keys").isJsonNull() && !jsonObj.get("project_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `project_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("project_ssh_keys").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("user_ssh_keys") != null && !jsonObj.get("user_ssh_keys").isJsonNull() && !jsonObj.get("user_ssh_keys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `user_ssh_keys` to be an array in the JSON string but got `%s`", jsonObj.get("user_ssh_keys").toString())); - } - if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userdata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userdata").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotMarketRequestCreateInputInstanceParameters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotMarketRequestCreateInputInstanceParameters' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotMarketRequestCreateInputInstanceParameters.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotMarketRequestCreateInputInstanceParameters value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotMarketRequestCreateInputInstanceParameters read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotMarketRequestCreateInputInstanceParameters instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotMarketRequestCreateInputInstanceParameters given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotMarketRequestCreateInputInstanceParameters - * @throws IOException if the JSON string is invalid with respect to SpotMarketRequestCreateInputInstanceParameters - */ - public static SpotMarketRequestCreateInputInstanceParameters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotMarketRequestCreateInputInstanceParameters.class); - } - - /** - * Convert an instance of SpotMarketRequestCreateInputInstanceParameters to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java deleted file mode 100644 index a698cc095..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotMarketRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotMarketRequestList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotMarketRequestList { - public static final String SERIALIZED_NAME_SPOT_MARKET_REQUESTS = "spot_market_requests"; - @SerializedName(SERIALIZED_NAME_SPOT_MARKET_REQUESTS) - private List spotMarketRequests; - - public SpotMarketRequestList() { - } - - public SpotMarketRequestList spotMarketRequests(List spotMarketRequests) { - - this.spotMarketRequests = spotMarketRequests; - return this; - } - - public SpotMarketRequestList addSpotMarketRequestsItem(SpotMarketRequest spotMarketRequestsItem) { - if (this.spotMarketRequests == null) { - this.spotMarketRequests = new ArrayList<>(); - } - this.spotMarketRequests.add(spotMarketRequestsItem); - return this; - } - - /** - * Get spotMarketRequests - * @return spotMarketRequests - **/ - @javax.annotation.Nullable - public List getSpotMarketRequests() { - return spotMarketRequests; - } - - - public void setSpotMarketRequests(List spotMarketRequests) { - this.spotMarketRequests = spotMarketRequests; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotMarketRequestList instance itself - */ - public SpotMarketRequestList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotMarketRequestList spotMarketRequestList = (SpotMarketRequestList) o; - return Objects.equals(this.spotMarketRequests, spotMarketRequestList.spotMarketRequests)&& - Objects.equals(this.additionalProperties, spotMarketRequestList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(spotMarketRequests, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotMarketRequestList {\n"); - sb.append(" spotMarketRequests: ").append(toIndentedString(spotMarketRequests)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("spot_market_requests"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotMarketRequestList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotMarketRequestList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestList is not found in the empty JSON string", SpotMarketRequestList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("spot_market_requests") != null && !jsonObj.get("spot_market_requests").isJsonNull()) { - JsonArray jsonArrayspotMarketRequests = jsonObj.getAsJsonArray("spot_market_requests"); - if (jsonArrayspotMarketRequests != null) { - // ensure the json data is an array - if (!jsonObj.get("spot_market_requests").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `spot_market_requests` to be an array in the JSON string but got `%s`", jsonObj.get("spot_market_requests").toString())); - } - - // validate the optional field `spot_market_requests` (array) - for (int i = 0; i < jsonArrayspotMarketRequests.size(); i++) { - SpotMarketRequest.validateJsonElement(jsonArrayspotMarketRequests.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotMarketRequestList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotMarketRequestList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotMarketRequestList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotMarketRequestList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotMarketRequestList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotMarketRequestList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotMarketRequestList given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotMarketRequestList - * @throws IOException if the JSON string is invalid with respect to SpotMarketRequestList - */ - public static SpotMarketRequestList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotMarketRequestList.class); - } - - /** - * Convert an instance of SpotMarketRequestList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java deleted file mode 100644 index 6b4970b00..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetro.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotMarketRequestMetro - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotMarketRequestMetro { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private String code; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public SpotMarketRequestMetro() { - } - - public SpotMarketRequestMetro code(String code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - public String getCode() { - return code; - } - - - public void setCode(String code) { - this.code = code; - } - - - public SpotMarketRequestMetro country(String country) { - - this.country = country; - return this; - } - - /** - * Get country - * @return country - **/ - @javax.annotation.Nullable - public String getCountry() { - return country; - } - - - public void setCountry(String country) { - this.country = country; - } - - - public SpotMarketRequestMetro id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public SpotMarketRequestMetro name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotMarketRequestMetro instance itself - */ - public SpotMarketRequestMetro putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotMarketRequestMetro spotMarketRequestMetro = (SpotMarketRequestMetro) o; - return Objects.equals(this.code, spotMarketRequestMetro.code) && - Objects.equals(this.country, spotMarketRequestMetro.country) && - Objects.equals(this.id, spotMarketRequestMetro.id) && - Objects.equals(this.name, spotMarketRequestMetro.name)&& - Objects.equals(this.additionalProperties, spotMarketRequestMetro.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(code, country, id, name, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotMarketRequestMetro {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("country"); - openapiFields.add("id"); - openapiFields.add("name"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotMarketRequestMetro - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotMarketRequestMetro.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotMarketRequestMetro is not found in the empty JSON string", SpotMarketRequestMetro.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); - } - if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotMarketRequestMetro.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotMarketRequestMetro' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotMarketRequestMetro.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotMarketRequestMetro value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotMarketRequestMetro read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotMarketRequestMetro instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotMarketRequestMetro given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotMarketRequestMetro - * @throws IOException if the JSON string is invalid with respect to SpotMarketRequestMetro - */ - public static SpotMarketRequestMetro fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotMarketRequestMetro.class); - } - - /** - * Convert an instance of SpotMarketRequestMetro to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java deleted file mode 100644 index 797347c08..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapoints.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotPricesDatapoints - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotPricesDatapoints { - public static final String SERIALIZED_NAME_DATAPOINTS = "datapoints"; - @SerializedName(SERIALIZED_NAME_DATAPOINTS) - private List> datapoints; - - public SpotPricesDatapoints() { - } - - public SpotPricesDatapoints datapoints(List> datapoints) { - - this.datapoints = datapoints; - return this; - } - - public SpotPricesDatapoints addDatapointsItem(List datapointsItem) { - if (this.datapoints == null) { - this.datapoints = new ArrayList<>(); - } - this.datapoints.add(datapointsItem); - return this; - } - - /** - * Get datapoints - * @return datapoints - **/ - @javax.annotation.Nullable - public List> getDatapoints() { - return datapoints; - } - - - public void setDatapoints(List> datapoints) { - this.datapoints = datapoints; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotPricesDatapoints instance itself - */ - public SpotPricesDatapoints putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotPricesDatapoints spotPricesDatapoints = (SpotPricesDatapoints) o; - return Objects.equals(this.datapoints, spotPricesDatapoints.datapoints)&& - Objects.equals(this.additionalProperties, spotPricesDatapoints.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(datapoints, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotPricesDatapoints {\n"); - sb.append(" datapoints: ").append(toIndentedString(datapoints)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("datapoints"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotPricesDatapoints - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotPricesDatapoints.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesDatapoints is not found in the empty JSON string", SpotPricesDatapoints.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("datapoints") != null && !jsonObj.get("datapoints").isJsonNull() && !jsonObj.get("datapoints").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `datapoints` to be an array in the JSON string but got `%s`", jsonObj.get("datapoints").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotPricesDatapoints.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotPricesDatapoints' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotPricesDatapoints.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotPricesDatapoints value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotPricesDatapoints read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotPricesDatapoints instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotPricesDatapoints given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotPricesDatapoints - * @throws IOException if the JSON string is invalid with respect to SpotPricesDatapoints - */ - public static SpotPricesDatapoints fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotPricesDatapoints.class); - } - - /** - * Convert an instance of SpotPricesDatapoints to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java deleted file mode 100644 index 72566fc63..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReport.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotPricesDatapoints; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotPricesHistoryReport - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotPricesHistoryReport { - public static final String SERIALIZED_NAME_PRICES_HISTORY = "prices_history"; - @SerializedName(SERIALIZED_NAME_PRICES_HISTORY) - private SpotPricesDatapoints pricesHistory; - - public SpotPricesHistoryReport() { - } - - public SpotPricesHistoryReport pricesHistory(SpotPricesDatapoints pricesHistory) { - - this.pricesHistory = pricesHistory; - return this; - } - - /** - * Get pricesHistory - * @return pricesHistory - **/ - @javax.annotation.Nullable - public SpotPricesDatapoints getPricesHistory() { - return pricesHistory; - } - - - public void setPricesHistory(SpotPricesDatapoints pricesHistory) { - this.pricesHistory = pricesHistory; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotPricesHistoryReport instance itself - */ - public SpotPricesHistoryReport putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotPricesHistoryReport spotPricesHistoryReport = (SpotPricesHistoryReport) o; - return Objects.equals(this.pricesHistory, spotPricesHistoryReport.pricesHistory)&& - Objects.equals(this.additionalProperties, spotPricesHistoryReport.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(pricesHistory, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotPricesHistoryReport {\n"); - sb.append(" pricesHistory: ").append(toIndentedString(pricesHistory)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("prices_history"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotPricesHistoryReport - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotPricesHistoryReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesHistoryReport is not found in the empty JSON string", SpotPricesHistoryReport.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `prices_history` - if (jsonObj.get("prices_history") != null && !jsonObj.get("prices_history").isJsonNull()) { - SpotPricesDatapoints.validateJsonElement(jsonObj.get("prices_history")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotPricesHistoryReport.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotPricesHistoryReport' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotPricesHistoryReport.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotPricesHistoryReport value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotPricesHistoryReport read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotPricesHistoryReport instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotPricesHistoryReport given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotPricesHistoryReport - * @throws IOException if the JSON string is invalid with respect to SpotPricesHistoryReport - */ - public static SpotPricesHistoryReport fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotPricesHistoryReport.class); - } - - /** - * Convert an instance of SpotPricesHistoryReport to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java deleted file mode 100644 index 5a7a652bc..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetal.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotPricesPerBaremetal - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotPricesPerBaremetal { - public static final String SERIALIZED_NAME_PRICE = "price"; - @SerializedName(SERIALIZED_NAME_PRICE) - private Float price; - - public SpotPricesPerBaremetal() { - } - - public SpotPricesPerBaremetal price(Float price) { - - this.price = price; - return this; - } - - /** - * Get price - * @return price - **/ - @javax.annotation.Nullable - public Float getPrice() { - return price; - } - - - public void setPrice(Float price) { - this.price = price; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotPricesPerBaremetal instance itself - */ - public SpotPricesPerBaremetal putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotPricesPerBaremetal spotPricesPerBaremetal = (SpotPricesPerBaremetal) o; - return Objects.equals(this.price, spotPricesPerBaremetal.price)&& - Objects.equals(this.additionalProperties, spotPricesPerBaremetal.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(price, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotPricesPerBaremetal {\n"); - sb.append(" price: ").append(toIndentedString(price)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("price"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotPricesPerBaremetal - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotPricesPerBaremetal.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesPerBaremetal is not found in the empty JSON string", SpotPricesPerBaremetal.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotPricesPerBaremetal.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotPricesPerBaremetal' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotPricesPerBaremetal.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotPricesPerBaremetal value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotPricesPerBaremetal read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotPricesPerBaremetal instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotPricesPerBaremetal given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotPricesPerBaremetal - * @throws IOException if the JSON string is invalid with respect to SpotPricesPerBaremetal - */ - public static SpotPricesPerBaremetal fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotPricesPerBaremetal.class); - } - - /** - * Convert an instance of SpotPricesPerBaremetal to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java deleted file mode 100644 index cc13338c9..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacility.java +++ /dev/null @@ -1,543 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotPricesPerBaremetal; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotPricesPerFacility - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotPricesPerFacility { - public static final String SERIALIZED_NAME_BAREMETAL0 = "baremetal_0"; - @SerializedName(SERIALIZED_NAME_BAREMETAL0) - private SpotPricesPerBaremetal baremetal0; - - public static final String SERIALIZED_NAME_BAREMETAL1 = "baremetal_1"; - @SerializedName(SERIALIZED_NAME_BAREMETAL1) - private SpotPricesPerBaremetal baremetal1; - - public static final String SERIALIZED_NAME_BAREMETAL2 = "baremetal_2"; - @SerializedName(SERIALIZED_NAME_BAREMETAL2) - private SpotPricesPerBaremetal baremetal2; - - public static final String SERIALIZED_NAME_BAREMETAL2A = "baremetal_2a"; - @SerializedName(SERIALIZED_NAME_BAREMETAL2A) - private SpotPricesPerBaremetal baremetal2a; - - public static final String SERIALIZED_NAME_BAREMETAL2A2 = "baremetal_2a2"; - @SerializedName(SERIALIZED_NAME_BAREMETAL2A2) - private SpotPricesPerBaremetal baremetal2a2; - - public static final String SERIALIZED_NAME_BAREMETAL3 = "baremetal_3"; - @SerializedName(SERIALIZED_NAME_BAREMETAL3) - private SpotPricesPerBaremetal baremetal3; - - public static final String SERIALIZED_NAME_BAREMETAL_S = "baremetal_s"; - @SerializedName(SERIALIZED_NAME_BAREMETAL_S) - private SpotPricesPerBaremetal baremetalS; - - public static final String SERIALIZED_NAME_C2_MEDIUM_X86 = "c2.medium.x86"; - @SerializedName(SERIALIZED_NAME_C2_MEDIUM_X86) - private SpotPricesPerBaremetal c2MediumX86; - - public static final String SERIALIZED_NAME_M2_XLARGE_X86 = "m2.xlarge.x86"; - @SerializedName(SERIALIZED_NAME_M2_XLARGE_X86) - private SpotPricesPerBaremetal m2XlargeX86; - - public SpotPricesPerFacility() { - } - - public SpotPricesPerFacility baremetal0(SpotPricesPerBaremetal baremetal0) { - - this.baremetal0 = baremetal0; - return this; - } - - /** - * Get baremetal0 - * @return baremetal0 - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getBaremetal0() { - return baremetal0; - } - - - public void setBaremetal0(SpotPricesPerBaremetal baremetal0) { - this.baremetal0 = baremetal0; - } - - - public SpotPricesPerFacility baremetal1(SpotPricesPerBaremetal baremetal1) { - - this.baremetal1 = baremetal1; - return this; - } - - /** - * Get baremetal1 - * @return baremetal1 - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getBaremetal1() { - return baremetal1; - } - - - public void setBaremetal1(SpotPricesPerBaremetal baremetal1) { - this.baremetal1 = baremetal1; - } - - - public SpotPricesPerFacility baremetal2(SpotPricesPerBaremetal baremetal2) { - - this.baremetal2 = baremetal2; - return this; - } - - /** - * Get baremetal2 - * @return baremetal2 - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getBaremetal2() { - return baremetal2; - } - - - public void setBaremetal2(SpotPricesPerBaremetal baremetal2) { - this.baremetal2 = baremetal2; - } - - - public SpotPricesPerFacility baremetal2a(SpotPricesPerBaremetal baremetal2a) { - - this.baremetal2a = baremetal2a; - return this; - } - - /** - * Get baremetal2a - * @return baremetal2a - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getBaremetal2a() { - return baremetal2a; - } - - - public void setBaremetal2a(SpotPricesPerBaremetal baremetal2a) { - this.baremetal2a = baremetal2a; - } - - - public SpotPricesPerFacility baremetal2a2(SpotPricesPerBaremetal baremetal2a2) { - - this.baremetal2a2 = baremetal2a2; - return this; - } - - /** - * Get baremetal2a2 - * @return baremetal2a2 - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getBaremetal2a2() { - return baremetal2a2; - } - - - public void setBaremetal2a2(SpotPricesPerBaremetal baremetal2a2) { - this.baremetal2a2 = baremetal2a2; - } - - - public SpotPricesPerFacility baremetal3(SpotPricesPerBaremetal baremetal3) { - - this.baremetal3 = baremetal3; - return this; - } - - /** - * Get baremetal3 - * @return baremetal3 - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getBaremetal3() { - return baremetal3; - } - - - public void setBaremetal3(SpotPricesPerBaremetal baremetal3) { - this.baremetal3 = baremetal3; - } - - - public SpotPricesPerFacility baremetalS(SpotPricesPerBaremetal baremetalS) { - - this.baremetalS = baremetalS; - return this; - } - - /** - * Get baremetalS - * @return baremetalS - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getBaremetalS() { - return baremetalS; - } - - - public void setBaremetalS(SpotPricesPerBaremetal baremetalS) { - this.baremetalS = baremetalS; - } - - - public SpotPricesPerFacility c2MediumX86(SpotPricesPerBaremetal c2MediumX86) { - - this.c2MediumX86 = c2MediumX86; - return this; - } - - /** - * Get c2MediumX86 - * @return c2MediumX86 - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getC2MediumX86() { - return c2MediumX86; - } - - - public void setC2MediumX86(SpotPricesPerBaremetal c2MediumX86) { - this.c2MediumX86 = c2MediumX86; - } - - - public SpotPricesPerFacility m2XlargeX86(SpotPricesPerBaremetal m2XlargeX86) { - - this.m2XlargeX86 = m2XlargeX86; - return this; - } - - /** - * Get m2XlargeX86 - * @return m2XlargeX86 - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getM2XlargeX86() { - return m2XlargeX86; - } - - - public void setM2XlargeX86(SpotPricesPerBaremetal m2XlargeX86) { - this.m2XlargeX86 = m2XlargeX86; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotPricesPerFacility instance itself - */ - public SpotPricesPerFacility putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotPricesPerFacility spotPricesPerFacility = (SpotPricesPerFacility) o; - return Objects.equals(this.baremetal0, spotPricesPerFacility.baremetal0) && - Objects.equals(this.baremetal1, spotPricesPerFacility.baremetal1) && - Objects.equals(this.baremetal2, spotPricesPerFacility.baremetal2) && - Objects.equals(this.baremetal2a, spotPricesPerFacility.baremetal2a) && - Objects.equals(this.baremetal2a2, spotPricesPerFacility.baremetal2a2) && - Objects.equals(this.baremetal3, spotPricesPerFacility.baremetal3) && - Objects.equals(this.baremetalS, spotPricesPerFacility.baremetalS) && - Objects.equals(this.c2MediumX86, spotPricesPerFacility.c2MediumX86) && - Objects.equals(this.m2XlargeX86, spotPricesPerFacility.m2XlargeX86)&& - Objects.equals(this.additionalProperties, spotPricesPerFacility.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(baremetal0, baremetal1, baremetal2, baremetal2a, baremetal2a2, baremetal3, baremetalS, c2MediumX86, m2XlargeX86, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotPricesPerFacility {\n"); - sb.append(" baremetal0: ").append(toIndentedString(baremetal0)).append("\n"); - sb.append(" baremetal1: ").append(toIndentedString(baremetal1)).append("\n"); - sb.append(" baremetal2: ").append(toIndentedString(baremetal2)).append("\n"); - sb.append(" baremetal2a: ").append(toIndentedString(baremetal2a)).append("\n"); - sb.append(" baremetal2a2: ").append(toIndentedString(baremetal2a2)).append("\n"); - sb.append(" baremetal3: ").append(toIndentedString(baremetal3)).append("\n"); - sb.append(" baremetalS: ").append(toIndentedString(baremetalS)).append("\n"); - sb.append(" c2MediumX86: ").append(toIndentedString(c2MediumX86)).append("\n"); - sb.append(" m2XlargeX86: ").append(toIndentedString(m2XlargeX86)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("baremetal_0"); - openapiFields.add("baremetal_1"); - openapiFields.add("baremetal_2"); - openapiFields.add("baremetal_2a"); - openapiFields.add("baremetal_2a2"); - openapiFields.add("baremetal_3"); - openapiFields.add("baremetal_s"); - openapiFields.add("c2.medium.x86"); - openapiFields.add("m2.xlarge.x86"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotPricesPerFacility - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotPricesPerFacility.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesPerFacility is not found in the empty JSON string", SpotPricesPerFacility.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `baremetal_0` - if (jsonObj.get("baremetal_0") != null && !jsonObj.get("baremetal_0").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("baremetal_0")); - } - // validate the optional field `baremetal_1` - if (jsonObj.get("baremetal_1") != null && !jsonObj.get("baremetal_1").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("baremetal_1")); - } - // validate the optional field `baremetal_2` - if (jsonObj.get("baremetal_2") != null && !jsonObj.get("baremetal_2").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("baremetal_2")); - } - // validate the optional field `baremetal_2a` - if (jsonObj.get("baremetal_2a") != null && !jsonObj.get("baremetal_2a").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("baremetal_2a")); - } - // validate the optional field `baremetal_2a2` - if (jsonObj.get("baremetal_2a2") != null && !jsonObj.get("baremetal_2a2").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("baremetal_2a2")); - } - // validate the optional field `baremetal_3` - if (jsonObj.get("baremetal_3") != null && !jsonObj.get("baremetal_3").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("baremetal_3")); - } - // validate the optional field `baremetal_s` - if (jsonObj.get("baremetal_s") != null && !jsonObj.get("baremetal_s").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("baremetal_s")); - } - // validate the optional field `c2.medium.x86` - if (jsonObj.get("c2.medium.x86") != null && !jsonObj.get("c2.medium.x86").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("c2.medium.x86")); - } - // validate the optional field `m2.xlarge.x86` - if (jsonObj.get("m2.xlarge.x86") != null && !jsonObj.get("m2.xlarge.x86").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("m2.xlarge.x86")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotPricesPerFacility.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotPricesPerFacility' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotPricesPerFacility.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotPricesPerFacility value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotPricesPerFacility read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotPricesPerFacility instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotPricesPerFacility given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotPricesPerFacility - * @throws IOException if the JSON string is invalid with respect to SpotPricesPerFacility - */ - public static SpotPricesPerFacility fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotPricesPerFacility.class); - } - - /** - * Convert an instance of SpotPricesPerFacility to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java deleted file mode 100644 index f1307449c..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacility.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotPricesPerBaremetal; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotPricesPerNewFacility - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotPricesPerNewFacility { - public static final String SERIALIZED_NAME_BAREMETAL1E = "baremetal_1e"; - @SerializedName(SERIALIZED_NAME_BAREMETAL1E) - private SpotPricesPerBaremetal baremetal1e; - - public SpotPricesPerNewFacility() { - } - - public SpotPricesPerNewFacility baremetal1e(SpotPricesPerBaremetal baremetal1e) { - - this.baremetal1e = baremetal1e; - return this; - } - - /** - * Get baremetal1e - * @return baremetal1e - **/ - @javax.annotation.Nullable - public SpotPricesPerBaremetal getBaremetal1e() { - return baremetal1e; - } - - - public void setBaremetal1e(SpotPricesPerBaremetal baremetal1e) { - this.baremetal1e = baremetal1e; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotPricesPerNewFacility instance itself - */ - public SpotPricesPerNewFacility putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotPricesPerNewFacility spotPricesPerNewFacility = (SpotPricesPerNewFacility) o; - return Objects.equals(this.baremetal1e, spotPricesPerNewFacility.baremetal1e)&& - Objects.equals(this.additionalProperties, spotPricesPerNewFacility.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(baremetal1e, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotPricesPerNewFacility {\n"); - sb.append(" baremetal1e: ").append(toIndentedString(baremetal1e)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("baremetal_1e"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotPricesPerNewFacility - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotPricesPerNewFacility.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesPerNewFacility is not found in the empty JSON string", SpotPricesPerNewFacility.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `baremetal_1e` - if (jsonObj.get("baremetal_1e") != null && !jsonObj.get("baremetal_1e").isJsonNull()) { - SpotPricesPerBaremetal.validateJsonElement(jsonObj.get("baremetal_1e")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotPricesPerNewFacility.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotPricesPerNewFacility' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotPricesPerNewFacility.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotPricesPerNewFacility value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotPricesPerNewFacility read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotPricesPerNewFacility instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotPricesPerNewFacility given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotPricesPerNewFacility - * @throws IOException if the JSON string is invalid with respect to SpotPricesPerNewFacility - */ - public static SpotPricesPerNewFacility fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotPricesPerNewFacility.class); - } - - /** - * Convert an instance of SpotPricesPerNewFacility to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java deleted file mode 100644 index 84f57ecf1..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SpotPricesReport.java +++ /dev/null @@ -1,704 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.SpotPricesPerFacility; -import com.equinix.openapi.metal.v1.model.SpotPricesPerNewFacility; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SpotPricesReport - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpotPricesReport { - public static final String SERIALIZED_NAME_AMS1 = "ams1"; - @SerializedName(SERIALIZED_NAME_AMS1) - private SpotPricesPerFacility ams1; - - public static final String SERIALIZED_NAME_ATL1 = "atl1"; - @SerializedName(SERIALIZED_NAME_ATL1) - private SpotPricesPerNewFacility atl1; - - public static final String SERIALIZED_NAME_DFW1 = "dfw1"; - @SerializedName(SERIALIZED_NAME_DFW1) - private SpotPricesPerNewFacility dfw1; - - public static final String SERIALIZED_NAME_EWR1 = "ewr1"; - @SerializedName(SERIALIZED_NAME_EWR1) - private SpotPricesPerFacility ewr1; - - public static final String SERIALIZED_NAME_FRA1 = "fra1"; - @SerializedName(SERIALIZED_NAME_FRA1) - private SpotPricesPerNewFacility fra1; - - public static final String SERIALIZED_NAME_IAD1 = "iad1"; - @SerializedName(SERIALIZED_NAME_IAD1) - private SpotPricesPerNewFacility iad1; - - public static final String SERIALIZED_NAME_LAX1 = "lax1"; - @SerializedName(SERIALIZED_NAME_LAX1) - private SpotPricesPerNewFacility lax1; - - public static final String SERIALIZED_NAME_NRT1 = "nrt1"; - @SerializedName(SERIALIZED_NAME_NRT1) - private SpotPricesPerFacility nrt1; - - public static final String SERIALIZED_NAME_ORD1 = "ord1"; - @SerializedName(SERIALIZED_NAME_ORD1) - private SpotPricesPerNewFacility ord1; - - public static final String SERIALIZED_NAME_SEA1 = "sea1"; - @SerializedName(SERIALIZED_NAME_SEA1) - private SpotPricesPerNewFacility sea1; - - public static final String SERIALIZED_NAME_SIN1 = "sin1"; - @SerializedName(SERIALIZED_NAME_SIN1) - private SpotPricesPerNewFacility sin1; - - public static final String SERIALIZED_NAME_SJC1 = "sjc1"; - @SerializedName(SERIALIZED_NAME_SJC1) - private SpotPricesPerFacility sjc1; - - public static final String SERIALIZED_NAME_SYD1 = "syd1"; - @SerializedName(SERIALIZED_NAME_SYD1) - private SpotPricesPerNewFacility syd1; - - public static final String SERIALIZED_NAME_YYZ1 = "yyz1"; - @SerializedName(SERIALIZED_NAME_YYZ1) - private SpotPricesPerNewFacility yyz1; - - public SpotPricesReport() { - } - - public SpotPricesReport ams1(SpotPricesPerFacility ams1) { - - this.ams1 = ams1; - return this; - } - - /** - * Get ams1 - * @return ams1 - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getAms1() { - return ams1; - } - - - public void setAms1(SpotPricesPerFacility ams1) { - this.ams1 = ams1; - } - - - public SpotPricesReport atl1(SpotPricesPerNewFacility atl1) { - - this.atl1 = atl1; - return this; - } - - /** - * Get atl1 - * @return atl1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getAtl1() { - return atl1; - } - - - public void setAtl1(SpotPricesPerNewFacility atl1) { - this.atl1 = atl1; - } - - - public SpotPricesReport dfw1(SpotPricesPerNewFacility dfw1) { - - this.dfw1 = dfw1; - return this; - } - - /** - * Get dfw1 - * @return dfw1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getDfw1() { - return dfw1; - } - - - public void setDfw1(SpotPricesPerNewFacility dfw1) { - this.dfw1 = dfw1; - } - - - public SpotPricesReport ewr1(SpotPricesPerFacility ewr1) { - - this.ewr1 = ewr1; - return this; - } - - /** - * Get ewr1 - * @return ewr1 - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getEwr1() { - return ewr1; - } - - - public void setEwr1(SpotPricesPerFacility ewr1) { - this.ewr1 = ewr1; - } - - - public SpotPricesReport fra1(SpotPricesPerNewFacility fra1) { - - this.fra1 = fra1; - return this; - } - - /** - * Get fra1 - * @return fra1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getFra1() { - return fra1; - } - - - public void setFra1(SpotPricesPerNewFacility fra1) { - this.fra1 = fra1; - } - - - public SpotPricesReport iad1(SpotPricesPerNewFacility iad1) { - - this.iad1 = iad1; - return this; - } - - /** - * Get iad1 - * @return iad1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getIad1() { - return iad1; - } - - - public void setIad1(SpotPricesPerNewFacility iad1) { - this.iad1 = iad1; - } - - - public SpotPricesReport lax1(SpotPricesPerNewFacility lax1) { - - this.lax1 = lax1; - return this; - } - - /** - * Get lax1 - * @return lax1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getLax1() { - return lax1; - } - - - public void setLax1(SpotPricesPerNewFacility lax1) { - this.lax1 = lax1; - } - - - public SpotPricesReport nrt1(SpotPricesPerFacility nrt1) { - - this.nrt1 = nrt1; - return this; - } - - /** - * Get nrt1 - * @return nrt1 - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getNrt1() { - return nrt1; - } - - - public void setNrt1(SpotPricesPerFacility nrt1) { - this.nrt1 = nrt1; - } - - - public SpotPricesReport ord1(SpotPricesPerNewFacility ord1) { - - this.ord1 = ord1; - return this; - } - - /** - * Get ord1 - * @return ord1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getOrd1() { - return ord1; - } - - - public void setOrd1(SpotPricesPerNewFacility ord1) { - this.ord1 = ord1; - } - - - public SpotPricesReport sea1(SpotPricesPerNewFacility sea1) { - - this.sea1 = sea1; - return this; - } - - /** - * Get sea1 - * @return sea1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getSea1() { - return sea1; - } - - - public void setSea1(SpotPricesPerNewFacility sea1) { - this.sea1 = sea1; - } - - - public SpotPricesReport sin1(SpotPricesPerNewFacility sin1) { - - this.sin1 = sin1; - return this; - } - - /** - * Get sin1 - * @return sin1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getSin1() { - return sin1; - } - - - public void setSin1(SpotPricesPerNewFacility sin1) { - this.sin1 = sin1; - } - - - public SpotPricesReport sjc1(SpotPricesPerFacility sjc1) { - - this.sjc1 = sjc1; - return this; - } - - /** - * Get sjc1 - * @return sjc1 - **/ - @javax.annotation.Nullable - public SpotPricesPerFacility getSjc1() { - return sjc1; - } - - - public void setSjc1(SpotPricesPerFacility sjc1) { - this.sjc1 = sjc1; - } - - - public SpotPricesReport syd1(SpotPricesPerNewFacility syd1) { - - this.syd1 = syd1; - return this; - } - - /** - * Get syd1 - * @return syd1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getSyd1() { - return syd1; - } - - - public void setSyd1(SpotPricesPerNewFacility syd1) { - this.syd1 = syd1; - } - - - public SpotPricesReport yyz1(SpotPricesPerNewFacility yyz1) { - - this.yyz1 = yyz1; - return this; - } - - /** - * Get yyz1 - * @return yyz1 - **/ - @javax.annotation.Nullable - public SpotPricesPerNewFacility getYyz1() { - return yyz1; - } - - - public void setYyz1(SpotPricesPerNewFacility yyz1) { - this.yyz1 = yyz1; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SpotPricesReport instance itself - */ - public SpotPricesReport putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpotPricesReport spotPricesReport = (SpotPricesReport) o; - return Objects.equals(this.ams1, spotPricesReport.ams1) && - Objects.equals(this.atl1, spotPricesReport.atl1) && - Objects.equals(this.dfw1, spotPricesReport.dfw1) && - Objects.equals(this.ewr1, spotPricesReport.ewr1) && - Objects.equals(this.fra1, spotPricesReport.fra1) && - Objects.equals(this.iad1, spotPricesReport.iad1) && - Objects.equals(this.lax1, spotPricesReport.lax1) && - Objects.equals(this.nrt1, spotPricesReport.nrt1) && - Objects.equals(this.ord1, spotPricesReport.ord1) && - Objects.equals(this.sea1, spotPricesReport.sea1) && - Objects.equals(this.sin1, spotPricesReport.sin1) && - Objects.equals(this.sjc1, spotPricesReport.sjc1) && - Objects.equals(this.syd1, spotPricesReport.syd1) && - Objects.equals(this.yyz1, spotPricesReport.yyz1)&& - Objects.equals(this.additionalProperties, spotPricesReport.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(ams1, atl1, dfw1, ewr1, fra1, iad1, lax1, nrt1, ord1, sea1, sin1, sjc1, syd1, yyz1, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpotPricesReport {\n"); - sb.append(" ams1: ").append(toIndentedString(ams1)).append("\n"); - sb.append(" atl1: ").append(toIndentedString(atl1)).append("\n"); - sb.append(" dfw1: ").append(toIndentedString(dfw1)).append("\n"); - sb.append(" ewr1: ").append(toIndentedString(ewr1)).append("\n"); - sb.append(" fra1: ").append(toIndentedString(fra1)).append("\n"); - sb.append(" iad1: ").append(toIndentedString(iad1)).append("\n"); - sb.append(" lax1: ").append(toIndentedString(lax1)).append("\n"); - sb.append(" nrt1: ").append(toIndentedString(nrt1)).append("\n"); - sb.append(" ord1: ").append(toIndentedString(ord1)).append("\n"); - sb.append(" sea1: ").append(toIndentedString(sea1)).append("\n"); - sb.append(" sin1: ").append(toIndentedString(sin1)).append("\n"); - sb.append(" sjc1: ").append(toIndentedString(sjc1)).append("\n"); - sb.append(" syd1: ").append(toIndentedString(syd1)).append("\n"); - sb.append(" yyz1: ").append(toIndentedString(yyz1)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ams1"); - openapiFields.add("atl1"); - openapiFields.add("dfw1"); - openapiFields.add("ewr1"); - openapiFields.add("fra1"); - openapiFields.add("iad1"); - openapiFields.add("lax1"); - openapiFields.add("nrt1"); - openapiFields.add("ord1"); - openapiFields.add("sea1"); - openapiFields.add("sin1"); - openapiFields.add("sjc1"); - openapiFields.add("syd1"); - openapiFields.add("yyz1"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SpotPricesReport - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SpotPricesReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SpotPricesReport is not found in the empty JSON string", SpotPricesReport.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `ams1` - if (jsonObj.get("ams1") != null && !jsonObj.get("ams1").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("ams1")); - } - // validate the optional field `atl1` - if (jsonObj.get("atl1") != null && !jsonObj.get("atl1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("atl1")); - } - // validate the optional field `dfw1` - if (jsonObj.get("dfw1") != null && !jsonObj.get("dfw1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("dfw1")); - } - // validate the optional field `ewr1` - if (jsonObj.get("ewr1") != null && !jsonObj.get("ewr1").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("ewr1")); - } - // validate the optional field `fra1` - if (jsonObj.get("fra1") != null && !jsonObj.get("fra1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("fra1")); - } - // validate the optional field `iad1` - if (jsonObj.get("iad1") != null && !jsonObj.get("iad1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("iad1")); - } - // validate the optional field `lax1` - if (jsonObj.get("lax1") != null && !jsonObj.get("lax1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("lax1")); - } - // validate the optional field `nrt1` - if (jsonObj.get("nrt1") != null && !jsonObj.get("nrt1").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("nrt1")); - } - // validate the optional field `ord1` - if (jsonObj.get("ord1") != null && !jsonObj.get("ord1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("ord1")); - } - // validate the optional field `sea1` - if (jsonObj.get("sea1") != null && !jsonObj.get("sea1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("sea1")); - } - // validate the optional field `sin1` - if (jsonObj.get("sin1") != null && !jsonObj.get("sin1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("sin1")); - } - // validate the optional field `sjc1` - if (jsonObj.get("sjc1") != null && !jsonObj.get("sjc1").isJsonNull()) { - SpotPricesPerFacility.validateJsonElement(jsonObj.get("sjc1")); - } - // validate the optional field `syd1` - if (jsonObj.get("syd1") != null && !jsonObj.get("syd1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("syd1")); - } - // validate the optional field `yyz1` - if (jsonObj.get("yyz1") != null && !jsonObj.get("yyz1").isJsonNull()) { - SpotPricesPerNewFacility.validateJsonElement(jsonObj.get("yyz1")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SpotPricesReport.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SpotPricesReport' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SpotPricesReport.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SpotPricesReport value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SpotPricesReport read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SpotPricesReport instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SpotPricesReport given an JSON string - * - * @param jsonString JSON string - * @return An instance of SpotPricesReport - * @throws IOException if the JSON string is invalid with respect to SpotPricesReport - */ - public static SpotPricesReport fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SpotPricesReport.class); - } - - /** - * Convert an instance of SpotPricesReport to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Storage.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Storage.java deleted file mode 100644 index cdf0c2bc3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Storage.java +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Disk; -import com.equinix.openapi.metal.v1.model.Filesystem; -import com.equinix.openapi.metal.v1.model.Raid; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Storage - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Storage { - public static final String SERIALIZED_NAME_DISKS = "disks"; - @SerializedName(SERIALIZED_NAME_DISKS) - private List disks; - - public static final String SERIALIZED_NAME_RAID = "raid"; - @SerializedName(SERIALIZED_NAME_RAID) - private List raid; - - public static final String SERIALIZED_NAME_FILESYSTEMS = "filesystems"; - @SerializedName(SERIALIZED_NAME_FILESYSTEMS) - private List filesystems; - - public Storage() { - } - - public Storage disks(List disks) { - - this.disks = disks; - return this; - } - - public Storage addDisksItem(Disk disksItem) { - if (this.disks == null) { - this.disks = new ArrayList<>(); - } - this.disks.add(disksItem); - return this; - } - - /** - * Get disks - * @return disks - **/ - @javax.annotation.Nullable - public List getDisks() { - return disks; - } - - - public void setDisks(List disks) { - this.disks = disks; - } - - - public Storage raid(List raid) { - - this.raid = raid; - return this; - } - - public Storage addRaidItem(Raid raidItem) { - if (this.raid == null) { - this.raid = new ArrayList<>(); - } - this.raid.add(raidItem); - return this; - } - - /** - * Get raid - * @return raid - **/ - @javax.annotation.Nullable - public List getRaid() { - return raid; - } - - - public void setRaid(List raid) { - this.raid = raid; - } - - - public Storage filesystems(List filesystems) { - - this.filesystems = filesystems; - return this; - } - - public Storage addFilesystemsItem(Filesystem filesystemsItem) { - if (this.filesystems == null) { - this.filesystems = new ArrayList<>(); - } - this.filesystems.add(filesystemsItem); - return this; - } - - /** - * Get filesystems - * @return filesystems - **/ - @javax.annotation.Nullable - public List getFilesystems() { - return filesystems; - } - - - public void setFilesystems(List filesystems) { - this.filesystems = filesystems; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Storage instance itself - */ - public Storage putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Storage storage = (Storage) o; - return Objects.equals(this.disks, storage.disks) && - Objects.equals(this.raid, storage.raid) && - Objects.equals(this.filesystems, storage.filesystems)&& - Objects.equals(this.additionalProperties, storage.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(disks, raid, filesystems, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Storage {\n"); - sb.append(" disks: ").append(toIndentedString(disks)).append("\n"); - sb.append(" raid: ").append(toIndentedString(raid)).append("\n"); - sb.append(" filesystems: ").append(toIndentedString(filesystems)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("disks"); - openapiFields.add("raid"); - openapiFields.add("filesystems"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Storage - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Storage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Storage is not found in the empty JSON string", Storage.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("disks") != null && !jsonObj.get("disks").isJsonNull()) { - JsonArray jsonArraydisks = jsonObj.getAsJsonArray("disks"); - if (jsonArraydisks != null) { - // ensure the json data is an array - if (!jsonObj.get("disks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `disks` to be an array in the JSON string but got `%s`", jsonObj.get("disks").toString())); - } - - // validate the optional field `disks` (array) - for (int i = 0; i < jsonArraydisks.size(); i++) { - Disk.validateJsonElement(jsonArraydisks.get(i)); - }; - } - } - if (jsonObj.get("raid") != null && !jsonObj.get("raid").isJsonNull()) { - JsonArray jsonArrayraid = jsonObj.getAsJsonArray("raid"); - if (jsonArrayraid != null) { - // ensure the json data is an array - if (!jsonObj.get("raid").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `raid` to be an array in the JSON string but got `%s`", jsonObj.get("raid").toString())); - } - - // validate the optional field `raid` (array) - for (int i = 0; i < jsonArrayraid.size(); i++) { - Raid.validateJsonElement(jsonArrayraid.get(i)); - }; - } - } - if (jsonObj.get("filesystems") != null && !jsonObj.get("filesystems").isJsonNull()) { - JsonArray jsonArrayfilesystems = jsonObj.getAsJsonArray("filesystems"); - if (jsonArrayfilesystems != null) { - // ensure the json data is an array - if (!jsonObj.get("filesystems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `filesystems` to be an array in the JSON string but got `%s`", jsonObj.get("filesystems").toString())); - } - - // validate the optional field `filesystems` (array) - for (int i = 0; i < jsonArrayfilesystems.size(); i++) { - Filesystem.validateJsonElement(jsonArrayfilesystems.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Storage.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Storage' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Storage.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Storage value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Storage read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Storage instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Storage given an JSON string - * - * @param jsonString JSON string - * @return An instance of Storage - * @throws IOException if the JSON string is invalid with respect to Storage - */ - public static Storage fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Storage.class); - } - - /** - * Convert an instance of Storage to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java deleted file mode 100644 index aa5d00cda..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/SupportRequestInput.java +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * SupportRequestInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SupportRequestInput { - public static final String SERIALIZED_NAME_DEVICE_ID = "device_id"; - @SerializedName(SERIALIZED_NAME_DEVICE_ID) - private String deviceId; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - /** - * Gets or Sets priority - */ - @JsonAdapter(PriorityEnum.Adapter.class) - public enum PriorityEnum { - URGENT("urgent"), - - HIGH("high"), - - MEDIUM("medium"), - - LOW("low"); - - private String value; - - PriorityEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PriorityEnum fromValue(String value) { - for (PriorityEnum b : PriorityEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PriorityEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PriorityEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PriorityEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PriorityEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PRIORITY = "priority"; - @SerializedName(SERIALIZED_NAME_PRIORITY) - private PriorityEnum priority; - - public static final String SERIALIZED_NAME_PROJECT_ID = "project_id"; - @SerializedName(SERIALIZED_NAME_PROJECT_ID) - private String projectId; - - public static final String SERIALIZED_NAME_SUBJECT = "subject"; - @SerializedName(SERIALIZED_NAME_SUBJECT) - private String subject; - - public SupportRequestInput() { - } - - public SupportRequestInput deviceId(String deviceId) { - - this.deviceId = deviceId; - return this; - } - - /** - * Get deviceId - * @return deviceId - **/ - @javax.annotation.Nullable - public String getDeviceId() { - return deviceId; - } - - - public void setDeviceId(String deviceId) { - this.deviceId = deviceId; - } - - - public SupportRequestInput message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nonnull - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public SupportRequestInput priority(PriorityEnum priority) { - - this.priority = priority; - return this; - } - - /** - * Get priority - * @return priority - **/ - @javax.annotation.Nullable - public PriorityEnum getPriority() { - return priority; - } - - - public void setPriority(PriorityEnum priority) { - this.priority = priority; - } - - - public SupportRequestInput projectId(String projectId) { - - this.projectId = projectId; - return this; - } - - /** - * Get projectId - * @return projectId - **/ - @javax.annotation.Nullable - public String getProjectId() { - return projectId; - } - - - public void setProjectId(String projectId) { - this.projectId = projectId; - } - - - public SupportRequestInput subject(String subject) { - - this.subject = subject; - return this; - } - - /** - * Get subject - * @return subject - **/ - @javax.annotation.Nonnull - public String getSubject() { - return subject; - } - - - public void setSubject(String subject) { - this.subject = subject; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the SupportRequestInput instance itself - */ - public SupportRequestInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SupportRequestInput supportRequestInput = (SupportRequestInput) o; - return Objects.equals(this.deviceId, supportRequestInput.deviceId) && - Objects.equals(this.message, supportRequestInput.message) && - Objects.equals(this.priority, supportRequestInput.priority) && - Objects.equals(this.projectId, supportRequestInput.projectId) && - Objects.equals(this.subject, supportRequestInput.subject)&& - Objects.equals(this.additionalProperties, supportRequestInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(deviceId, message, priority, projectId, subject, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SupportRequestInput {\n"); - sb.append(" deviceId: ").append(toIndentedString(deviceId)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("device_id"); - openapiFields.add("message"); - openapiFields.add("priority"); - openapiFields.add("project_id"); - openapiFields.add("subject"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("subject"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SupportRequestInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SupportRequestInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SupportRequestInput is not found in the empty JSON string", SupportRequestInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : SupportRequestInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("device_id") != null && !jsonObj.get("device_id").isJsonNull()) && !jsonObj.get("device_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `device_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("device_id").toString())); - } - if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if ((jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) && !jsonObj.get("priority").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `priority` to be a primitive type in the JSON string but got `%s`", jsonObj.get("priority").toString())); - } - // validate the optional field `priority` - if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { - PriorityEnum.validateJsonElement(jsonObj.get("priority")); - } - if ((jsonObj.get("project_id") != null && !jsonObj.get("project_id").isJsonNull()) && !jsonObj.get("project_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_id").toString())); - } - if (!jsonObj.get("subject").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SupportRequestInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SupportRequestInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SupportRequestInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SupportRequestInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public SupportRequestInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - SupportRequestInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SupportRequestInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of SupportRequestInput - * @throws IOException if the JSON string is invalid with respect to SupportRequestInput - */ - public static SupportRequestInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SupportRequestInput.class); - } - - /** - * Convert an instance of SupportRequestInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java deleted file mode 100644 index 5e593859d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequest.java +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * TransferRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TransferRequest { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public static final String SERIALIZED_NAME_TARGET_ORGANIZATION = "target_organization"; - @SerializedName(SERIALIZED_NAME_TARGET_ORGANIZATION) - private Href targetOrganization; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public TransferRequest() { - } - - public TransferRequest createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public TransferRequest href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public TransferRequest id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public TransferRequest project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - - public TransferRequest targetOrganization(Href targetOrganization) { - - this.targetOrganization = targetOrganization; - return this; - } - - /** - * Get targetOrganization - * @return targetOrganization - **/ - @javax.annotation.Nullable - public Href getTargetOrganization() { - return targetOrganization; - } - - - public void setTargetOrganization(Href targetOrganization) { - this.targetOrganization = targetOrganization; - } - - - public TransferRequest updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the TransferRequest instance itself - */ - public TransferRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransferRequest transferRequest = (TransferRequest) o; - return Objects.equals(this.createdAt, transferRequest.createdAt) && - Objects.equals(this.href, transferRequest.href) && - Objects.equals(this.id, transferRequest.id) && - Objects.equals(this.project, transferRequest.project) && - Objects.equals(this.targetOrganization, transferRequest.targetOrganization) && - Objects.equals(this.updatedAt, transferRequest.updatedAt)&& - Objects.equals(this.additionalProperties, transferRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, href, id, project, targetOrganization, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransferRequest {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" targetOrganization: ").append(toIndentedString(targetOrganization)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("project"); - openapiFields.add("target_organization"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TransferRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TransferRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferRequest is not found in the empty JSON string", TransferRequest.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - // validate the optional field `target_organization` - if (jsonObj.get("target_organization") != null && !jsonObj.get("target_organization").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("target_organization")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TransferRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TransferRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TransferRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TransferRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public TransferRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - TransferRequest instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TransferRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransferRequest - * @throws IOException if the JSON string is invalid with respect to TransferRequest - */ - public static TransferRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TransferRequest.class); - } - - /** - * Convert an instance of TransferRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java deleted file mode 100644 index d98647c47..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestInput.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * TransferRequestInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TransferRequestInput { - public static final String SERIALIZED_NAME_TARGET_ORGANIZATION_ID = "target_organization_id"; - @SerializedName(SERIALIZED_NAME_TARGET_ORGANIZATION_ID) - private UUID targetOrganizationId; - - public TransferRequestInput() { - } - - public TransferRequestInput targetOrganizationId(UUID targetOrganizationId) { - - this.targetOrganizationId = targetOrganizationId; - return this; - } - - /** - * Get targetOrganizationId - * @return targetOrganizationId - **/ - @javax.annotation.Nullable - public UUID getTargetOrganizationId() { - return targetOrganizationId; - } - - - public void setTargetOrganizationId(UUID targetOrganizationId) { - this.targetOrganizationId = targetOrganizationId; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the TransferRequestInput instance itself - */ - public TransferRequestInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransferRequestInput transferRequestInput = (TransferRequestInput) o; - return Objects.equals(this.targetOrganizationId, transferRequestInput.targetOrganizationId)&& - Objects.equals(this.additionalProperties, transferRequestInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(targetOrganizationId, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransferRequestInput {\n"); - sb.append(" targetOrganizationId: ").append(toIndentedString(targetOrganizationId)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("target_organization_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TransferRequestInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TransferRequestInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferRequestInput is not found in the empty JSON string", TransferRequestInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("target_organization_id") != null && !jsonObj.get("target_organization_id").isJsonNull()) && !jsonObj.get("target_organization_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `target_organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("target_organization_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TransferRequestInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TransferRequestInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TransferRequestInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TransferRequestInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public TransferRequestInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - TransferRequestInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TransferRequestInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransferRequestInput - * @throws IOException if the JSON string is invalid with respect to TransferRequestInput - */ - public static TransferRequestInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TransferRequestInput.class); - } - - /** - * Convert an instance of TransferRequestInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java deleted file mode 100644 index 8ed447115..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/TransferRequestList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.TransferRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * TransferRequestList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TransferRequestList { - public static final String SERIALIZED_NAME_TRANSFERS = "transfers"; - @SerializedName(SERIALIZED_NAME_TRANSFERS) - private List transfers; - - public TransferRequestList() { - } - - public TransferRequestList transfers(List transfers) { - - this.transfers = transfers; - return this; - } - - public TransferRequestList addTransfersItem(TransferRequest transfersItem) { - if (this.transfers == null) { - this.transfers = new ArrayList<>(); - } - this.transfers.add(transfersItem); - return this; - } - - /** - * Get transfers - * @return transfers - **/ - @javax.annotation.Nullable - public List getTransfers() { - return transfers; - } - - - public void setTransfers(List transfers) { - this.transfers = transfers; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the TransferRequestList instance itself - */ - public TransferRequestList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TransferRequestList transferRequestList = (TransferRequestList) o; - return Objects.equals(this.transfers, transferRequestList.transfers)&& - Objects.equals(this.additionalProperties, transferRequestList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(transfers, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TransferRequestList {\n"); - sb.append(" transfers: ").append(toIndentedString(transfers)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("transfers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TransferRequestList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TransferRequestList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferRequestList is not found in the empty JSON string", TransferRequestList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("transfers") != null && !jsonObj.get("transfers").isJsonNull()) { - JsonArray jsonArraytransfers = jsonObj.getAsJsonArray("transfers"); - if (jsonArraytransfers != null) { - // ensure the json data is an array - if (!jsonObj.get("transfers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `transfers` to be an array in the JSON string but got `%s`", jsonObj.get("transfers").toString())); - } - - // validate the optional field `transfers` (array) - for (int i = 0; i < jsonArraytransfers.size(); i++) { - TransferRequest.validateJsonElement(jsonArraytransfers.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TransferRequestList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TransferRequestList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TransferRequestList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TransferRequestList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public TransferRequestList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - TransferRequestList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TransferRequestList given an JSON string - * - * @param jsonString JSON string - * @return An instance of TransferRequestList - * @throws IOException if the JSON string is invalid with respect to TransferRequestList - */ - public static TransferRequestList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TransferRequestList.class); - } - - /** - * Convert an instance of TransferRequestList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java deleted file mode 100644 index d6d9a79b6..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UpdateEmailInput.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * UpdateEmailInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpdateEmailInput { - public static final String SERIALIZED_NAME_DEFAULT = "default"; - @SerializedName(SERIALIZED_NAME_DEFAULT) - private Boolean _default; - - public UpdateEmailInput() { - } - - public UpdateEmailInput _default(Boolean _default) { - - this._default = _default; - return this; - } - - /** - * Get _default - * @return _default - **/ - @javax.annotation.Nullable - public Boolean getDefault() { - return _default; - } - - - public void setDefault(Boolean _default) { - this._default = _default; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the UpdateEmailInput instance itself - */ - public UpdateEmailInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UpdateEmailInput updateEmailInput = (UpdateEmailInput) o; - return Objects.equals(this._default, updateEmailInput._default)&& - Objects.equals(this.additionalProperties, updateEmailInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(_default, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UpdateEmailInput {\n"); - sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("default"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UpdateEmailInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UpdateEmailInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateEmailInput is not found in the empty JSON string", UpdateEmailInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpdateEmailInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpdateEmailInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpdateEmailInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UpdateEmailInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public UpdateEmailInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - UpdateEmailInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UpdateEmailInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of UpdateEmailInput - * @throws IOException if the JSON string is invalid with respect to UpdateEmailInput - */ - public static UpdateEmailInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpdateEmailInput.class); - } - - /** - * Convert an instance of UpdateEmailInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java deleted file mode 100644 index af5d30100..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/User.java +++ /dev/null @@ -1,942 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * User - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class User { - public static final String SERIALIZED_NAME_AVATAR_THUMB_URL = "avatar_thumb_url"; - @SerializedName(SERIALIZED_NAME_AVATAR_THUMB_URL) - private String avatarThumbUrl; - - public static final String SERIALIZED_NAME_AVATAR_URL = "avatar_url"; - @SerializedName(SERIALIZED_NAME_AVATAR_URL) - private String avatarUrl; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DEFAULT_ORGANIZATION_ID = "default_organization_id"; - @SerializedName(SERIALIZED_NAME_DEFAULT_ORGANIZATION_ID) - private UUID defaultOrganizationId; - - public static final String SERIALIZED_NAME_DEFAULT_PROJECT_ID = "default_project_id"; - @SerializedName(SERIALIZED_NAME_DEFAULT_PROJECT_ID) - private UUID defaultProjectId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_EMAILS = "emails"; - @SerializedName(SERIALIZED_NAME_EMAILS) - private List emails; - - public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_FRAUD_SCORE = "fraud_score"; - @SerializedName(SERIALIZED_NAME_FRAUD_SCORE) - private String fraudScore; - - public static final String SERIALIZED_NAME_FULL_NAME = "full_name"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private String fullName; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LAST_LOGIN_AT = "last_login_at"; - @SerializedName(SERIALIZED_NAME_LAST_LOGIN_AT) - private OffsetDateTime lastLoginAt; - - public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_MAX_ORGANIZATIONS = "max_organizations"; - @SerializedName(SERIALIZED_NAME_MAX_ORGANIZATIONS) - private Integer maxOrganizations; - - public static final String SERIALIZED_NAME_MAX_PROJECTS = "max_projects"; - @SerializedName(SERIALIZED_NAME_MAX_PROJECTS) - private Integer maxProjects; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "phone_number"; - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private String phoneNumber; - - public static final String SERIALIZED_NAME_SHORT_ID = "short_id"; - @SerializedName(SERIALIZED_NAME_SHORT_ID) - private String shortId; - - public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; - @SerializedName(SERIALIZED_NAME_TIMEZONE) - private String timezone; - - public static final String SERIALIZED_NAME_TWO_FACTOR_AUTH = "two_factor_auth"; - @SerializedName(SERIALIZED_NAME_TWO_FACTOR_AUTH) - private String twoFactorAuth; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public User() { - } - - public User avatarThumbUrl(String avatarThumbUrl) { - - this.avatarThumbUrl = avatarThumbUrl; - return this; - } - - /** - * Get avatarThumbUrl - * @return avatarThumbUrl - **/ - @javax.annotation.Nullable - public String getAvatarThumbUrl() { - return avatarThumbUrl; - } - - - public void setAvatarThumbUrl(String avatarThumbUrl) { - this.avatarThumbUrl = avatarThumbUrl; - } - - - public User avatarUrl(String avatarUrl) { - - this.avatarUrl = avatarUrl; - return this; - } - - /** - * Get avatarUrl - * @return avatarUrl - **/ - @javax.annotation.Nullable - public String getAvatarUrl() { - return avatarUrl; - } - - - public void setAvatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - } - - - public User createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public User customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public User defaultOrganizationId(UUID defaultOrganizationId) { - - this.defaultOrganizationId = defaultOrganizationId; - return this; - } - - /** - * Get defaultOrganizationId - * @return defaultOrganizationId - **/ - @javax.annotation.Nullable - public UUID getDefaultOrganizationId() { - return defaultOrganizationId; - } - - - public void setDefaultOrganizationId(UUID defaultOrganizationId) { - this.defaultOrganizationId = defaultOrganizationId; - } - - - public User defaultProjectId(UUID defaultProjectId) { - - this.defaultProjectId = defaultProjectId; - return this; - } - - /** - * Get defaultProjectId - * @return defaultProjectId - **/ - @javax.annotation.Nullable - public UUID getDefaultProjectId() { - return defaultProjectId; - } - - - public void setDefaultProjectId(UUID defaultProjectId) { - this.defaultProjectId = defaultProjectId; - } - - - public User email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public User emails(List emails) { - - this.emails = emails; - return this; - } - - public User addEmailsItem(Href emailsItem) { - if (this.emails == null) { - this.emails = new ArrayList<>(); - } - this.emails.add(emailsItem); - return this; - } - - /** - * Get emails - * @return emails - **/ - @javax.annotation.Nullable - public List getEmails() { - return emails; - } - - - public void setEmails(List emails) { - this.emails = emails; - } - - - public User firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public User fraudScore(String fraudScore) { - - this.fraudScore = fraudScore; - return this; - } - - /** - * Get fraudScore - * @return fraudScore - **/ - @javax.annotation.Nullable - public String getFraudScore() { - return fraudScore; - } - - - public void setFraudScore(String fraudScore) { - this.fraudScore = fraudScore; - } - - - public User fullName(String fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Get fullName - * @return fullName - **/ - @javax.annotation.Nullable - public String getFullName() { - return fullName; - } - - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - - public User href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public User id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public User lastLoginAt(OffsetDateTime lastLoginAt) { - - this.lastLoginAt = lastLoginAt; - return this; - } - - /** - * Get lastLoginAt - * @return lastLoginAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getLastLoginAt() { - return lastLoginAt; - } - - - public void setLastLoginAt(OffsetDateTime lastLoginAt) { - this.lastLoginAt = lastLoginAt; - } - - - public User lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public User maxOrganizations(Integer maxOrganizations) { - - this.maxOrganizations = maxOrganizations; - return this; - } - - /** - * Get maxOrganizations - * @return maxOrganizations - **/ - @javax.annotation.Nullable - public Integer getMaxOrganizations() { - return maxOrganizations; - } - - - public void setMaxOrganizations(Integer maxOrganizations) { - this.maxOrganizations = maxOrganizations; - } - - - public User maxProjects(Integer maxProjects) { - - this.maxProjects = maxProjects; - return this; - } - - /** - * Get maxProjects - * @return maxProjects - **/ - @javax.annotation.Nullable - public Integer getMaxProjects() { - return maxProjects; - } - - - public void setMaxProjects(Integer maxProjects) { - this.maxProjects = maxProjects; - } - - - public User phoneNumber(String phoneNumber) { - - this.phoneNumber = phoneNumber; - return this; - } - - /** - * Get phoneNumber - * @return phoneNumber - **/ - @javax.annotation.Nullable - public String getPhoneNumber() { - return phoneNumber; - } - - - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - - public User shortId(String shortId) { - - this.shortId = shortId; - return this; - } - - /** - * Get shortId - * @return shortId - **/ - @javax.annotation.Nullable - public String getShortId() { - return shortId; - } - - - public void setShortId(String shortId) { - this.shortId = shortId; - } - - - public User timezone(String timezone) { - - this.timezone = timezone; - return this; - } - - /** - * Get timezone - * @return timezone - **/ - @javax.annotation.Nullable - public String getTimezone() { - return timezone; - } - - - public void setTimezone(String timezone) { - this.timezone = timezone; - } - - - public User twoFactorAuth(String twoFactorAuth) { - - this.twoFactorAuth = twoFactorAuth; - return this; - } - - /** - * Get twoFactorAuth - * @return twoFactorAuth - **/ - @javax.annotation.Nullable - public String getTwoFactorAuth() { - return twoFactorAuth; - } - - - public void setTwoFactorAuth(String twoFactorAuth) { - this.twoFactorAuth = twoFactorAuth; - } - - - public User updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the User instance itself - */ - public User putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.avatarThumbUrl, user.avatarThumbUrl) && - Objects.equals(this.avatarUrl, user.avatarUrl) && - Objects.equals(this.createdAt, user.createdAt) && - Objects.equals(this.customdata, user.customdata) && - Objects.equals(this.defaultOrganizationId, user.defaultOrganizationId) && - Objects.equals(this.defaultProjectId, user.defaultProjectId) && - Objects.equals(this.email, user.email) && - Objects.equals(this.emails, user.emails) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.fraudScore, user.fraudScore) && - Objects.equals(this.fullName, user.fullName) && - Objects.equals(this.href, user.href) && - Objects.equals(this.id, user.id) && - Objects.equals(this.lastLoginAt, user.lastLoginAt) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.maxOrganizations, user.maxOrganizations) && - Objects.equals(this.maxProjects, user.maxProjects) && - Objects.equals(this.phoneNumber, user.phoneNumber) && - Objects.equals(this.shortId, user.shortId) && - Objects.equals(this.timezone, user.timezone) && - Objects.equals(this.twoFactorAuth, user.twoFactorAuth) && - Objects.equals(this.updatedAt, user.updatedAt)&& - Objects.equals(this.additionalProperties, user.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(avatarThumbUrl, avatarUrl, createdAt, customdata, defaultOrganizationId, defaultProjectId, email, emails, firstName, fraudScore, fullName, href, id, lastLoginAt, lastName, maxOrganizations, maxProjects, phoneNumber, shortId, timezone, twoFactorAuth, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" avatarThumbUrl: ").append(toIndentedString(avatarThumbUrl)).append("\n"); - sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" defaultOrganizationId: ").append(toIndentedString(defaultOrganizationId)).append("\n"); - sb.append(" defaultProjectId: ").append(toIndentedString(defaultProjectId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" fraudScore: ").append(toIndentedString(fraudScore)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" lastLoginAt: ").append(toIndentedString(lastLoginAt)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" maxOrganizations: ").append(toIndentedString(maxOrganizations)).append("\n"); - sb.append(" maxProjects: ").append(toIndentedString(maxProjects)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" shortId: ").append(toIndentedString(shortId)).append("\n"); - sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); - sb.append(" twoFactorAuth: ").append(toIndentedString(twoFactorAuth)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatar_thumb_url"); - openapiFields.add("avatar_url"); - openapiFields.add("created_at"); - openapiFields.add("customdata"); - openapiFields.add("default_organization_id"); - openapiFields.add("default_project_id"); - openapiFields.add("email"); - openapiFields.add("emails"); - openapiFields.add("first_name"); - openapiFields.add("fraud_score"); - openapiFields.add("full_name"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("last_login_at"); - openapiFields.add("last_name"); - openapiFields.add("max_organizations"); - openapiFields.add("max_projects"); - openapiFields.add("phone_number"); - openapiFields.add("short_id"); - openapiFields.add("timezone"); - openapiFields.add("two_factor_auth"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to User - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!User.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in User is not found in the empty JSON string", User.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avatar_thumb_url") != null && !jsonObj.get("avatar_thumb_url").isJsonNull()) && !jsonObj.get("avatar_thumb_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatar_thumb_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar_thumb_url").toString())); - } - if ((jsonObj.get("avatar_url") != null && !jsonObj.get("avatar_url").isJsonNull()) && !jsonObj.get("avatar_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatar_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar_url").toString())); - } - if ((jsonObj.get("default_organization_id") != null && !jsonObj.get("default_organization_id").isJsonNull()) && !jsonObj.get("default_organization_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `default_organization_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_organization_id").toString())); - } - if ((jsonObj.get("default_project_id") != null && !jsonObj.get("default_project_id").isJsonNull()) && !jsonObj.get("default_project_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `default_project_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("default_project_id").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if (jsonObj.get("emails") != null && !jsonObj.get("emails").isJsonNull()) { - JsonArray jsonArrayemails = jsonObj.getAsJsonArray("emails"); - if (jsonArrayemails != null) { - // ensure the json data is an array - if (!jsonObj.get("emails").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); - } - - // validate the optional field `emails` (array) - for (int i = 0; i < jsonArrayemails.size(); i++) { - Href.validateJsonElement(jsonArrayemails.get(i)); - }; - } - } - if ((jsonObj.get("first_name") != null && !jsonObj.get("first_name").isJsonNull()) && !jsonObj.get("first_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); - } - if ((jsonObj.get("fraud_score") != null && !jsonObj.get("fraud_score").isJsonNull()) && !jsonObj.get("fraud_score").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fraud_score` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fraud_score").toString())); - } - if ((jsonObj.get("full_name") != null && !jsonObj.get("full_name").isJsonNull()) && !jsonObj.get("full_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `full_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("full_name").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("last_name") != null && !jsonObj.get("last_name").isJsonNull()) && !jsonObj.get("last_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); - } - if ((jsonObj.get("phone_number") != null && !jsonObj.get("phone_number").isJsonNull()) && !jsonObj.get("phone_number").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone_number").toString())); - } - if ((jsonObj.get("short_id") != null && !jsonObj.get("short_id").isJsonNull()) && !jsonObj.get("short_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("short_id").toString())); - } - if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); - } - if ((jsonObj.get("two_factor_auth") != null && !jsonObj.get("two_factor_auth").isJsonNull()) && !jsonObj.get("two_factor_auth").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `two_factor_auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("two_factor_auth").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!User.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'User' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(User.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, User value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public User read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - User instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of User given an JSON string - * - * @param jsonString JSON string - * @return An instance of User - * @throws IOException if the JSON string is invalid with respect to User - */ - public static User fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, User.class); - } - - /** - * Convert an instance of User to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java deleted file mode 100644 index 48fc7a75d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserCreateInput.java +++ /dev/null @@ -1,800 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.EmailInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.File; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * UserCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UserCreateInput { - public static final String SERIALIZED_NAME_AVATAR = "avatar"; - @SerializedName(SERIALIZED_NAME_AVATAR) - private File avatar; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "company_name"; - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COMPANY_URL = "company_url"; - @SerializedName(SERIALIZED_NAME_COMPANY_URL) - private String companyUrl; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_EMAILS = "emails"; - @SerializedName(SERIALIZED_NAME_EMAILS) - private List emails = new ArrayList<>(); - - public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_LEVEL = "level"; - @SerializedName(SERIALIZED_NAME_LEVEL) - private String level; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - @SerializedName(SERIALIZED_NAME_PASSWORD) - private String password; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "phone_number"; - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private String phoneNumber; - - public static final String SERIALIZED_NAME_SOCIAL_ACCOUNTS = "social_accounts"; - @SerializedName(SERIALIZED_NAME_SOCIAL_ACCOUNTS) - private Object socialAccounts; - - public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; - @SerializedName(SERIALIZED_NAME_TIMEZONE) - private String timezone; - - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_TWO_FACTOR_AUTH = "two_factor_auth"; - @SerializedName(SERIALIZED_NAME_TWO_FACTOR_AUTH) - private String twoFactorAuth; - - public static final String SERIALIZED_NAME_VERIFIED_AT = "verified_at"; - @SerializedName(SERIALIZED_NAME_VERIFIED_AT) - private OffsetDateTime verifiedAt; - - public static final String SERIALIZED_NAME_INVITATION_ID = "invitation_id"; - @SerializedName(SERIALIZED_NAME_INVITATION_ID) - private UUID invitationId; - - public static final String SERIALIZED_NAME_NONCE = "nonce"; - @SerializedName(SERIALIZED_NAME_NONCE) - private String nonce; - - public UserCreateInput() { - } - - public UserCreateInput avatar(File avatar) { - - this.avatar = avatar; - return this; - } - - /** - * Get avatar - * @return avatar - **/ - @javax.annotation.Nullable - public File getAvatar() { - return avatar; - } - - - public void setAvatar(File avatar) { - this.avatar = avatar; - } - - - public UserCreateInput companyName(String companyName) { - - this.companyName = companyName; - return this; - } - - /** - * Get companyName - * @return companyName - **/ - @javax.annotation.Nullable - public String getCompanyName() { - return companyName; - } - - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - - public UserCreateInput companyUrl(String companyUrl) { - - this.companyUrl = companyUrl; - return this; - } - - /** - * Get companyUrl - * @return companyUrl - **/ - @javax.annotation.Nullable - public String getCompanyUrl() { - return companyUrl; - } - - - public void setCompanyUrl(String companyUrl) { - this.companyUrl = companyUrl; - } - - - public UserCreateInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public UserCreateInput emails(List emails) { - - this.emails = emails; - return this; - } - - public UserCreateInput addEmailsItem(EmailInput emailsItem) { - if (this.emails == null) { - this.emails = new ArrayList<>(); - } - this.emails.add(emailsItem); - return this; - } - - /** - * Get emails - * @return emails - **/ - @javax.annotation.Nonnull - public List getEmails() { - return emails; - } - - - public void setEmails(List emails) { - this.emails = emails; - } - - - public UserCreateInput firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @javax.annotation.Nonnull - public String getFirstName() { - return firstName; - } - - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public UserCreateInput lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @javax.annotation.Nonnull - public String getLastName() { - return lastName; - } - - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public UserCreateInput level(String level) { - - this.level = level; - return this; - } - - /** - * Get level - * @return level - **/ - @javax.annotation.Nullable - public String getLevel() { - return level; - } - - - public void setLevel(String level) { - this.level = level; - } - - - public UserCreateInput password(String password) { - - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - - public void setPassword(String password) { - this.password = password; - } - - - public UserCreateInput phoneNumber(String phoneNumber) { - - this.phoneNumber = phoneNumber; - return this; - } - - /** - * Get phoneNumber - * @return phoneNumber - **/ - @javax.annotation.Nullable - public String getPhoneNumber() { - return phoneNumber; - } - - - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - - public UserCreateInput socialAccounts(Object socialAccounts) { - - this.socialAccounts = socialAccounts; - return this; - } - - /** - * Get socialAccounts - * @return socialAccounts - **/ - @javax.annotation.Nullable - public Object getSocialAccounts() { - return socialAccounts; - } - - - public void setSocialAccounts(Object socialAccounts) { - this.socialAccounts = socialAccounts; - } - - - public UserCreateInput timezone(String timezone) { - - this.timezone = timezone; - return this; - } - - /** - * Get timezone - * @return timezone - **/ - @javax.annotation.Nullable - public String getTimezone() { - return timezone; - } - - - public void setTimezone(String timezone) { - this.timezone = timezone; - } - - - public UserCreateInput title(String title) { - - this.title = title; - return this; - } - - /** - * Get title - * @return title - **/ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - - public void setTitle(String title) { - this.title = title; - } - - - public UserCreateInput twoFactorAuth(String twoFactorAuth) { - - this.twoFactorAuth = twoFactorAuth; - return this; - } - - /** - * Get twoFactorAuth - * @return twoFactorAuth - **/ - @javax.annotation.Nullable - public String getTwoFactorAuth() { - return twoFactorAuth; - } - - - public void setTwoFactorAuth(String twoFactorAuth) { - this.twoFactorAuth = twoFactorAuth; - } - - - public UserCreateInput verifiedAt(OffsetDateTime verifiedAt) { - - this.verifiedAt = verifiedAt; - return this; - } - - /** - * Get verifiedAt - * @return verifiedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getVerifiedAt() { - return verifiedAt; - } - - - public void setVerifiedAt(OffsetDateTime verifiedAt) { - this.verifiedAt = verifiedAt; - } - - - public UserCreateInput invitationId(UUID invitationId) { - - this.invitationId = invitationId; - return this; - } - - /** - * Get invitationId - * @return invitationId - **/ - @javax.annotation.Nullable - public UUID getInvitationId() { - return invitationId; - } - - - public void setInvitationId(UUID invitationId) { - this.invitationId = invitationId; - } - - - public UserCreateInput nonce(String nonce) { - - this.nonce = nonce; - return this; - } - - /** - * Get nonce - * @return nonce - **/ - @javax.annotation.Nullable - public String getNonce() { - return nonce; - } - - - public void setNonce(String nonce) { - this.nonce = nonce; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the UserCreateInput instance itself - */ - public UserCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserCreateInput userCreateInput = (UserCreateInput) o; - return Objects.equals(this.avatar, userCreateInput.avatar) && - Objects.equals(this.companyName, userCreateInput.companyName) && - Objects.equals(this.companyUrl, userCreateInput.companyUrl) && - Objects.equals(this.customdata, userCreateInput.customdata) && - Objects.equals(this.emails, userCreateInput.emails) && - Objects.equals(this.firstName, userCreateInput.firstName) && - Objects.equals(this.lastName, userCreateInput.lastName) && - Objects.equals(this.level, userCreateInput.level) && - Objects.equals(this.password, userCreateInput.password) && - Objects.equals(this.phoneNumber, userCreateInput.phoneNumber) && - Objects.equals(this.socialAccounts, userCreateInput.socialAccounts) && - Objects.equals(this.timezone, userCreateInput.timezone) && - Objects.equals(this.title, userCreateInput.title) && - Objects.equals(this.twoFactorAuth, userCreateInput.twoFactorAuth) && - Objects.equals(this.verifiedAt, userCreateInput.verifiedAt) && - Objects.equals(this.invitationId, userCreateInput.invitationId) && - Objects.equals(this.nonce, userCreateInput.nonce)&& - Objects.equals(this.additionalProperties, userCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(avatar, companyName, companyUrl, customdata, emails, firstName, lastName, level, password, phoneNumber, socialAccounts, timezone, title, twoFactorAuth, verifiedAt, invitationId, nonce, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserCreateInput {\n"); - sb.append(" avatar: ").append(toIndentedString(avatar)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" companyUrl: ").append(toIndentedString(companyUrl)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" level: ").append(toIndentedString(level)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" socialAccounts: ").append(toIndentedString(socialAccounts)).append("\n"); - sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" twoFactorAuth: ").append(toIndentedString(twoFactorAuth)).append("\n"); - sb.append(" verifiedAt: ").append(toIndentedString(verifiedAt)).append("\n"); - sb.append(" invitationId: ").append(toIndentedString(invitationId)).append("\n"); - sb.append(" nonce: ").append(toIndentedString(nonce)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatar"); - openapiFields.add("company_name"); - openapiFields.add("company_url"); - openapiFields.add("customdata"); - openapiFields.add("emails"); - openapiFields.add("first_name"); - openapiFields.add("last_name"); - openapiFields.add("level"); - openapiFields.add("password"); - openapiFields.add("phone_number"); - openapiFields.add("social_accounts"); - openapiFields.add("timezone"); - openapiFields.add("title"); - openapiFields.add("two_factor_auth"); - openapiFields.add("verified_at"); - openapiFields.add("invitation_id"); - openapiFields.add("nonce"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("emails"); - openapiRequiredFields.add("first_name"); - openapiRequiredFields.add("last_name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserCreateInput is not found in the empty JSON string", UserCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UserCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("company_name") != null && !jsonObj.get("company_name").isJsonNull()) && !jsonObj.get("company_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `company_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("company_name").toString())); - } - if ((jsonObj.get("company_url") != null && !jsonObj.get("company_url").isJsonNull()) && !jsonObj.get("company_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `company_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("company_url").toString())); - } - // ensure the json data is an array - if (!jsonObj.get("emails").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `emails` to be an array in the JSON string but got `%s`", jsonObj.get("emails").toString())); - } - - JsonArray jsonArrayemails = jsonObj.getAsJsonArray("emails"); - // validate the required field `emails` (array) - for (int i = 0; i < jsonArrayemails.size(); i++) { - EmailInput.validateJsonElement(jsonArrayemails.get(i)); - }; - if (!jsonObj.get("first_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); - } - if (!jsonObj.get("last_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); - } - if ((jsonObj.get("level") != null && !jsonObj.get("level").isJsonNull()) && !jsonObj.get("level").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `level` to be a primitive type in the JSON string but got `%s`", jsonObj.get("level").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); - } - if ((jsonObj.get("phone_number") != null && !jsonObj.get("phone_number").isJsonNull()) && !jsonObj.get("phone_number").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone_number").toString())); - } - if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); - } - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - if ((jsonObj.get("two_factor_auth") != null && !jsonObj.get("two_factor_auth").isJsonNull()) && !jsonObj.get("two_factor_auth").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `two_factor_auth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("two_factor_auth").toString())); - } - if ((jsonObj.get("invitation_id") != null && !jsonObj.get("invitation_id").isJsonNull()) && !jsonObj.get("invitation_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `invitation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invitation_id").toString())); - } - if ((jsonObj.get("nonce") != null && !jsonObj.get("nonce").isJsonNull()) && !jsonObj.get("nonce").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonce` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonce").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UserCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UserCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public UserCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - UserCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UserCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserCreateInput - * @throws IOException if the JSON string is invalid with respect to UserCreateInput - */ - public static UserCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserCreateInput.class); - } - - /** - * Convert an instance of UserCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLimited.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLimited.java deleted file mode 100644 index 581cab66a..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLimited.java +++ /dev/null @@ -1,418 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * UserLimited - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UserLimited { - public static final String SERIALIZED_NAME_AVATAR_THUMB_URL = "avatar_thumb_url"; - @SerializedName(SERIALIZED_NAME_AVATAR_THUMB_URL) - private String avatarThumbUrl; - - public static final String SERIALIZED_NAME_AVATAR_URL = "avatar_url"; - @SerializedName(SERIALIZED_NAME_AVATAR_URL) - private String avatarUrl; - - public static final String SERIALIZED_NAME_FULL_NAME = "full_name"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private String fullName; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public UserLimited() { - } - - public UserLimited avatarThumbUrl(String avatarThumbUrl) { - - this.avatarThumbUrl = avatarThumbUrl; - return this; - } - - /** - * Avatar thumbnail URL of the User - * @return avatarThumbUrl - **/ - @javax.annotation.Nullable - public String getAvatarThumbUrl() { - return avatarThumbUrl; - } - - - public void setAvatarThumbUrl(String avatarThumbUrl) { - this.avatarThumbUrl = avatarThumbUrl; - } - - - public UserLimited avatarUrl(String avatarUrl) { - - this.avatarUrl = avatarUrl; - return this; - } - - /** - * Avatar URL of the User - * @return avatarUrl - **/ - @javax.annotation.Nullable - public String getAvatarUrl() { - return avatarUrl; - } - - - public void setAvatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - } - - - public UserLimited fullName(String fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Full name of the User - * @return fullName - **/ - @javax.annotation.Nullable - public String getFullName() { - return fullName; - } - - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - - public UserLimited href(String href) { - - this.href = href; - return this; - } - - /** - * API URL uniquely representing the User - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public UserLimited id(UUID id) { - - this.id = id; - return this; - } - - /** - * ID of the User - * @return id - **/ - @javax.annotation.Nonnull - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the UserLimited instance itself - */ - public UserLimited putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserLimited userLimited = (UserLimited) o; - return Objects.equals(this.avatarThumbUrl, userLimited.avatarThumbUrl) && - Objects.equals(this.avatarUrl, userLimited.avatarUrl) && - Objects.equals(this.fullName, userLimited.fullName) && - Objects.equals(this.href, userLimited.href) && - Objects.equals(this.id, userLimited.id)&& - Objects.equals(this.additionalProperties, userLimited.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(avatarThumbUrl, avatarUrl, fullName, href, id, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserLimited {\n"); - sb.append(" avatarThumbUrl: ").append(toIndentedString(avatarThumbUrl)).append("\n"); - sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatar_thumb_url"); - openapiFields.add("avatar_url"); - openapiFields.add("full_name"); - openapiFields.add("href"); - openapiFields.add("id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserLimited - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserLimited.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserLimited is not found in the empty JSON string", UserLimited.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UserLimited.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avatar_thumb_url") != null && !jsonObj.get("avatar_thumb_url").isJsonNull()) && !jsonObj.get("avatar_thumb_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatar_thumb_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar_thumb_url").toString())); - } - if ((jsonObj.get("avatar_url") != null && !jsonObj.get("avatar_url").isJsonNull()) && !jsonObj.get("avatar_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatar_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar_url").toString())); - } - if ((jsonObj.get("full_name") != null && !jsonObj.get("full_name").isJsonNull()) && !jsonObj.get("full_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `full_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("full_name").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserLimited.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserLimited' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UserLimited.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UserLimited value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public UserLimited read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - UserLimited instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UserLimited given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserLimited - * @throws IOException if the JSON string is invalid with respect to UserLimited - */ - public static UserLimited fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserLimited.class); - } - - /** - * Convert an instance of UserLimited to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java deleted file mode 100644 index 3655844c2..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.User; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * UserList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UserList { - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public static final String SERIALIZED_NAME_USERS = "users"; - @SerializedName(SERIALIZED_NAME_USERS) - private List users; - - public UserList() { - } - - public UserList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - - public UserList users(List users) { - - this.users = users; - return this; - } - - public UserList addUsersItem(User usersItem) { - if (this.users == null) { - this.users = new ArrayList<>(); - } - this.users.add(usersItem); - return this; - } - - /** - * Get users - * @return users - **/ - @javax.annotation.Nullable - public List getUsers() { - return users; - } - - - public void setUsers(List users) { - this.users = users; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the UserList instance itself - */ - public UserList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserList userList = (UserList) o; - return Objects.equals(this.meta, userList.meta) && - Objects.equals(this.users, userList.users)&& - Objects.equals(this.additionalProperties, userList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(meta, users, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserList {\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" users: ").append(toIndentedString(users)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("meta"); - openapiFields.add("users"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserList is not found in the empty JSON string", UserList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - if (jsonObj.get("users") != null && !jsonObj.get("users").isJsonNull()) { - JsonArray jsonArrayusers = jsonObj.getAsJsonArray("users"); - if (jsonArrayusers != null) { - // ensure the json data is an array - if (!jsonObj.get("users").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `users` to be an array in the JSON string but got `%s`", jsonObj.get("users").toString())); - } - - // validate the optional field `users` (array) - for (int i = 0; i < jsonArrayusers.size(); i++) { - User.validateJsonElement(jsonArrayusers.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UserList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UserList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public UserList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - UserList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UserList given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserList - * @throws IOException if the JSON string is invalid with respect to UserList - */ - public static UserList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserList.class); - } - - /** - * Convert an instance of UserList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java deleted file mode 100644 index b66fc464b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserLite.java +++ /dev/null @@ -1,569 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * UserLite - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UserLite { - public static final String SERIALIZED_NAME_AVATAR_THUMB_URL = "avatar_thumb_url"; - @SerializedName(SERIALIZED_NAME_AVATAR_THUMB_URL) - private String avatarThumbUrl; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_FULL_NAME = "full_name"; - @SerializedName(SERIALIZED_NAME_FULL_NAME) - private String fullName; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_SHORT_ID = "short_id"; - @SerializedName(SERIALIZED_NAME_SHORT_ID) - private String shortId; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public UserLite() { - } - - public UserLite avatarThumbUrl(String avatarThumbUrl) { - - this.avatarThumbUrl = avatarThumbUrl; - return this; - } - - /** - * Avatar thumbnail URL of the User - * @return avatarThumbUrl - **/ - @javax.annotation.Nullable - public String getAvatarThumbUrl() { - return avatarThumbUrl; - } - - - public void setAvatarThumbUrl(String avatarThumbUrl) { - this.avatarThumbUrl = avatarThumbUrl; - } - - - public UserLite createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * When the user was created - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public UserLite email(String email) { - - this.email = email; - return this; - } - - /** - * Primary email address of the User - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public UserLite firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * First name of the User - * @return firstName - **/ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public UserLite fullName(String fullName) { - - this.fullName = fullName; - return this; - } - - /** - * Full name of the User - * @return fullName - **/ - @javax.annotation.Nullable - public String getFullName() { - return fullName; - } - - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - - public UserLite href(String href) { - - this.href = href; - return this; - } - - /** - * API URL uniquely representing the User - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public UserLite id(UUID id) { - - this.id = id; - return this; - } - - /** - * ID of the User - * @return id - **/ - @javax.annotation.Nonnull - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public UserLite lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Last name of the User - * @return lastName - **/ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public UserLite shortId(String shortId) { - - this.shortId = shortId; - return this; - } - - /** - * Short ID of the User - * @return shortId - **/ - @javax.annotation.Nonnull - public String getShortId() { - return shortId; - } - - - public void setShortId(String shortId) { - this.shortId = shortId; - } - - - public UserLite updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * When the user details were last updated - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the UserLite instance itself - */ - public UserLite putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserLite userLite = (UserLite) o; - return Objects.equals(this.avatarThumbUrl, userLite.avatarThumbUrl) && - Objects.equals(this.createdAt, userLite.createdAt) && - Objects.equals(this.email, userLite.email) && - Objects.equals(this.firstName, userLite.firstName) && - Objects.equals(this.fullName, userLite.fullName) && - Objects.equals(this.href, userLite.href) && - Objects.equals(this.id, userLite.id) && - Objects.equals(this.lastName, userLite.lastName) && - Objects.equals(this.shortId, userLite.shortId) && - Objects.equals(this.updatedAt, userLite.updatedAt)&& - Objects.equals(this.additionalProperties, userLite.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(avatarThumbUrl, createdAt, email, firstName, fullName, href, id, lastName, shortId, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserLite {\n"); - sb.append(" avatarThumbUrl: ").append(toIndentedString(avatarThumbUrl)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" shortId: ").append(toIndentedString(shortId)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("avatar_thumb_url"); - openapiFields.add("created_at"); - openapiFields.add("email"); - openapiFields.add("first_name"); - openapiFields.add("full_name"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("last_name"); - openapiFields.add("short_id"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("short_id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserLite - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserLite.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserLite is not found in the empty JSON string", UserLite.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UserLite.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("avatar_thumb_url") != null && !jsonObj.get("avatar_thumb_url").isJsonNull()) && !jsonObj.get("avatar_thumb_url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `avatar_thumb_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("avatar_thumb_url").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("first_name") != null && !jsonObj.get("first_name").isJsonNull()) && !jsonObj.get("first_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); - } - if ((jsonObj.get("full_name") != null && !jsonObj.get("full_name").isJsonNull()) && !jsonObj.get("full_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `full_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("full_name").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("last_name") != null && !jsonObj.get("last_name").isJsonNull()) && !jsonObj.get("last_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); - } - if (!jsonObj.get("short_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `short_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("short_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserLite.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserLite' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UserLite.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UserLite value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public UserLite read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - UserLite instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UserLite given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserLite - * @throws IOException if the JSON string is invalid with respect to UserLite - */ - public static UserLite fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserLite.class); - } - - /** - * Convert an instance of UserLite to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java deleted file mode 100644 index 581a4fae6..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/UserUpdateInput.java +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * UserUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UserUpdateInput { - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - @SerializedName(SERIALIZED_NAME_PASSWORD) - private String password; - - public static final String SERIALIZED_NAME_PHONE_NUMBER = "phone_number"; - @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) - private String phoneNumber; - - public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; - @SerializedName(SERIALIZED_NAME_TIMEZONE) - private String timezone; - - public UserUpdateInput() { - } - - public UserUpdateInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public UserUpdateInput firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public UserUpdateInput lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public UserUpdateInput password(String password) { - - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - - public void setPassword(String password) { - this.password = password; - } - - - public UserUpdateInput phoneNumber(String phoneNumber) { - - this.phoneNumber = phoneNumber; - return this; - } - - /** - * Get phoneNumber - * @return phoneNumber - **/ - @javax.annotation.Nullable - public String getPhoneNumber() { - return phoneNumber; - } - - - public void setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - } - - - public UserUpdateInput timezone(String timezone) { - - this.timezone = timezone; - return this; - } - - /** - * Get timezone - * @return timezone - **/ - @javax.annotation.Nullable - public String getTimezone() { - return timezone; - } - - - public void setTimezone(String timezone) { - this.timezone = timezone; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the UserUpdateInput instance itself - */ - public UserUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserUpdateInput userUpdateInput = (UserUpdateInput) o; - return Objects.equals(this.customdata, userUpdateInput.customdata) && - Objects.equals(this.firstName, userUpdateInput.firstName) && - Objects.equals(this.lastName, userUpdateInput.lastName) && - Objects.equals(this.password, userUpdateInput.password) && - Objects.equals(this.phoneNumber, userUpdateInput.phoneNumber) && - Objects.equals(this.timezone, userUpdateInput.timezone)&& - Objects.equals(this.additionalProperties, userUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(customdata, firstName, lastName, password, phoneNumber, timezone, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UserUpdateInput {\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); - sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customdata"); - openapiFields.add("first_name"); - openapiFields.add("last_name"); - openapiFields.add("password"); - openapiFields.add("phone_number"); - openapiFields.add("timezone"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to UserUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!UserUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UserUpdateInput is not found in the empty JSON string", UserUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("first_name") != null && !jsonObj.get("first_name").isJsonNull()) && !jsonObj.get("first_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); - } - if ((jsonObj.get("last_name") != null && !jsonObj.get("last_name").isJsonNull()) && !jsonObj.get("last_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); - } - if ((jsonObj.get("phone_number") != null && !jsonObj.get("phone_number").isJsonNull()) && !jsonObj.get("phone_number").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone_number").toString())); - } - if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!UserUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UserUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UserUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, UserUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public UserUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - UserUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of UserUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of UserUpdateInput - * @throws IOException if the JSON string is invalid with respect to UserUpdateInput - */ - public static UserUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UserUpdateInput.class); - } - - /** - * Convert an instance of UserUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Userdata.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Userdata.java deleted file mode 100644 index bb06954c8..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Userdata.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Userdata - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Userdata { - public static final String SERIALIZED_NAME_USERDATA = "userdata"; - @SerializedName(SERIALIZED_NAME_USERDATA) - private String userdata; - - public Userdata() { - } - - public Userdata userdata(String userdata) { - - this.userdata = userdata; - return this; - } - - /** - * Get userdata - * @return userdata - **/ - @javax.annotation.Nullable - public String getUserdata() { - return userdata; - } - - - public void setUserdata(String userdata) { - this.userdata = userdata; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Userdata instance itself - */ - public Userdata putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Userdata userdata = (Userdata) o; - return Objects.equals(this.userdata, userdata.userdata)&& - Objects.equals(this.additionalProperties, userdata.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(userdata, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Userdata {\n"); - sb.append(" userdata: ").append(toIndentedString(userdata)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("userdata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Userdata - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Userdata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Userdata is not found in the empty JSON string", Userdata.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("userdata") != null && !jsonObj.get("userdata").isJsonNull()) && !jsonObj.get("userdata").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userdata` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userdata").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Userdata.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Userdata' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Userdata.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Userdata value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Userdata read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Userdata instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Userdata given an JSON string - * - * @param jsonString JSON string - * @return An instance of Userdata - * @throws IOException if the JSON string is invalid with respect to Userdata - */ - public static Userdata fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Userdata.class); - } - - /** - * Convert an instance of Userdata to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VerifyEmail.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VerifyEmail.java deleted file mode 100644 index 0211d3eef..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VerifyEmail.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VerifyEmail - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VerifyEmail { - public static final String SERIALIZED_NAME_USER_TOKEN = "user_token"; - @SerializedName(SERIALIZED_NAME_USER_TOKEN) - private String userToken; - - public VerifyEmail() { - } - - public VerifyEmail userToken(String userToken) { - - this.userToken = userToken; - return this; - } - - /** - * User verification token - * @return userToken - **/ - @javax.annotation.Nonnull - public String getUserToken() { - return userToken; - } - - - public void setUserToken(String userToken) { - this.userToken = userToken; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VerifyEmail instance itself - */ - public VerifyEmail putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VerifyEmail verifyEmail = (VerifyEmail) o; - return Objects.equals(this.userToken, verifyEmail.userToken)&& - Objects.equals(this.additionalProperties, verifyEmail.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(userToken, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VerifyEmail {\n"); - sb.append(" userToken: ").append(toIndentedString(userToken)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("user_token"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("user_token"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VerifyEmail - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VerifyEmail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyEmail is not found in the empty JSON string", VerifyEmail.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VerifyEmail.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("user_token").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `user_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_token").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VerifyEmail.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VerifyEmail' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VerifyEmail.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VerifyEmail value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VerifyEmail read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VerifyEmail instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VerifyEmail given an JSON string - * - * @param jsonString JSON string - * @return An instance of VerifyEmail - * @throws IOException if the JSON string is invalid with respect to VerifyEmail - */ - public static VerifyEmail fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VerifyEmail.class); - } - - /** - * Convert an instance of VerifyEmail to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java deleted file mode 100644 index 4a0deb01d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuit.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.VlanVirtualCircuit; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuit; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuitType; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VirtualCircuit extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(VirtualCircuit.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VirtualCircuit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VirtualCircuit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterVlanVirtualCircuit = gson.getDelegateAdapter(this, TypeToken.get(VlanVirtualCircuit.class)); - final TypeAdapter adapterVrfVirtualCircuit = gson.getDelegateAdapter(this, TypeToken.get(VrfVirtualCircuit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VirtualCircuit value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `VlanVirtualCircuit` - if (value.getActualInstance() instanceof VlanVirtualCircuit) { - JsonElement element = adapterVlanVirtualCircuit.toJsonTree((VlanVirtualCircuit)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfVirtualCircuit` - if (value.getActualInstance() instanceof VrfVirtualCircuit) { - JsonElement element = adapterVrfVirtualCircuit.toJsonTree((VrfVirtualCircuit)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: VlanVirtualCircuit, VrfVirtualCircuit"); - } - - @Override - public VirtualCircuit read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize VlanVirtualCircuit - try { - // validate the JSON object to see if any exception is thrown - VlanVirtualCircuit.validateJsonElement(jsonElement); - actualAdapter = adapterVlanVirtualCircuit; - match++; - log.log(Level.FINER, "Input data matches schema 'VlanVirtualCircuit'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VlanVirtualCircuit failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VlanVirtualCircuit'", e); - } - // deserialize VrfVirtualCircuit - try { - // validate the JSON object to see if any exception is thrown - VrfVirtualCircuit.validateJsonElement(jsonElement); - actualAdapter = adapterVrfVirtualCircuit; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfVirtualCircuit'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfVirtualCircuit failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfVirtualCircuit'", e); - } - - if (match == 1) { - VirtualCircuit ret = new VirtualCircuit(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for VirtualCircuit: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public VirtualCircuit() { - super("oneOf", Boolean.FALSE); - } - - public VirtualCircuit(VlanVirtualCircuit o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public VirtualCircuit(VrfVirtualCircuit o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("VlanVirtualCircuit", VlanVirtualCircuit.class); - schemas.put("VrfVirtualCircuit", VrfVirtualCircuit.class); - } - - @Override - public Map> getSchemas() { - return VirtualCircuit.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * VlanVirtualCircuit, VrfVirtualCircuit - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof VlanVirtualCircuit) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfVirtualCircuit) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be VlanVirtualCircuit, VrfVirtualCircuit"); - } - - /** - * Get the actual instance, which can be the following: - * VlanVirtualCircuit, VrfVirtualCircuit - * - * @return The actual instance (VlanVirtualCircuit, VrfVirtualCircuit) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `VlanVirtualCircuit`. If the actual instance is not `VlanVirtualCircuit`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VlanVirtualCircuit` - * @throws ClassCastException if the instance is not `VlanVirtualCircuit` - */ - public VlanVirtualCircuit getVlanVirtualCircuit() throws ClassCastException { - return (VlanVirtualCircuit)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfVirtualCircuit`. If the actual instance is not `VrfVirtualCircuit`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfVirtualCircuit` - * @throws ClassCastException if the instance is not `VrfVirtualCircuit` - */ - public VrfVirtualCircuit getVrfVirtualCircuit() throws ClassCastException { - return (VrfVirtualCircuit)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VirtualCircuit - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with VlanVirtualCircuit - try { - VlanVirtualCircuit.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VlanVirtualCircuit failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfVirtualCircuit - try { - VrfVirtualCircuit.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfVirtualCircuit failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for VirtualCircuit with oneOf schemas: VlanVirtualCircuit, VrfVirtualCircuit. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of VirtualCircuit given an JSON string - * - * @param jsonString JSON string - * @return An instance of VirtualCircuit - * @throws IOException if the JSON string is invalid with respect to VirtualCircuit - */ - public static VirtualCircuit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VirtualCircuit.class); - } - - /** - * Convert an instance of VirtualCircuit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java deleted file mode 100644 index 99e7485b1..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInput.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.VlanVirtualCircuitCreateInput; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuitCreateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.openapitools.jackson.nullable.JsonNullable; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VirtualCircuitCreateInput extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(VirtualCircuitCreateInput.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VirtualCircuitCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VirtualCircuitCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterVlanVirtualCircuitCreateInput = gson.getDelegateAdapter(this, TypeToken.get(VlanVirtualCircuitCreateInput.class)); - final TypeAdapter adapterVrfVirtualCircuitCreateInput = gson.getDelegateAdapter(this, TypeToken.get(VrfVirtualCircuitCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VirtualCircuitCreateInput value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `VlanVirtualCircuitCreateInput` - if (value.getActualInstance() instanceof VlanVirtualCircuitCreateInput) { - JsonElement element = adapterVlanVirtualCircuitCreateInput.toJsonTree((VlanVirtualCircuitCreateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfVirtualCircuitCreateInput` - if (value.getActualInstance() instanceof VrfVirtualCircuitCreateInput) { - JsonElement element = adapterVrfVirtualCircuitCreateInput.toJsonTree((VrfVirtualCircuitCreateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: VlanVirtualCircuitCreateInput, VrfVirtualCircuitCreateInput"); - } - - @Override - public VirtualCircuitCreateInput read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize VlanVirtualCircuitCreateInput - try { - // validate the JSON object to see if any exception is thrown - VlanVirtualCircuitCreateInput.validateJsonElement(jsonElement); - actualAdapter = adapterVlanVirtualCircuitCreateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'VlanVirtualCircuitCreateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VlanVirtualCircuitCreateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VlanVirtualCircuitCreateInput'", e); - } - // deserialize VrfVirtualCircuitCreateInput - try { - // validate the JSON object to see if any exception is thrown - VrfVirtualCircuitCreateInput.validateJsonElement(jsonElement); - actualAdapter = adapterVrfVirtualCircuitCreateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfVirtualCircuitCreateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfVirtualCircuitCreateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfVirtualCircuitCreateInput'", e); - } - - if (match == 1) { - VirtualCircuitCreateInput ret = new VirtualCircuitCreateInput(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for VirtualCircuitCreateInput: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public VirtualCircuitCreateInput() { - super("oneOf", Boolean.FALSE); - } - - public VirtualCircuitCreateInput(VlanVirtualCircuitCreateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public VirtualCircuitCreateInput(VrfVirtualCircuitCreateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("VlanVirtualCircuitCreateInput", VlanVirtualCircuitCreateInput.class); - schemas.put("VrfVirtualCircuitCreateInput", VrfVirtualCircuitCreateInput.class); - } - - @Override - public Map> getSchemas() { - return VirtualCircuitCreateInput.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * VlanVirtualCircuitCreateInput, VrfVirtualCircuitCreateInput - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof VlanVirtualCircuitCreateInput) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfVirtualCircuitCreateInput) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be VlanVirtualCircuitCreateInput, VrfVirtualCircuitCreateInput"); - } - - /** - * Get the actual instance, which can be the following: - * VlanVirtualCircuitCreateInput, VrfVirtualCircuitCreateInput - * - * @return The actual instance (VlanVirtualCircuitCreateInput, VrfVirtualCircuitCreateInput) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `VlanVirtualCircuitCreateInput`. If the actual instance is not `VlanVirtualCircuitCreateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VlanVirtualCircuitCreateInput` - * @throws ClassCastException if the instance is not `VlanVirtualCircuitCreateInput` - */ - public VlanVirtualCircuitCreateInput getVlanVirtualCircuitCreateInput() throws ClassCastException { - return (VlanVirtualCircuitCreateInput)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfVirtualCircuitCreateInput`. If the actual instance is not `VrfVirtualCircuitCreateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfVirtualCircuitCreateInput` - * @throws ClassCastException if the instance is not `VrfVirtualCircuitCreateInput` - */ - public VrfVirtualCircuitCreateInput getVrfVirtualCircuitCreateInput() throws ClassCastException { - return (VrfVirtualCircuitCreateInput)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VirtualCircuitCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with VlanVirtualCircuitCreateInput - try { - VlanVirtualCircuitCreateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VlanVirtualCircuitCreateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfVirtualCircuitCreateInput - try { - VrfVirtualCircuitCreateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfVirtualCircuitCreateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for VirtualCircuitCreateInput with oneOf schemas: VlanVirtualCircuitCreateInput, VrfVirtualCircuitCreateInput. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of VirtualCircuitCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VirtualCircuitCreateInput - * @throws IOException if the JSON string is invalid with respect to VirtualCircuitCreateInput - */ - public static VirtualCircuitCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VirtualCircuitCreateInput.class); - } - - /** - * Convert an instance of VirtualCircuitCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java deleted file mode 100644 index 3ec0751a5..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.VirtualCircuit; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VirtualCircuitList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VirtualCircuitList { - public static final String SERIALIZED_NAME_VIRTUAL_CIRCUITS = "virtual_circuits"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_CIRCUITS) - private List virtualCircuits; - - public VirtualCircuitList() { - } - - public VirtualCircuitList virtualCircuits(List virtualCircuits) { - - this.virtualCircuits = virtualCircuits; - return this; - } - - public VirtualCircuitList addVirtualCircuitsItem(VirtualCircuit virtualCircuitsItem) { - if (this.virtualCircuits == null) { - this.virtualCircuits = new ArrayList<>(); - } - this.virtualCircuits.add(virtualCircuitsItem); - return this; - } - - /** - * Get virtualCircuits - * @return virtualCircuits - **/ - @javax.annotation.Nullable - public List getVirtualCircuits() { - return virtualCircuits; - } - - - public void setVirtualCircuits(List virtualCircuits) { - this.virtualCircuits = virtualCircuits; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VirtualCircuitList instance itself - */ - public VirtualCircuitList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VirtualCircuitList virtualCircuitList = (VirtualCircuitList) o; - return Objects.equals(this.virtualCircuits, virtualCircuitList.virtualCircuits)&& - Objects.equals(this.additionalProperties, virtualCircuitList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(virtualCircuits, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VirtualCircuitList {\n"); - sb.append(" virtualCircuits: ").append(toIndentedString(virtualCircuits)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("virtual_circuits"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VirtualCircuitList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VirtualCircuitList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualCircuitList is not found in the empty JSON string", VirtualCircuitList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("virtual_circuits") != null && !jsonObj.get("virtual_circuits").isJsonNull()) { - JsonArray jsonArrayvirtualCircuits = jsonObj.getAsJsonArray("virtual_circuits"); - if (jsonArrayvirtualCircuits != null) { - // ensure the json data is an array - if (!jsonObj.get("virtual_circuits").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `virtual_circuits` to be an array in the JSON string but got `%s`", jsonObj.get("virtual_circuits").toString())); - } - - // validate the optional field `virtual_circuits` (array) - for (int i = 0; i < jsonArrayvirtualCircuits.size(); i++) { - VirtualCircuit.validateJsonElement(jsonArrayvirtualCircuits.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VirtualCircuitList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VirtualCircuitList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VirtualCircuitList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VirtualCircuitList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VirtualCircuitList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VirtualCircuitList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VirtualCircuitList given an JSON string - * - * @param jsonString JSON string - * @return An instance of VirtualCircuitList - * @throws IOException if the JSON string is invalid with respect to VirtualCircuitList - */ - public static VirtualCircuitList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VirtualCircuitList.class); - } - - /** - * Convert an instance of VirtualCircuitList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java deleted file mode 100644 index e4de9715f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInput.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.VlanVirtualCircuitUpdateInput; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuitUpdateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VirtualCircuitUpdateInput extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(VirtualCircuitUpdateInput.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VirtualCircuitUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VirtualCircuitUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterVlanVirtualCircuitUpdateInput = gson.getDelegateAdapter(this, TypeToken.get(VlanVirtualCircuitUpdateInput.class)); - final TypeAdapter adapterVrfVirtualCircuitUpdateInput = gson.getDelegateAdapter(this, TypeToken.get(VrfVirtualCircuitUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VirtualCircuitUpdateInput value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `VlanVirtualCircuitUpdateInput` - if (value.getActualInstance() instanceof VlanVirtualCircuitUpdateInput) { - JsonElement element = adapterVlanVirtualCircuitUpdateInput.toJsonTree((VlanVirtualCircuitUpdateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `VrfVirtualCircuitUpdateInput` - if (value.getActualInstance() instanceof VrfVirtualCircuitUpdateInput) { - JsonElement element = adapterVrfVirtualCircuitUpdateInput.toJsonTree((VrfVirtualCircuitUpdateInput)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: VlanVirtualCircuitUpdateInput, VrfVirtualCircuitUpdateInput"); - } - - @Override - public VirtualCircuitUpdateInput read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize VlanVirtualCircuitUpdateInput - try { - // validate the JSON object to see if any exception is thrown - VlanVirtualCircuitUpdateInput.validateJsonElement(jsonElement); - actualAdapter = adapterVlanVirtualCircuitUpdateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'VlanVirtualCircuitUpdateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VlanVirtualCircuitUpdateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VlanVirtualCircuitUpdateInput'", e); - } - // deserialize VrfVirtualCircuitUpdateInput - try { - // validate the JSON object to see if any exception is thrown - VrfVirtualCircuitUpdateInput.validateJsonElement(jsonElement); - actualAdapter = adapterVrfVirtualCircuitUpdateInput; - match++; - log.log(Level.FINER, "Input data matches schema 'VrfVirtualCircuitUpdateInput'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfVirtualCircuitUpdateInput failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfVirtualCircuitUpdateInput'", e); - } - - if (match == 1) { - VirtualCircuitUpdateInput ret = new VirtualCircuitUpdateInput(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for VirtualCircuitUpdateInput: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public VirtualCircuitUpdateInput() { - super("oneOf", Boolean.FALSE); - } - - public VirtualCircuitUpdateInput(VlanVirtualCircuitUpdateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public VirtualCircuitUpdateInput(VrfVirtualCircuitUpdateInput o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("VlanVirtualCircuitUpdateInput", VlanVirtualCircuitUpdateInput.class); - schemas.put("VrfVirtualCircuitUpdateInput", VrfVirtualCircuitUpdateInput.class); - } - - @Override - public Map> getSchemas() { - return VirtualCircuitUpdateInput.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * VlanVirtualCircuitUpdateInput, VrfVirtualCircuitUpdateInput - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof VlanVirtualCircuitUpdateInput) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof VrfVirtualCircuitUpdateInput) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be VlanVirtualCircuitUpdateInput, VrfVirtualCircuitUpdateInput"); - } - - /** - * Get the actual instance, which can be the following: - * VlanVirtualCircuitUpdateInput, VrfVirtualCircuitUpdateInput - * - * @return The actual instance (VlanVirtualCircuitUpdateInput, VrfVirtualCircuitUpdateInput) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `VlanVirtualCircuitUpdateInput`. If the actual instance is not `VlanVirtualCircuitUpdateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VlanVirtualCircuitUpdateInput` - * @throws ClassCastException if the instance is not `VlanVirtualCircuitUpdateInput` - */ - public VlanVirtualCircuitUpdateInput getVlanVirtualCircuitUpdateInput() throws ClassCastException { - return (VlanVirtualCircuitUpdateInput)super.getActualInstance(); - } - /** - * Get the actual instance of `VrfVirtualCircuitUpdateInput`. If the actual instance is not `VrfVirtualCircuitUpdateInput`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfVirtualCircuitUpdateInput` - * @throws ClassCastException if the instance is not `VrfVirtualCircuitUpdateInput` - */ - public VrfVirtualCircuitUpdateInput getVrfVirtualCircuitUpdateInput() throws ClassCastException { - return (VrfVirtualCircuitUpdateInput)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VirtualCircuitUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with VlanVirtualCircuitUpdateInput - try { - VlanVirtualCircuitUpdateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VlanVirtualCircuitUpdateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with VrfVirtualCircuitUpdateInput - try { - VrfVirtualCircuitUpdateInput.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfVirtualCircuitUpdateInput failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for VirtualCircuitUpdateInput with oneOf schemas: VlanVirtualCircuitUpdateInput, VrfVirtualCircuitUpdateInput. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of VirtualCircuitUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VirtualCircuitUpdateInput - * @throws IOException if the JSON string is invalid with respect to VirtualCircuitUpdateInput - */ - public static VirtualCircuitUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VirtualCircuitUpdateInput.class); - } - - /** - * Convert an instance of VirtualCircuitUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java deleted file mode 100644 index 36cceabfe..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetwork.java +++ /dev/null @@ -1,675 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VirtualNetwork - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VirtualNetwork { - public static final String SERIALIZED_NAME_ASSIGNED_TO = "assigned_to"; - @SerializedName(SERIALIZED_NAME_ASSIGNED_TO) - private Href assignedTo; - - public static final String SERIALIZED_NAME_ASSIGNED_TO_VIRTUAL_CIRCUIT = "assigned_to_virtual_circuit"; - @SerializedName(SERIALIZED_NAME_ASSIGNED_TO_VIRTUAL_CIRCUIT) - private Boolean assignedToVirtualCircuit; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @SerializedName(SERIALIZED_NAME_FACILITY) - private Href facility; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_INSTANCES = "instances"; - @SerializedName(SERIALIZED_NAME_INSTANCES) - private List instances; - - public static final String SERIALIZED_NAME_METAL_GATEWAYS = "metal_gateways"; - @SerializedName(SERIALIZED_NAME_METAL_GATEWAYS) - private List metalGateways; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private Href metro; - - public static final String SERIALIZED_NAME_METRO_CODE = "metro_code"; - @SerializedName(SERIALIZED_NAME_METRO_CODE) - private String metroCode; - - public static final String SERIALIZED_NAME_VXLAN = "vxlan"; - @SerializedName(SERIALIZED_NAME_VXLAN) - private Integer vxlan; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public VirtualNetwork() { - } - - public VirtualNetwork assignedTo(Href assignedTo) { - - this.assignedTo = assignedTo; - return this; - } - - /** - * Get assignedTo - * @return assignedTo - **/ - @javax.annotation.Nullable - public Href getAssignedTo() { - return assignedTo; - } - - - public void setAssignedTo(Href assignedTo) { - this.assignedTo = assignedTo; - } - - - public VirtualNetwork assignedToVirtualCircuit(Boolean assignedToVirtualCircuit) { - - this.assignedToVirtualCircuit = assignedToVirtualCircuit; - return this; - } - - /** - * True if the virtual network is attached to a virtual circuit. False if not. - * @return assignedToVirtualCircuit - **/ - @javax.annotation.Nullable - public Boolean getAssignedToVirtualCircuit() { - return assignedToVirtualCircuit; - } - - - public void setAssignedToVirtualCircuit(Boolean assignedToVirtualCircuit) { - this.assignedToVirtualCircuit = assignedToVirtualCircuit; - } - - - public VirtualNetwork description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VirtualNetwork facility(Href facility) { - - this.facility = facility; - return this; - } - - /** - * Get facility - * @return facility - **/ - @javax.annotation.Nullable - public Href getFacility() { - return facility; - } - - - public void setFacility(Href facility) { - this.facility = facility; - } - - - public VirtualNetwork href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public VirtualNetwork id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public VirtualNetwork instances(List instances) { - - this.instances = instances; - return this; - } - - public VirtualNetwork addInstancesItem(Href instancesItem) { - if (this.instances == null) { - this.instances = new ArrayList<>(); - } - this.instances.add(instancesItem); - return this; - } - - /** - * A list of instances with ports currently associated to this Virtual Network. - * @return instances - **/ - @javax.annotation.Nullable - public List getInstances() { - return instances; - } - - - public void setInstances(List instances) { - this.instances = instances; - } - - - public VirtualNetwork metalGateways(List metalGateways) { - - this.metalGateways = metalGateways; - return this; - } - - public VirtualNetwork addMetalGatewaysItem(MetalGatewayLite metalGatewaysItem) { - if (this.metalGateways == null) { - this.metalGateways = new ArrayList<>(); - } - this.metalGateways.add(metalGatewaysItem); - return this; - } - - /** - * A list of metal gateways currently associated to this Virtual Network. - * @return metalGateways - **/ - @javax.annotation.Nullable - public List getMetalGateways() { - return metalGateways; - } - - - public void setMetalGateways(List metalGateways) { - this.metalGateways = metalGateways; - } - - - public VirtualNetwork metro(Href metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public Href getMetro() { - return metro; - } - - - public void setMetro(Href metro) { - this.metro = metro; - } - - - public VirtualNetwork metroCode(String metroCode) { - - this.metroCode = metroCode; - return this; - } - - /** - * The Metro code of the metro in which this Virtual Network is defined. - * @return metroCode - **/ - @javax.annotation.Nullable - public String getMetroCode() { - return metroCode; - } - - - public void setMetroCode(String metroCode) { - this.metroCode = metroCode; - } - - - public VirtualNetwork vxlan(Integer vxlan) { - - this.vxlan = vxlan; - return this; - } - - /** - * Get vxlan - * @return vxlan - **/ - @javax.annotation.Nullable - public Integer getVxlan() { - return vxlan; - } - - - public void setVxlan(Integer vxlan) { - this.vxlan = vxlan; - } - - - public VirtualNetwork tags(List tags) { - - this.tags = tags; - return this; - } - - public VirtualNetwork addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VirtualNetwork instance itself - */ - public VirtualNetwork putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VirtualNetwork virtualNetwork = (VirtualNetwork) o; - return Objects.equals(this.assignedTo, virtualNetwork.assignedTo) && - Objects.equals(this.assignedToVirtualCircuit, virtualNetwork.assignedToVirtualCircuit) && - Objects.equals(this.description, virtualNetwork.description) && - Objects.equals(this.facility, virtualNetwork.facility) && - Objects.equals(this.href, virtualNetwork.href) && - Objects.equals(this.id, virtualNetwork.id) && - Objects.equals(this.instances, virtualNetwork.instances) && - Objects.equals(this.metalGateways, virtualNetwork.metalGateways) && - Objects.equals(this.metro, virtualNetwork.metro) && - Objects.equals(this.metroCode, virtualNetwork.metroCode) && - Objects.equals(this.vxlan, virtualNetwork.vxlan) && - Objects.equals(this.tags, virtualNetwork.tags)&& - Objects.equals(this.additionalProperties, virtualNetwork.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(assignedTo, assignedToVirtualCircuit, description, facility, href, id, instances, metalGateways, metro, metroCode, vxlan, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VirtualNetwork {\n"); - sb.append(" assignedTo: ").append(toIndentedString(assignedTo)).append("\n"); - sb.append(" assignedToVirtualCircuit: ").append(toIndentedString(assignedToVirtualCircuit)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); - sb.append(" metalGateways: ").append(toIndentedString(metalGateways)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" metroCode: ").append(toIndentedString(metroCode)).append("\n"); - sb.append(" vxlan: ").append(toIndentedString(vxlan)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assigned_to"); - openapiFields.add("assigned_to_virtual_circuit"); - openapiFields.add("description"); - openapiFields.add("facility"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("instances"); - openapiFields.add("metal_gateways"); - openapiFields.add("metro"); - openapiFields.add("metro_code"); - openapiFields.add("vxlan"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VirtualNetwork - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VirtualNetwork.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualNetwork is not found in the empty JSON string", VirtualNetwork.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `assigned_to` - if (jsonObj.get("assigned_to") != null && !jsonObj.get("assigned_to").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("assigned_to")); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // validate the optional field `facility` - if (jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("facility")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (jsonObj.get("instances") != null && !jsonObj.get("instances").isJsonNull()) { - JsonArray jsonArrayinstances = jsonObj.getAsJsonArray("instances"); - if (jsonArrayinstances != null) { - // ensure the json data is an array - if (!jsonObj.get("instances").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `instances` to be an array in the JSON string but got `%s`", jsonObj.get("instances").toString())); - } - - // validate the optional field `instances` (array) - for (int i = 0; i < jsonArrayinstances.size(); i++) { - Href.validateJsonElement(jsonArrayinstances.get(i)); - }; - } - } - if (jsonObj.get("metal_gateways") != null && !jsonObj.get("metal_gateways").isJsonNull()) { - JsonArray jsonArraymetalGateways = jsonObj.getAsJsonArray("metal_gateways"); - if (jsonArraymetalGateways != null) { - // ensure the json data is an array - if (!jsonObj.get("metal_gateways").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `metal_gateways` to be an array in the JSON string but got `%s`", jsonObj.get("metal_gateways").toString())); - } - - // validate the optional field `metal_gateways` (array) - for (int i = 0; i < jsonArraymetalGateways.size(); i++) { - MetalGatewayLite.validateJsonElement(jsonArraymetalGateways.get(i)); - }; - } - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("metro")); - } - if ((jsonObj.get("metro_code") != null && !jsonObj.get("metro_code").isJsonNull()) && !jsonObj.get("metro_code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro_code").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VirtualNetwork.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VirtualNetwork' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VirtualNetwork.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VirtualNetwork value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VirtualNetwork read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VirtualNetwork instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VirtualNetwork given an JSON string - * - * @param jsonString JSON string - * @return An instance of VirtualNetwork - * @throws IOException if the JSON string is invalid with respect to VirtualNetwork - */ - public static VirtualNetwork fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VirtualNetwork.class); - } - - /** - * Convert an instance of VirtualNetwork to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java deleted file mode 100644 index 6d28803ae..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInput.java +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VirtualNetworkCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VirtualNetworkCreateInput { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_FACILITY = "facility"; - @Deprecated - @SerializedName(SERIALIZED_NAME_FACILITY) - private String facility; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_VXLAN = "vxlan"; - @SerializedName(SERIALIZED_NAME_VXLAN) - private Integer vxlan; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public VirtualNetworkCreateInput() { - } - - public VirtualNetworkCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - @Deprecated - public VirtualNetworkCreateInput facility(String facility) { - - this.facility = facility; - return this; - } - - /** - * The UUID (or facility code) for the Facility in which to create this Virtual network. - * @return facility - * @deprecated - **/ - @Deprecated - @javax.annotation.Nullable - public String getFacility() { - return facility; - } - - - @Deprecated - public void setFacility(String facility) { - this.facility = facility; - } - - - public VirtualNetworkCreateInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * The UUID (or metro code) for the Metro in which to create this Virtual Network. - * @return metro - **/ - @javax.annotation.Nullable - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public VirtualNetworkCreateInput vxlan(Integer vxlan) { - - this.vxlan = vxlan; - return this; - } - - /** - * VLAN ID between 2-3999. Must be unique for the project within the Metro in which this Virtual Network is being created. If no value is specified, the next-available VLAN ID in the range 1000-1999 will be automatically selected. - * @return vxlan - **/ - @javax.annotation.Nullable - public Integer getVxlan() { - return vxlan; - } - - - public void setVxlan(Integer vxlan) { - this.vxlan = vxlan; - } - - - public VirtualNetworkCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VirtualNetworkCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VirtualNetworkCreateInput instance itself - */ - public VirtualNetworkCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VirtualNetworkCreateInput virtualNetworkCreateInput = (VirtualNetworkCreateInput) o; - return Objects.equals(this.description, virtualNetworkCreateInput.description) && - Objects.equals(this.facility, virtualNetworkCreateInput.facility) && - Objects.equals(this.metro, virtualNetworkCreateInput.metro) && - Objects.equals(this.vxlan, virtualNetworkCreateInput.vxlan) && - Objects.equals(this.tags, virtualNetworkCreateInput.tags)&& - Objects.equals(this.additionalProperties, virtualNetworkCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, facility, metro, vxlan, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VirtualNetworkCreateInput {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" facility: ").append(toIndentedString(facility)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" vxlan: ").append(toIndentedString(vxlan)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("facility"); - openapiFields.add("metro"); - openapiFields.add("vxlan"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VirtualNetworkCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VirtualNetworkCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualNetworkCreateInput is not found in the empty JSON string", VirtualNetworkCreateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("facility") != null && !jsonObj.get("facility").isJsonNull()) && !jsonObj.get("facility").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `facility` to be a primitive type in the JSON string but got `%s`", jsonObj.get("facility").toString())); - } - if ((jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) && !jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VirtualNetworkCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VirtualNetworkCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VirtualNetworkCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VirtualNetworkCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VirtualNetworkCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VirtualNetworkCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VirtualNetworkCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VirtualNetworkCreateInput - * @throws IOException if the JSON string is invalid with respect to VirtualNetworkCreateInput - */ - public static VirtualNetworkCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VirtualNetworkCreateInput.class); - } - - /** - * Convert an instance of VirtualNetworkCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java deleted file mode 100644 index 9ebedee13..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VirtualNetworkList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VirtualNetworkList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VirtualNetworkList { - public static final String SERIALIZED_NAME_VIRTUAL_NETWORKS = "virtual_networks"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORKS) - private List virtualNetworks; - - public VirtualNetworkList() { - } - - public VirtualNetworkList virtualNetworks(List virtualNetworks) { - - this.virtualNetworks = virtualNetworks; - return this; - } - - public VirtualNetworkList addVirtualNetworksItem(VirtualNetwork virtualNetworksItem) { - if (this.virtualNetworks == null) { - this.virtualNetworks = new ArrayList<>(); - } - this.virtualNetworks.add(virtualNetworksItem); - return this; - } - - /** - * Get virtualNetworks - * @return virtualNetworks - **/ - @javax.annotation.Nullable - public List getVirtualNetworks() { - return virtualNetworks; - } - - - public void setVirtualNetworks(List virtualNetworks) { - this.virtualNetworks = virtualNetworks; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VirtualNetworkList instance itself - */ - public VirtualNetworkList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VirtualNetworkList virtualNetworkList = (VirtualNetworkList) o; - return Objects.equals(this.virtualNetworks, virtualNetworkList.virtualNetworks)&& - Objects.equals(this.additionalProperties, virtualNetworkList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(virtualNetworks, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VirtualNetworkList {\n"); - sb.append(" virtualNetworks: ").append(toIndentedString(virtualNetworks)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("virtual_networks"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VirtualNetworkList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VirtualNetworkList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualNetworkList is not found in the empty JSON string", VirtualNetworkList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("virtual_networks") != null && !jsonObj.get("virtual_networks").isJsonNull()) { - JsonArray jsonArrayvirtualNetworks = jsonObj.getAsJsonArray("virtual_networks"); - if (jsonArrayvirtualNetworks != null) { - // ensure the json data is an array - if (!jsonObj.get("virtual_networks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `virtual_networks` to be an array in the JSON string but got `%s`", jsonObj.get("virtual_networks").toString())); - } - - // validate the optional field `virtual_networks` (array) - for (int i = 0; i < jsonArrayvirtualNetworks.size(); i++) { - VirtualNetwork.validateJsonElement(jsonArrayvirtualNetworks.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VirtualNetworkList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VirtualNetworkList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VirtualNetworkList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VirtualNetworkList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VirtualNetworkList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VirtualNetworkList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VirtualNetworkList given an JSON string - * - * @param jsonString JSON string - * @return An instance of VirtualNetworkList - * @throws IOException if the JSON string is invalid with respect to VirtualNetworkList - */ - public static VirtualNetworkList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VirtualNetworkList.class); - } - - /** - * Convert an instance of VirtualNetworkList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanFabricVcCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanFabricVcCreateInput.java deleted file mode 100644 index 37c2877e3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanFabricVcCreateInput.java +++ /dev/null @@ -1,730 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VlanFabricVcCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VlanFabricVcCreateInput { - public static final String SERIALIZED_NAME_CONTACT_EMAIL = "contact_email"; - @SerializedName(SERIALIZED_NAME_CONTACT_EMAIL) - private String contactEmail; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private String project; - - public static final String SERIALIZED_NAME_REDUNDANCY = "redundancy"; - @SerializedName(SERIALIZED_NAME_REDUNDANCY) - private String redundancy; - - /** - * Either 'a_side' or 'z_side'. Setting this field to 'a_side' will create an interconnection with Fabric VCs (Metal Billed). Setting this field to 'z_side' will create an interconnection with Fabric VCs (Fabric Billed). This is required when the 'type' is 'shared', but this is not applicable when the 'type' is 'dedicated'. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. - */ - @JsonAdapter(ServiceTokenTypeEnum.Adapter.class) - public enum ServiceTokenTypeEnum { - A_SIDE("a_side"), - - Z_SIDE("z_side"); - - private String value; - - ServiceTokenTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ServiceTokenTypeEnum fromValue(String value) { - for (ServiceTokenTypeEnum b : ServiceTokenTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ServiceTokenTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ServiceTokenTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ServiceTokenTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ServiceTokenTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SERVICE_TOKEN_TYPE = "service_token_type"; - @SerializedName(SERIALIZED_NAME_SERVICE_TOKEN_TYPE) - private ServiceTokenTypeEnum serviceTokenType; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - /** - * When requesting for a Fabric VC, the value of this field should be 'shared'. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - SHARED("shared"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_VLANS = "vlans"; - @SerializedName(SERIALIZED_NAME_VLANS) - private List vlans; - - public VlanFabricVcCreateInput() { - } - - public VlanFabricVcCreateInput contactEmail(String contactEmail) { - - this.contactEmail = contactEmail; - return this; - } - - /** - * The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. - * @return contactEmail - **/ - @javax.annotation.Nullable - public String getContactEmail() { - return contactEmail; - } - - - public void setContactEmail(String contactEmail) { - this.contactEmail = contactEmail; - } - - - public VlanFabricVcCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VlanFabricVcCreateInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. - * @return metro - **/ - @javax.annotation.Nonnull - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public VlanFabricVcCreateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VlanFabricVcCreateInput project(String project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public String getProject() { - return project; - } - - - public void setProject(String project) { - this.project = project; - } - - - public VlanFabricVcCreateInput redundancy(String redundancy) { - - this.redundancy = redundancy; - return this; - } - - /** - * Either 'primary' or 'redundant'. - * @return redundancy - **/ - @javax.annotation.Nonnull - public String getRedundancy() { - return redundancy; - } - - - public void setRedundancy(String redundancy) { - this.redundancy = redundancy; - } - - - public VlanFabricVcCreateInput serviceTokenType(ServiceTokenTypeEnum serviceTokenType) { - - this.serviceTokenType = serviceTokenType; - return this; - } - - /** - * Either 'a_side' or 'z_side'. Setting this field to 'a_side' will create an interconnection with Fabric VCs (Metal Billed). Setting this field to 'z_side' will create an interconnection with Fabric VCs (Fabric Billed). This is required when the 'type' is 'shared', but this is not applicable when the 'type' is 'dedicated'. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. - * @return serviceTokenType - **/ - @javax.annotation.Nonnull - public ServiceTokenTypeEnum getServiceTokenType() { - return serviceTokenType; - } - - - public void setServiceTokenType(ServiceTokenTypeEnum serviceTokenType) { - this.serviceTokenType = serviceTokenType; - } - - - public VlanFabricVcCreateInput speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * A interconnection speed, in bps, mbps, or gbps. For Fabric VCs, this represents the maximum speed of the interconnection. For Fabric VCs (Metal Billed), this can only be one of the following: ''50mbps'', ''200mbps'', ''500mbps'', ''1gbps'', ''2gbps'', ''5gbps'' or ''10gbps'', and is required for creation. For Fabric VCs (Fabric Billed), this field will always default to ''10gbps'' even if it is not provided. For example, ''500000000'', ''50m'', or' ''500mbps'' will all work as valid inputs. - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public VlanFabricVcCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VlanFabricVcCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VlanFabricVcCreateInput type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * When requesting for a Fabric VC, the value of this field should be 'shared'. - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public VlanFabricVcCreateInput vlans(List vlans) { - - this.vlans = vlans; - return this; - } - - public VlanFabricVcCreateInput addVlansItem(Integer vlansItem) { - if (this.vlans == null) { - this.vlans = new ArrayList<>(); - } - this.vlans.add(vlansItem); - return this; - } - - /** - * A list of one or two metro-based VLANs that will be set on the virtual circuits of primary and/or secondary (if redundant) interconnections respectively when creating Fabric VCs. VLANs can also be set after the interconnection is created, but are required to fully activate the virtual circuits. - * @return vlans - **/ - @javax.annotation.Nullable - public List getVlans() { - return vlans; - } - - - public void setVlans(List vlans) { - this.vlans = vlans; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VlanFabricVcCreateInput instance itself - */ - public VlanFabricVcCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VlanFabricVcCreateInput vlanFabricVcCreateInput = (VlanFabricVcCreateInput) o; - return Objects.equals(this.contactEmail, vlanFabricVcCreateInput.contactEmail) && - Objects.equals(this.description, vlanFabricVcCreateInput.description) && - Objects.equals(this.metro, vlanFabricVcCreateInput.metro) && - Objects.equals(this.name, vlanFabricVcCreateInput.name) && - Objects.equals(this.project, vlanFabricVcCreateInput.project) && - Objects.equals(this.redundancy, vlanFabricVcCreateInput.redundancy) && - Objects.equals(this.serviceTokenType, vlanFabricVcCreateInput.serviceTokenType) && - Objects.equals(this.speed, vlanFabricVcCreateInput.speed) && - Objects.equals(this.tags, vlanFabricVcCreateInput.tags) && - Objects.equals(this.type, vlanFabricVcCreateInput.type) && - Objects.equals(this.vlans, vlanFabricVcCreateInput.vlans)&& - Objects.equals(this.additionalProperties, vlanFabricVcCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(contactEmail, description, metro, name, project, redundancy, serviceTokenType, speed, tags, type, vlans, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VlanFabricVcCreateInput {\n"); - sb.append(" contactEmail: ").append(toIndentedString(contactEmail)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" redundancy: ").append(toIndentedString(redundancy)).append("\n"); - sb.append(" serviceTokenType: ").append(toIndentedString(serviceTokenType)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" vlans: ").append(toIndentedString(vlans)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contact_email"); - openapiFields.add("description"); - openapiFields.add("metro"); - openapiFields.add("name"); - openapiFields.add("project"); - openapiFields.add("redundancy"); - openapiFields.add("service_token_type"); - openapiFields.add("speed"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("vlans"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metro"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("redundancy"); - openapiRequiredFields.add("service_token_type"); - openapiRequiredFields.add("type"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VlanFabricVcCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VlanFabricVcCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VlanFabricVcCreateInput is not found in the empty JSON string", VlanFabricVcCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VlanFabricVcCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("contact_email") != null && !jsonObj.get("contact_email").isJsonNull()) && !jsonObj.get("contact_email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contact_email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact_email").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) && !jsonObj.get("project").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project").toString())); - } - if (!jsonObj.get("redundancy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redundancy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redundancy").toString())); - } - if (!jsonObj.get("service_token_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `service_token_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("service_token_type").toString())); - } - // validate the required field `service_token_type` - ServiceTokenTypeEnum.validateJsonElement(jsonObj.get("service_token_type")); - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - // ensure the optional json data is an array if present - if (jsonObj.get("vlans") != null && !jsonObj.get("vlans").isJsonNull() && !jsonObj.get("vlans").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `vlans` to be an array in the JSON string but got `%s`", jsonObj.get("vlans").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VlanFabricVcCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VlanFabricVcCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VlanFabricVcCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VlanFabricVcCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VlanFabricVcCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VlanFabricVcCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VlanFabricVcCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VlanFabricVcCreateInput - * @throws IOException if the JSON string is invalid with respect to VlanFabricVcCreateInput - */ - public static VlanFabricVcCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VlanFabricVcCreateInput.class); - } - - /** - * Convert an instance of VlanFabricVcCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuit.java deleted file mode 100644 index ed984eb4d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuit.java +++ /dev/null @@ -1,796 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.VlanVirtualCircuitType; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VlanVirtualCircuit - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VlanVirtualCircuit { - public static final String SERIALIZED_NAME_BILL = "bill"; - @SerializedName(SERIALIZED_NAME_BILL) - private Boolean bill = false; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NNI_VLAN = "nni_vlan"; - @SerializedName(SERIALIZED_NAME_NNI_VLAN) - private Integer nniVlan; - - public static final String SERIALIZED_NAME_PORT = "port"; - @SerializedName(SERIALIZED_NAME_PORT) - private Href port; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - /** - * The status of a Virtual Circuit is always 'pending' on creation. The status can turn to 'Waiting on Customer VLAN' if a Metro VLAN was not set yet on the Virtual Circuit and is the last step needed for full activation. For Dedicated interconnections, as long as the Dedicated Port has been associated to the Virtual Circuit and a NNI VNID has been set, it will turn to 'waiting_on_customer_vlan'. For Fabric VCs, it will only change to 'waiting_on_customer_vlan' once the corresponding Fabric connection has been found on the Fabric side. If the Fabric service token associated with the Virtual Circuit hasn't been redeemed on Fabric within the expiry time, it will change to an `expired` status. Once a Metro VLAN is set on the Virtual Circuit (which for Fabric VCs, can be set on creation of a Fabric VC) and the necessary set up is done, it will turn into 'Activating' status as it tries to activate the Virtual Circuit. Once the Virtual Circuit fully activates and is configured on the switch, it will turn to staus 'active'. For Fabric VCs (Metal Billed), we will start billing the moment the status of the Virtual Circuit turns to 'active'. If there are any changes to the VLAN after the Virtual Circuit is in an 'active' status, the status will show 'changing_vlan' if a new VLAN has been provided, or 'deactivating' if we are removing the VLAN. When a deletion request is issued for the Virtual Circuit, it will move to a 'deleting' status, and we will immediately unconfigure the switch for the Virtual Circuit and issue a deletion on any associated Fabric connections. Any associated Metro VLANs on the virtual circuit will also be unassociated after the switch has been successfully unconfigured. If there are any associated Fabric connections, we will only fully delete the Virtual Circuit once we have checked that the Fabric connection was fully deprovisioned on Fabric. - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("pending"), - - WAITING_ON_CUSTOMER_VLAN("waiting_on_customer_vlan"), - - ACTIVATING("activating"), - - CHANGING_VLAN("changing_vlan"), - - DEACTIVATING("deactivating"), - - DELETING("deleting"), - - ACTIVE("active"), - - EXPIRED("expired"), - - ACTIVATION_FAILED("activation_failed"), - - CHANGING_VLAN_FAILED("changing_vlan_failed"), - - DEACTIVATION_FAILED("deactivation_failed"), - - DELETE_FAILED("delete_failed"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private VlanVirtualCircuitType type; - - public static final String SERIALIZED_NAME_VIRTUAL_NETWORK = "virtual_network"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORK) - private Href virtualNetwork; - - public static final String SERIALIZED_NAME_VNID = "vnid"; - @SerializedName(SERIALIZED_NAME_VNID) - private Integer vnid; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public VlanVirtualCircuit() { - } - - public VlanVirtualCircuit bill(Boolean bill) { - - this.bill = bill; - return this; - } - - /** - * True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. - * @return bill - **/ - @javax.annotation.Nullable - public Boolean getBill() { - return bill; - } - - - public void setBill(Boolean bill) { - this.bill = bill; - } - - - public VlanVirtualCircuit description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VlanVirtualCircuit id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public VlanVirtualCircuit name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VlanVirtualCircuit nniVlan(Integer nniVlan) { - - this.nniVlan = nniVlan; - return this; - } - - /** - * Get nniVlan - * @return nniVlan - **/ - @javax.annotation.Nullable - public Integer getNniVlan() { - return nniVlan; - } - - - public void setNniVlan(Integer nniVlan) { - this.nniVlan = nniVlan; - } - - - public VlanVirtualCircuit port(Href port) { - - this.port = port; - return this; - } - - /** - * Get port - * @return port - **/ - @javax.annotation.Nullable - public Href getPort() { - return port; - } - - - public void setPort(Href port) { - this.port = port; - } - - - public VlanVirtualCircuit project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - - public VlanVirtualCircuit speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * For Virtual Circuits on shared and dedicated connections, this speed should match the one set on their Interconnection Ports. For Virtual Circuits on Fabric VCs (both Metal and Fabric Billed) that have found their corresponding Fabric connection, this is the actual speed of the interconnection that was configured when setting up the interconnection on the Fabric Portal. Details on Fabric VCs are included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public VlanVirtualCircuit status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * The status of a Virtual Circuit is always 'pending' on creation. The status can turn to 'Waiting on Customer VLAN' if a Metro VLAN was not set yet on the Virtual Circuit and is the last step needed for full activation. For Dedicated interconnections, as long as the Dedicated Port has been associated to the Virtual Circuit and a NNI VNID has been set, it will turn to 'waiting_on_customer_vlan'. For Fabric VCs, it will only change to 'waiting_on_customer_vlan' once the corresponding Fabric connection has been found on the Fabric side. If the Fabric service token associated with the Virtual Circuit hasn't been redeemed on Fabric within the expiry time, it will change to an `expired` status. Once a Metro VLAN is set on the Virtual Circuit (which for Fabric VCs, can be set on creation of a Fabric VC) and the necessary set up is done, it will turn into 'Activating' status as it tries to activate the Virtual Circuit. Once the Virtual Circuit fully activates and is configured on the switch, it will turn to staus 'active'. For Fabric VCs (Metal Billed), we will start billing the moment the status of the Virtual Circuit turns to 'active'. If there are any changes to the VLAN after the Virtual Circuit is in an 'active' status, the status will show 'changing_vlan' if a new VLAN has been provided, or 'deactivating' if we are removing the VLAN. When a deletion request is issued for the Virtual Circuit, it will move to a 'deleting' status, and we will immediately unconfigure the switch for the Virtual Circuit and issue a deletion on any associated Fabric connections. Any associated Metro VLANs on the virtual circuit will also be unassociated after the switch has been successfully unconfigured. If there are any associated Fabric connections, we will only fully delete the Virtual Circuit once we have checked that the Fabric connection was fully deprovisioned on Fabric. - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public VlanVirtualCircuit tags(List tags) { - - this.tags = tags; - return this; - } - - public VlanVirtualCircuit addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VlanVirtualCircuit type(VlanVirtualCircuitType type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public VlanVirtualCircuitType getType() { - return type; - } - - - public void setType(VlanVirtualCircuitType type) { - this.type = type; - } - - - public VlanVirtualCircuit virtualNetwork(Href virtualNetwork) { - - this.virtualNetwork = virtualNetwork; - return this; - } - - /** - * Get virtualNetwork - * @return virtualNetwork - **/ - @javax.annotation.Nullable - public Href getVirtualNetwork() { - return virtualNetwork; - } - - - public void setVirtualNetwork(Href virtualNetwork) { - this.virtualNetwork = virtualNetwork; - } - - - public VlanVirtualCircuit vnid(Integer vnid) { - - this.vnid = vnid; - return this; - } - - /** - * Get vnid - * @return vnid - **/ - @javax.annotation.Nullable - public Integer getVnid() { - return vnid; - } - - - public void setVnid(Integer vnid) { - this.vnid = vnid; - } - - - public VlanVirtualCircuit createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public VlanVirtualCircuit updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VlanVirtualCircuit instance itself - */ - public VlanVirtualCircuit putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VlanVirtualCircuit vlanVirtualCircuit = (VlanVirtualCircuit) o; - return Objects.equals(this.bill, vlanVirtualCircuit.bill) && - Objects.equals(this.description, vlanVirtualCircuit.description) && - Objects.equals(this.id, vlanVirtualCircuit.id) && - Objects.equals(this.name, vlanVirtualCircuit.name) && - Objects.equals(this.nniVlan, vlanVirtualCircuit.nniVlan) && - Objects.equals(this.port, vlanVirtualCircuit.port) && - Objects.equals(this.project, vlanVirtualCircuit.project) && - Objects.equals(this.speed, vlanVirtualCircuit.speed) && - Objects.equals(this.status, vlanVirtualCircuit.status) && - Objects.equals(this.tags, vlanVirtualCircuit.tags) && - Objects.equals(this.type, vlanVirtualCircuit.type) && - Objects.equals(this.virtualNetwork, vlanVirtualCircuit.virtualNetwork) && - Objects.equals(this.vnid, vlanVirtualCircuit.vnid) && - Objects.equals(this.createdAt, vlanVirtualCircuit.createdAt) && - Objects.equals(this.updatedAt, vlanVirtualCircuit.updatedAt)&& - Objects.equals(this.additionalProperties, vlanVirtualCircuit.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bill, description, id, name, nniVlan, port, project, speed, status, tags, type, virtualNetwork, vnid, createdAt, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VlanVirtualCircuit {\n"); - sb.append(" bill: ").append(toIndentedString(bill)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" nniVlan: ").append(toIndentedString(nniVlan)).append("\n"); - sb.append(" port: ").append(toIndentedString(port)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" virtualNetwork: ").append(toIndentedString(virtualNetwork)).append("\n"); - sb.append(" vnid: ").append(toIndentedString(vnid)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bill"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("nni_vlan"); - openapiFields.add("port"); - openapiFields.add("project"); - openapiFields.add("speed"); - openapiFields.add("status"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("virtual_network"); - openapiFields.add("vnid"); - openapiFields.add("created_at"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VlanVirtualCircuit - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VlanVirtualCircuit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VlanVirtualCircuit is not found in the empty JSON string", VlanVirtualCircuit.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `port` - if (jsonObj.get("port") != null && !jsonObj.get("port").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("port")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - VlanVirtualCircuitType.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `virtual_network` - if (jsonObj.get("virtual_network") != null && !jsonObj.get("virtual_network").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("virtual_network")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VlanVirtualCircuit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VlanVirtualCircuit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VlanVirtualCircuit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VlanVirtualCircuit value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VlanVirtualCircuit read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VlanVirtualCircuit instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VlanVirtualCircuit given an JSON string - * - * @param jsonString JSON string - * @return An instance of VlanVirtualCircuit - * @throws IOException if the JSON string is invalid with respect to VlanVirtualCircuit - */ - public static VlanVirtualCircuit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VlanVirtualCircuit.class); - } - - /** - * Convert an instance of VlanVirtualCircuit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitCreateInput.java deleted file mode 100644 index d7f16fc36..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitCreateInput.java +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VlanVirtualCircuitCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VlanVirtualCircuitCreateInput { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NNI_VLAN = "nni_vlan"; - @SerializedName(SERIALIZED_NAME_NNI_VLAN) - private Integer nniVlan; - - public static final String SERIALIZED_NAME_PROJECT_ID = "project_id"; - @SerializedName(SERIALIZED_NAME_PROJECT_ID) - private UUID projectId; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_VNID = "vnid"; - @SerializedName(SERIALIZED_NAME_VNID) - private UUID vnid; - - public VlanVirtualCircuitCreateInput() { - } - - public VlanVirtualCircuitCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VlanVirtualCircuitCreateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VlanVirtualCircuitCreateInput nniVlan(Integer nniVlan) { - - this.nniVlan = nniVlan; - return this; - } - - /** - * Get nniVlan - * minimum: 2 - * maximum: 4094 - * @return nniVlan - **/ - @javax.annotation.Nullable - public Integer getNniVlan() { - return nniVlan; - } - - - public void setNniVlan(Integer nniVlan) { - this.nniVlan = nniVlan; - } - - - public VlanVirtualCircuitCreateInput projectId(UUID projectId) { - - this.projectId = projectId; - return this; - } - - /** - * Get projectId - * @return projectId - **/ - @javax.annotation.Nonnull - public UUID getProjectId() { - return projectId; - } - - - public void setProjectId(UUID projectId) { - this.projectId = projectId; - } - - - public VlanVirtualCircuitCreateInput speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * speed can be passed as integer number representing bps speed or string (e.g. '52m' or '100g' or '4 gbps') - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public VlanVirtualCircuitCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VlanVirtualCircuitCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VlanVirtualCircuitCreateInput vnid(UUID vnid) { - - this.vnid = vnid; - return this; - } - - /** - * A Virtual Network record UUID or the VNID of a Metro Virtual Network in your project (sent as integer). - * @return vnid - **/ - @javax.annotation.Nullable - public UUID getVnid() { - return vnid; - } - - - public void setVnid(UUID vnid) { - this.vnid = vnid; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VlanVirtualCircuitCreateInput instance itself - */ - public VlanVirtualCircuitCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VlanVirtualCircuitCreateInput vlanVirtualCircuitCreateInput = (VlanVirtualCircuitCreateInput) o; - return Objects.equals(this.description, vlanVirtualCircuitCreateInput.description) && - Objects.equals(this.name, vlanVirtualCircuitCreateInput.name) && - Objects.equals(this.nniVlan, vlanVirtualCircuitCreateInput.nniVlan) && - Objects.equals(this.projectId, vlanVirtualCircuitCreateInput.projectId) && - Objects.equals(this.speed, vlanVirtualCircuitCreateInput.speed) && - Objects.equals(this.tags, vlanVirtualCircuitCreateInput.tags) && - Objects.equals(this.vnid, vlanVirtualCircuitCreateInput.vnid)&& - Objects.equals(this.additionalProperties, vlanVirtualCircuitCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, name, nniVlan, projectId, speed, tags, vnid, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VlanVirtualCircuitCreateInput {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" nniVlan: ").append(toIndentedString(nniVlan)).append("\n"); - sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vnid: ").append(toIndentedString(vnid)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("name"); - openapiFields.add("nni_vlan"); - openapiFields.add("project_id"); - openapiFields.add("speed"); - openapiFields.add("tags"); - openapiFields.add("vnid"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("project_id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VlanVirtualCircuitCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VlanVirtualCircuitCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VlanVirtualCircuitCreateInput is not found in the empty JSON string", VlanVirtualCircuitCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VlanVirtualCircuitCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("project_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_id").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if ((jsonObj.get("vnid") != null && !jsonObj.get("vnid").isJsonNull()) && !jsonObj.get("vnid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vnid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vnid").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VlanVirtualCircuitCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VlanVirtualCircuitCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VlanVirtualCircuitCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VlanVirtualCircuitCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VlanVirtualCircuitCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VlanVirtualCircuitCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VlanVirtualCircuitCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VlanVirtualCircuitCreateInput - * @throws IOException if the JSON string is invalid with respect to VlanVirtualCircuitCreateInput - */ - public static VlanVirtualCircuitCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VlanVirtualCircuitCreateInput.class); - } - - /** - * Convert an instance of VlanVirtualCircuitCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitType.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitType.java deleted file mode 100644 index 218f7b567..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitType.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.JsonElement; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets VlanVirtualCircuitType - */ -@JsonAdapter(VlanVirtualCircuitType.Adapter.class) -public enum VlanVirtualCircuitType { - - VLAN("vlan"); - - private String value; - - VlanVirtualCircuitType(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VlanVirtualCircuitType fromValue(String value) { - for (VlanVirtualCircuitType b : VlanVirtualCircuitType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VlanVirtualCircuitType enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VlanVirtualCircuitType read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VlanVirtualCircuitType.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VlanVirtualCircuitType.fromValue(value); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitUpdateInput.java deleted file mode 100644 index 9d169203b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitUpdateInput.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VlanVirtualCircuitUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VlanVirtualCircuitUpdateInput { - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private String speed; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_VNID = "vnid"; - @SerializedName(SERIALIZED_NAME_VNID) - private String vnid; - - public VlanVirtualCircuitUpdateInput() { - } - - public VlanVirtualCircuitUpdateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VlanVirtualCircuitUpdateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VlanVirtualCircuitUpdateInput speed(String speed) { - - this.speed = speed; - return this; - } - - /** - * Speed can be changed only if it is an interconnection on a Dedicated Port - * @return speed - **/ - @javax.annotation.Nullable - public String getSpeed() { - return speed; - } - - - public void setSpeed(String speed) { - this.speed = speed; - } - - - public VlanVirtualCircuitUpdateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VlanVirtualCircuitUpdateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VlanVirtualCircuitUpdateInput vnid(String vnid) { - - this.vnid = vnid; - return this; - } - - /** - * A Virtual Network record UUID or the VNID of a Metro Virtual Network in your project. - * @return vnid - **/ - @javax.annotation.Nullable - public String getVnid() { - return vnid; - } - - - public void setVnid(String vnid) { - this.vnid = vnid; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VlanVirtualCircuitUpdateInput instance itself - */ - public VlanVirtualCircuitUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VlanVirtualCircuitUpdateInput vlanVirtualCircuitUpdateInput = (VlanVirtualCircuitUpdateInput) o; - return Objects.equals(this.description, vlanVirtualCircuitUpdateInput.description) && - Objects.equals(this.name, vlanVirtualCircuitUpdateInput.name) && - Objects.equals(this.speed, vlanVirtualCircuitUpdateInput.speed) && - Objects.equals(this.tags, vlanVirtualCircuitUpdateInput.tags) && - Objects.equals(this.vnid, vlanVirtualCircuitUpdateInput.vnid)&& - Objects.equals(this.additionalProperties, vlanVirtualCircuitUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(description, name, speed, tags, vnid, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VlanVirtualCircuitUpdateInput {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vnid: ").append(toIndentedString(vnid)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("name"); - openapiFields.add("speed"); - openapiFields.add("tags"); - openapiFields.add("vnid"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VlanVirtualCircuitUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VlanVirtualCircuitUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VlanVirtualCircuitUpdateInput is not found in the empty JSON string", VlanVirtualCircuitUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("speed") != null && !jsonObj.get("speed").isJsonNull()) && !jsonObj.get("speed").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `speed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("speed").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if ((jsonObj.get("vnid") != null && !jsonObj.get("vnid").isJsonNull()) && !jsonObj.get("vnid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vnid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vnid").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VlanVirtualCircuitUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VlanVirtualCircuitUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VlanVirtualCircuitUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VlanVirtualCircuitUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VlanVirtualCircuitUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VlanVirtualCircuitUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VlanVirtualCircuitUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VlanVirtualCircuitUpdateInput - * @throws IOException if the JSON string is invalid with respect to VlanVirtualCircuitUpdateInput - */ - public static VlanVirtualCircuitUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VlanVirtualCircuitUpdateInput.class); - } - - /** - * Convert an instance of VlanVirtualCircuitUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java deleted file mode 100644 index 741d59e2b..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/Vrf.java +++ /dev/null @@ -1,808 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.User; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuit; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * Vrf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Vrf { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_BILL = "bill"; - @SerializedName(SERIALIZED_NAME_BILL) - private Boolean bill = false; - - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_ENABLED = "bgp_dynamic_neighbors_enabled"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_ENABLED) - private Boolean bgpDynamicNeighborsEnabled; - - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_EXPORT_ROUTE_MAP = "bgp_dynamic_neighbors_export_route_map"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_EXPORT_ROUTE_MAP) - private Boolean bgpDynamicNeighborsExportRouteMap; - - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_BFD_ENABLED = "bgp_dynamic_neighbors_bfd_enabled"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_BFD_ENABLED) - private Boolean bgpDynamicNeighborsBfdEnabled; - - public static final String SERIALIZED_NAME_LOCAL_ASN = "local_asn"; - @SerializedName(SERIALIZED_NAME_LOCAL_ASN) - private Integer localAsn; - - public static final String SERIALIZED_NAME_VIRTUAL_CIRCUITS = "virtual_circuits"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_CIRCUITS) - private List virtualCircuits; - - public static final String SERIALIZED_NAME_IP_RANGES = "ip_ranges"; - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Project project; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private Metro metro; - - public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; - @SerializedName(SERIALIZED_NAME_CREATED_BY) - private User createdBy; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public Vrf() { - } - - public Vrf id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public Vrf name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Vrf description(String description) { - - this.description = description; - return this; - } - - /** - * Optional field that can be set to describe the VRF - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public Vrf bill(Boolean bill) { - - this.bill = bill; - return this; - } - - /** - * True if the VRF is being billed. Usage will start when the first VRF Virtual Circuit is active, and will only stop when the VRF has been deleted. - * @return bill - **/ - @javax.annotation.Nullable - public Boolean getBill() { - return bill; - } - - - public void setBill(Boolean bill) { - this.bill = bill; - } - - - public Vrf bgpDynamicNeighborsEnabled(Boolean bgpDynamicNeighborsEnabled) { - - this.bgpDynamicNeighborsEnabled = bgpDynamicNeighborsEnabled; - return this; - } - - /** - * Toggle to enable the dynamic bgp neighbors feature on the VRF - * @return bgpDynamicNeighborsEnabled - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsEnabled() { - return bgpDynamicNeighborsEnabled; - } - - - public void setBgpDynamicNeighborsEnabled(Boolean bgpDynamicNeighborsEnabled) { - this.bgpDynamicNeighborsEnabled = bgpDynamicNeighborsEnabled; - } - - - public Vrf bgpDynamicNeighborsExportRouteMap(Boolean bgpDynamicNeighborsExportRouteMap) { - - this.bgpDynamicNeighborsExportRouteMap = bgpDynamicNeighborsExportRouteMap; - return this; - } - - /** - * Toggle to export the VRF route-map to the dynamic bgp neighbors - * @return bgpDynamicNeighborsExportRouteMap - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsExportRouteMap() { - return bgpDynamicNeighborsExportRouteMap; - } - - - public void setBgpDynamicNeighborsExportRouteMap(Boolean bgpDynamicNeighborsExportRouteMap) { - this.bgpDynamicNeighborsExportRouteMap = bgpDynamicNeighborsExportRouteMap; - } - - - public Vrf bgpDynamicNeighborsBfdEnabled(Boolean bgpDynamicNeighborsBfdEnabled) { - - this.bgpDynamicNeighborsBfdEnabled = bgpDynamicNeighborsBfdEnabled; - return this; - } - - /** - * Toggle BFD on dynamic bgp neighbors sessions - * @return bgpDynamicNeighborsBfdEnabled - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsBfdEnabled() { - return bgpDynamicNeighborsBfdEnabled; - } - - - public void setBgpDynamicNeighborsBfdEnabled(Boolean bgpDynamicNeighborsBfdEnabled) { - this.bgpDynamicNeighborsBfdEnabled = bgpDynamicNeighborsBfdEnabled; - } - - - public Vrf localAsn(Integer localAsn) { - - this.localAsn = localAsn; - return this; - } - - /** - * A 4-byte ASN associated with the VRF. - * @return localAsn - **/ - @javax.annotation.Nullable - public Integer getLocalAsn() { - return localAsn; - } - - - public void setLocalAsn(Integer localAsn) { - this.localAsn = localAsn; - } - - - public Vrf virtualCircuits(List virtualCircuits) { - - this.virtualCircuits = virtualCircuits; - return this; - } - - public Vrf addVirtualCircuitsItem(VrfVirtualCircuit virtualCircuitsItem) { - if (this.virtualCircuits == null) { - this.virtualCircuits = new ArrayList<>(); - } - this.virtualCircuits.add(virtualCircuitsItem); - return this; - } - - /** - * Virtual circuits that are in the VRF - * @return virtualCircuits - **/ - @javax.annotation.Nullable - public List getVirtualCircuits() { - return virtualCircuits; - } - - - public void setVirtualCircuits(List virtualCircuits) { - this.virtualCircuits = virtualCircuits; - } - - - public Vrf ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public Vrf addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"]. - * @return ipRanges - **/ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - - public Vrf project(Project project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Project getProject() { - return project; - } - - - public void setProject(Project project) { - this.project = project; - } - - - public Vrf metro(Metro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public Metro getMetro() { - return metro; - } - - - public void setMetro(Metro metro) { - this.metro = metro; - } - - - public Vrf createdBy(User createdBy) { - - this.createdBy = createdBy; - return this; - } - - /** - * Get createdBy - * @return createdBy - **/ - @javax.annotation.Nullable - public User getCreatedBy() { - return createdBy; - } - - - public void setCreatedBy(User createdBy) { - this.createdBy = createdBy; - } - - - public Vrf href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public Vrf createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Vrf updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Vrf tags(List tags) { - - this.tags = tags; - return this; - } - - public Vrf addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the Vrf instance itself - */ - public Vrf putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Vrf vrf = (Vrf) o; - return Objects.equals(this.id, vrf.id) && - Objects.equals(this.name, vrf.name) && - Objects.equals(this.description, vrf.description) && - Objects.equals(this.bill, vrf.bill) && - Objects.equals(this.bgpDynamicNeighborsEnabled, vrf.bgpDynamicNeighborsEnabled) && - Objects.equals(this.bgpDynamicNeighborsExportRouteMap, vrf.bgpDynamicNeighborsExportRouteMap) && - Objects.equals(this.bgpDynamicNeighborsBfdEnabled, vrf.bgpDynamicNeighborsBfdEnabled) && - Objects.equals(this.localAsn, vrf.localAsn) && - Objects.equals(this.virtualCircuits, vrf.virtualCircuits) && - Objects.equals(this.ipRanges, vrf.ipRanges) && - Objects.equals(this.project, vrf.project) && - Objects.equals(this.metro, vrf.metro) && - Objects.equals(this.createdBy, vrf.createdBy) && - Objects.equals(this.href, vrf.href) && - Objects.equals(this.createdAt, vrf.createdAt) && - Objects.equals(this.updatedAt, vrf.updatedAt) && - Objects.equals(this.tags, vrf.tags)&& - Objects.equals(this.additionalProperties, vrf.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, description, bill, bgpDynamicNeighborsEnabled, bgpDynamicNeighborsExportRouteMap, bgpDynamicNeighborsBfdEnabled, localAsn, virtualCircuits, ipRanges, project, metro, createdBy, href, createdAt, updatedAt, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Vrf {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" bill: ").append(toIndentedString(bill)).append("\n"); - sb.append(" bgpDynamicNeighborsEnabled: ").append(toIndentedString(bgpDynamicNeighborsEnabled)).append("\n"); - sb.append(" bgpDynamicNeighborsExportRouteMap: ").append(toIndentedString(bgpDynamicNeighborsExportRouteMap)).append("\n"); - sb.append(" bgpDynamicNeighborsBfdEnabled: ").append(toIndentedString(bgpDynamicNeighborsBfdEnabled)).append("\n"); - sb.append(" localAsn: ").append(toIndentedString(localAsn)).append("\n"); - sb.append(" virtualCircuits: ").append(toIndentedString(virtualCircuits)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("description"); - openapiFields.add("bill"); - openapiFields.add("bgp_dynamic_neighbors_enabled"); - openapiFields.add("bgp_dynamic_neighbors_export_route_map"); - openapiFields.add("bgp_dynamic_neighbors_bfd_enabled"); - openapiFields.add("local_asn"); - openapiFields.add("virtual_circuits"); - openapiFields.add("ip_ranges"); - openapiFields.add("project"); - openapiFields.add("metro"); - openapiFields.add("created_by"); - openapiFields.add("href"); - openapiFields.add("created_at"); - openapiFields.add("updated_at"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Vrf - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Vrf.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Vrf is not found in the empty JSON string", Vrf.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (jsonObj.get("virtual_circuits") != null && !jsonObj.get("virtual_circuits").isJsonNull()) { - JsonArray jsonArrayvirtualCircuits = jsonObj.getAsJsonArray("virtual_circuits"); - if (jsonArrayvirtualCircuits != null) { - // ensure the json data is an array - if (!jsonObj.get("virtual_circuits").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `virtual_circuits` to be an array in the JSON string but got `%s`", jsonObj.get("virtual_circuits").toString())); - } - - // validate the optional field `virtual_circuits` (array) - for (int i = 0; i < jsonArrayvirtualCircuits.size(); i++) { - VrfVirtualCircuit.validateJsonElement(jsonArrayvirtualCircuits.get(i)); - }; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull() && !jsonObj.get("ip_ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Project.validateJsonElement(jsonObj.get("project")); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - Metro.validateJsonElement(jsonObj.get("metro")); - } - // validate the optional field `created_by` - if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { - User.validateJsonElement(jsonObj.get("created_by")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Vrf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Vrf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Vrf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Vrf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public Vrf read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - Vrf instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Vrf given an JSON string - * - * @param jsonString JSON string - * @return An instance of Vrf - * @throws IOException if the JSON string is invalid with respect to Vrf - */ - public static Vrf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Vrf.class); - } - - /** - * Convert an instance of Vrf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java deleted file mode 100644 index 96176936e..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfCreateInput.java +++ /dev/null @@ -1,550 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfCreateInput { - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_ENABLED = "bgp_dynamic_neighbors_enabled"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_ENABLED) - private Boolean bgpDynamicNeighborsEnabled; - - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_EXPORT_ROUTE_MAP = "bgp_dynamic_neighbors_export_route_map"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_EXPORT_ROUTE_MAP) - private Boolean bgpDynamicNeighborsExportRouteMap; - - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_BFD_ENABLED = "bgp_dynamic_neighbors_bfd_enabled"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_BFD_ENABLED) - private Boolean bgpDynamicNeighborsBfdEnabled; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IP_RANGES = "ip_ranges"; - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges; - - public static final String SERIALIZED_NAME_LOCAL_ASN = "local_asn"; - @SerializedName(SERIALIZED_NAME_LOCAL_ASN) - private Integer localAsn; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public VrfCreateInput() { - } - - public VrfCreateInput bgpDynamicNeighborsEnabled(Boolean bgpDynamicNeighborsEnabled) { - - this.bgpDynamicNeighborsEnabled = bgpDynamicNeighborsEnabled; - return this; - } - - /** - * Toggle to enable the dynamic bgp neighbors feature on the VRF - * @return bgpDynamicNeighborsEnabled - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsEnabled() { - return bgpDynamicNeighborsEnabled; - } - - - public void setBgpDynamicNeighborsEnabled(Boolean bgpDynamicNeighborsEnabled) { - this.bgpDynamicNeighborsEnabled = bgpDynamicNeighborsEnabled; - } - - - public VrfCreateInput bgpDynamicNeighborsExportRouteMap(Boolean bgpDynamicNeighborsExportRouteMap) { - - this.bgpDynamicNeighborsExportRouteMap = bgpDynamicNeighborsExportRouteMap; - return this; - } - - /** - * Toggle to export the VRF route-map to the dynamic bgp neighbors - * @return bgpDynamicNeighborsExportRouteMap - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsExportRouteMap() { - return bgpDynamicNeighborsExportRouteMap; - } - - - public void setBgpDynamicNeighborsExportRouteMap(Boolean bgpDynamicNeighborsExportRouteMap) { - this.bgpDynamicNeighborsExportRouteMap = bgpDynamicNeighborsExportRouteMap; - } - - - public VrfCreateInput bgpDynamicNeighborsBfdEnabled(Boolean bgpDynamicNeighborsBfdEnabled) { - - this.bgpDynamicNeighborsBfdEnabled = bgpDynamicNeighborsBfdEnabled; - return this; - } - - /** - * Toggle BFD on dynamic bgp neighbors sessions - * @return bgpDynamicNeighborsBfdEnabled - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsBfdEnabled() { - return bgpDynamicNeighborsBfdEnabled; - } - - - public void setBgpDynamicNeighborsBfdEnabled(Boolean bgpDynamicNeighborsBfdEnabled) { - this.bgpDynamicNeighborsBfdEnabled = bgpDynamicNeighborsBfdEnabled; - } - - - public VrfCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VrfCreateInput ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public VrfCreateInput addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64. A VRF\\'s IP ranges must be defined in order to create VRF IP Reservations, which can then be used for Metal Gateways or Virtual Circuits. - * @return ipRanges - **/ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - - public VrfCreateInput localAsn(Integer localAsn) { - - this.localAsn = localAsn; - return this; - } - - /** - * Get localAsn - * @return localAsn - **/ - @javax.annotation.Nullable - public Integer getLocalAsn() { - return localAsn; - } - - - public void setLocalAsn(Integer localAsn) { - this.localAsn = localAsn; - } - - - public VrfCreateInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * The UUID (or metro code) for the Metro in which to create this VRF. - * @return metro - **/ - @javax.annotation.Nonnull - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public VrfCreateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VrfCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfCreateInput instance itself - */ - public VrfCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfCreateInput vrfCreateInput = (VrfCreateInput) o; - return Objects.equals(this.bgpDynamicNeighborsEnabled, vrfCreateInput.bgpDynamicNeighborsEnabled) && - Objects.equals(this.bgpDynamicNeighborsExportRouteMap, vrfCreateInput.bgpDynamicNeighborsExportRouteMap) && - Objects.equals(this.bgpDynamicNeighborsBfdEnabled, vrfCreateInput.bgpDynamicNeighborsBfdEnabled) && - Objects.equals(this.description, vrfCreateInput.description) && - Objects.equals(this.ipRanges, vrfCreateInput.ipRanges) && - Objects.equals(this.localAsn, vrfCreateInput.localAsn) && - Objects.equals(this.metro, vrfCreateInput.metro) && - Objects.equals(this.name, vrfCreateInput.name) && - Objects.equals(this.tags, vrfCreateInput.tags)&& - Objects.equals(this.additionalProperties, vrfCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bgpDynamicNeighborsEnabled, bgpDynamicNeighborsExportRouteMap, bgpDynamicNeighborsBfdEnabled, description, ipRanges, localAsn, metro, name, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfCreateInput {\n"); - sb.append(" bgpDynamicNeighborsEnabled: ").append(toIndentedString(bgpDynamicNeighborsEnabled)).append("\n"); - sb.append(" bgpDynamicNeighborsExportRouteMap: ").append(toIndentedString(bgpDynamicNeighborsExportRouteMap)).append("\n"); - sb.append(" bgpDynamicNeighborsBfdEnabled: ").append(toIndentedString(bgpDynamicNeighborsBfdEnabled)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" localAsn: ").append(toIndentedString(localAsn)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bgp_dynamic_neighbors_enabled"); - openapiFields.add("bgp_dynamic_neighbors_export_route_map"); - openapiFields.add("bgp_dynamic_neighbors_bfd_enabled"); - openapiFields.add("description"); - openapiFields.add("ip_ranges"); - openapiFields.add("local_asn"); - openapiFields.add("metro"); - openapiFields.add("name"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metro"); - openapiRequiredFields.add("name"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfCreateInput is not found in the empty JSON string", VrfCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull() && !jsonObj.get("ip_ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); - } - if (!jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfCreateInput - * @throws IOException if the JSON string is invalid with respect to VrfCreateInput - */ - public static VrfCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfCreateInput.class); - } - - /** - * Convert an instance of VrfCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfFabricVcCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfFabricVcCreateInput.java deleted file mode 100644 index 1494e9f2d..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfFabricVcCreateInput.java +++ /dev/null @@ -1,734 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfFabricVcCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfFabricVcCreateInput { - public static final String SERIALIZED_NAME_CONTACT_EMAIL = "contact_email"; - @SerializedName(SERIALIZED_NAME_CONTACT_EMAIL) - private String contactEmail; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private String metro; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private String project; - - public static final String SERIALIZED_NAME_REDUNDANCY = "redundancy"; - @SerializedName(SERIALIZED_NAME_REDUNDANCY) - private String redundancy; - - /** - * Either 'a_side' or 'z_side'. Setting this field to 'a_side' will create an interconnection with Fabric VCs (Metal Billed). Setting this field to 'z_side' will create an interconnection with Fabric VCs (Fabric Billed). This is required when the 'type' is 'shared', but this is not applicable when the 'type' is 'dedicated'. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. - */ - @JsonAdapter(ServiceTokenTypeEnum.Adapter.class) - public enum ServiceTokenTypeEnum { - A_SIDE("a_side"), - - Z_SIDE("z_side"); - - private String value; - - ServiceTokenTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ServiceTokenTypeEnum fromValue(String value) { - for (ServiceTokenTypeEnum b : ServiceTokenTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ServiceTokenTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ServiceTokenTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ServiceTokenTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ServiceTokenTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SERVICE_TOKEN_TYPE = "service_token_type"; - @SerializedName(SERIALIZED_NAME_SERVICE_TOKEN_TYPE) - private ServiceTokenTypeEnum serviceTokenType; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - /** - * When requesting for a Fabric VC, the value of this field should be 'shared'. - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - SHARED("shared"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_VRFS = "vrfs"; - @SerializedName(SERIALIZED_NAME_VRFS) - private List vrfs = new ArrayList<>(); - - public VrfFabricVcCreateInput() { - } - - public VrfFabricVcCreateInput contactEmail(String contactEmail) { - - this.contactEmail = contactEmail; - return this; - } - - /** - * The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. - * @return contactEmail - **/ - @javax.annotation.Nullable - public String getContactEmail() { - return contactEmail; - } - - - public void setContactEmail(String contactEmail) { - this.contactEmail = contactEmail; - } - - - public VrfFabricVcCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VrfFabricVcCreateInput metro(String metro) { - - this.metro = metro; - return this; - } - - /** - * A Metro ID or code. When creating Fabric VCs (Metal Billed), this is where interconnection will be originating from, as we pre-authorize the use of one of our shared ports as the origin of the interconnection using A-Side service tokens. We only allow local connections for Fabric VCs (Metal Billed), so the destination location must be the same as the origin. For Fabric VCs (Fabric Billed), or shared connections, this will be the destination of the interconnection. We allow remote connections for Fabric VCs (Fabric Billed), so the origin of the interconnection can be a different metro set here. - * @return metro - **/ - @javax.annotation.Nonnull - public String getMetro() { - return metro; - } - - - public void setMetro(String metro) { - this.metro = metro; - } - - - public VrfFabricVcCreateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VrfFabricVcCreateInput project(String project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public String getProject() { - return project; - } - - - public void setProject(String project) { - this.project = project; - } - - - public VrfFabricVcCreateInput redundancy(String redundancy) { - - this.redundancy = redundancy; - return this; - } - - /** - * Either 'primary' or 'redundant'. - * @return redundancy - **/ - @javax.annotation.Nonnull - public String getRedundancy() { - return redundancy; - } - - - public void setRedundancy(String redundancy) { - this.redundancy = redundancy; - } - - - public VrfFabricVcCreateInput serviceTokenType(ServiceTokenTypeEnum serviceTokenType) { - - this.serviceTokenType = serviceTokenType; - return this; - } - - /** - * Either 'a_side' or 'z_side'. Setting this field to 'a_side' will create an interconnection with Fabric VCs (Metal Billed). Setting this field to 'z_side' will create an interconnection with Fabric VCs (Fabric Billed). This is required when the 'type' is 'shared', but this is not applicable when the 'type' is 'dedicated'. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. - * @return serviceTokenType - **/ - @javax.annotation.Nonnull - public ServiceTokenTypeEnum getServiceTokenType() { - return serviceTokenType; - } - - - public void setServiceTokenType(ServiceTokenTypeEnum serviceTokenType) { - this.serviceTokenType = serviceTokenType; - } - - - public VrfFabricVcCreateInput speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * A interconnection speed, in bps, mbps, or gbps. For Fabric VCs, this represents the maximum speed of the interconnection. For Fabric VCs (Metal Billed), this can only be one of the following: ''50mbps'', ''200mbps'', ''500mbps'', ''1gbps'', ''2gbps'', ''5gbps'' or ''10gbps'', and is required for creation. For Fabric VCs (Fabric Billed), this field will always default to ''10gbps'' even if it is not provided. For example, ''500000000'', ''50m'', or' ''500mbps'' will all work as valid inputs. - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public VrfFabricVcCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfFabricVcCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VrfFabricVcCreateInput type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * When requesting for a Fabric VC, the value of this field should be 'shared'. - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public VrfFabricVcCreateInput vrfs(List vrfs) { - - this.vrfs = vrfs; - return this; - } - - public VrfFabricVcCreateInput addVrfsItem(UUID vrfsItem) { - if (this.vrfs == null) { - this.vrfs = new ArrayList<>(); - } - this.vrfs.add(vrfsItem); - return this; - } - - /** - * This field holds a list of VRF UUIDs that will be set automatically on the virtual circuits of Fabric VCs on creation, and can hold up to two UUIDs. Two UUIDs are required when requesting redundant Fabric VCs. The first UUID will be set on the primary virtual circuit, while the second UUID will be set on the secondary. The two UUIDs can be the same if both the primary and secondary virtual circuits will be in the same VRF. This parameter is included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. - * @return vrfs - **/ - @javax.annotation.Nonnull - public List getVrfs() { - return vrfs; - } - - - public void setVrfs(List vrfs) { - this.vrfs = vrfs; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfFabricVcCreateInput instance itself - */ - public VrfFabricVcCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfFabricVcCreateInput vrfFabricVcCreateInput = (VrfFabricVcCreateInput) o; - return Objects.equals(this.contactEmail, vrfFabricVcCreateInput.contactEmail) && - Objects.equals(this.description, vrfFabricVcCreateInput.description) && - Objects.equals(this.metro, vrfFabricVcCreateInput.metro) && - Objects.equals(this.name, vrfFabricVcCreateInput.name) && - Objects.equals(this.project, vrfFabricVcCreateInput.project) && - Objects.equals(this.redundancy, vrfFabricVcCreateInput.redundancy) && - Objects.equals(this.serviceTokenType, vrfFabricVcCreateInput.serviceTokenType) && - Objects.equals(this.speed, vrfFabricVcCreateInput.speed) && - Objects.equals(this.tags, vrfFabricVcCreateInput.tags) && - Objects.equals(this.type, vrfFabricVcCreateInput.type) && - Objects.equals(this.vrfs, vrfFabricVcCreateInput.vrfs)&& - Objects.equals(this.additionalProperties, vrfFabricVcCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(contactEmail, description, metro, name, project, redundancy, serviceTokenType, speed, tags, type, vrfs, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfFabricVcCreateInput {\n"); - sb.append(" contactEmail: ").append(toIndentedString(contactEmail)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" redundancy: ").append(toIndentedString(redundancy)).append("\n"); - sb.append(" serviceTokenType: ").append(toIndentedString(serviceTokenType)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" vrfs: ").append(toIndentedString(vrfs)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("contact_email"); - openapiFields.add("description"); - openapiFields.add("metro"); - openapiFields.add("name"); - openapiFields.add("project"); - openapiFields.add("redundancy"); - openapiFields.add("service_token_type"); - openapiFields.add("speed"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("vrfs"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("metro"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("redundancy"); - openapiRequiredFields.add("service_token_type"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("vrfs"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfFabricVcCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfFabricVcCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfFabricVcCreateInput is not found in the empty JSON string", VrfFabricVcCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfFabricVcCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("contact_email") != null && !jsonObj.get("contact_email").isJsonNull()) && !jsonObj.get("contact_email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `contact_email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("contact_email").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if (!jsonObj.get("metro").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metro` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metro").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) && !jsonObj.get("project").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project").toString())); - } - if (!jsonObj.get("redundancy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redundancy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redundancy").toString())); - } - if (!jsonObj.get("service_token_type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `service_token_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("service_token_type").toString())); - } - // validate the required field `service_token_type` - ServiceTokenTypeEnum.validateJsonElement(jsonObj.get("service_token_type")); - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - // ensure the required json array is present - if (jsonObj.get("vrfs") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("vrfs").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `vrfs` to be an array in the JSON string but got `%s`", jsonObj.get("vrfs").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfFabricVcCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfFabricVcCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfFabricVcCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfFabricVcCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfFabricVcCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfFabricVcCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfFabricVcCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfFabricVcCreateInput - * @throws IOException if the JSON string is invalid with respect to VrfFabricVcCreateInput - */ - public static VrfFabricVcCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfFabricVcCreateInput.class); - } - - /** - * Convert an instance of VrfFabricVcCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservation.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservation.java deleted file mode 100644 index 8c7622ac0..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservation.java +++ /dev/null @@ -1,1057 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfIpReservation - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfIpReservation { - public static final String SERIALIZED_NAME_ADDRESS_FAMILY = "address_family"; - @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) - private Integer addressFamily; - - public static final String SERIALIZED_NAME_CIDR = "cidr"; - @SerializedName(SERIALIZED_NAME_CIDR) - private Integer cidr; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; - @SerializedName(SERIALIZED_NAME_CREATED_BY) - private Href createdBy; - - public static final String SERIALIZED_NAME_DETAILS = "details"; - @SerializedName(SERIALIZED_NAME_DETAILS) - private String details; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_METAL_GATEWAY = "metal_gateway"; - @SerializedName(SERIALIZED_NAME_METAL_GATEWAY) - private MetalGatewayLite metalGateway; - - public static final String SERIALIZED_NAME_NETMASK = "netmask"; - @SerializedName(SERIALIZED_NAME_NETMASK) - private String netmask; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private String network; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Project project; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - VRF("vrf"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_VRF = "vrf"; - @SerializedName(SERIALIZED_NAME_VRF) - private Vrf vrf; - - public static final String SERIALIZED_NAME_PUBLIC = "public"; - @SerializedName(SERIALIZED_NAME_PUBLIC) - private Boolean _public; - - public static final String SERIALIZED_NAME_MANAGEMENT = "management"; - @SerializedName(SERIALIZED_NAME_MANAGEMENT) - private Boolean management; - - public static final String SERIALIZED_NAME_MANAGEABLE = "manageable"; - @SerializedName(SERIALIZED_NAME_MANAGEABLE) - private Boolean manageable; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_BILL = "bill"; - @SerializedName(SERIALIZED_NAME_BILL) - private Boolean bill; - - public static final String SERIALIZED_NAME_PROJECT_LITE = "project_lite"; - @SerializedName(SERIALIZED_NAME_PROJECT_LITE) - private Project projectLite; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_GATEWAY = "gateway"; - @SerializedName(SERIALIZED_NAME_GATEWAY) - private String gateway; - - public static final String SERIALIZED_NAME_METRO = "metro"; - @SerializedName(SERIALIZED_NAME_METRO) - private Metro metro; - - public VrfIpReservation() { - } - - public VrfIpReservation addressFamily(Integer addressFamily) { - - this.addressFamily = addressFamily; - return this; - } - - /** - * Get addressFamily - * @return addressFamily - **/ - @javax.annotation.Nullable - public Integer getAddressFamily() { - return addressFamily; - } - - - public void setAddressFamily(Integer addressFamily) { - this.addressFamily = addressFamily; - } - - - public VrfIpReservation cidr(Integer cidr) { - - this.cidr = cidr; - return this; - } - - /** - * Get cidr - * @return cidr - **/ - @javax.annotation.Nullable - public Integer getCidr() { - return cidr; - } - - - public void setCidr(Integer cidr) { - this.cidr = cidr; - } - - - public VrfIpReservation createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public VrfIpReservation createdBy(Href createdBy) { - - this.createdBy = createdBy; - return this; - } - - /** - * Get createdBy - * @return createdBy - **/ - @javax.annotation.Nullable - public Href getCreatedBy() { - return createdBy; - } - - - public void setCreatedBy(Href createdBy) { - this.createdBy = createdBy; - } - - - public VrfIpReservation details(String details) { - - this.details = details; - return this; - } - - /** - * Get details - * @return details - **/ - @javax.annotation.Nullable - public String getDetails() { - return details; - } - - - public void setDetails(String details) { - this.details = details; - } - - - public VrfIpReservation href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public VrfIpReservation id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public VrfIpReservation metalGateway(MetalGatewayLite metalGateway) { - - this.metalGateway = metalGateway; - return this; - } - - /** - * Get metalGateway - * @return metalGateway - **/ - @javax.annotation.Nullable - public MetalGatewayLite getMetalGateway() { - return metalGateway; - } - - - public void setMetalGateway(MetalGatewayLite metalGateway) { - this.metalGateway = metalGateway; - } - - - public VrfIpReservation netmask(String netmask) { - - this.netmask = netmask; - return this; - } - - /** - * Get netmask - * @return netmask - **/ - @javax.annotation.Nullable - public String getNetmask() { - return netmask; - } - - - public void setNetmask(String netmask) { - this.netmask = netmask; - } - - - public VrfIpReservation network(String network) { - - this.network = network; - return this; - } - - /** - * Get network - * @return network - **/ - @javax.annotation.Nullable - public String getNetwork() { - return network; - } - - - public void setNetwork(String network) { - this.network = network; - } - - - public VrfIpReservation project(Project project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Project getProject() { - return project; - } - - - public void setProject(Project project) { - this.project = project; - } - - - public VrfIpReservation state(String state) { - - this.state = state; - return this; - } - - /** - * Get state - * @return state - **/ - @javax.annotation.Nullable - public String getState() { - return state; - } - - - public void setState(String state) { - this.state = state; - } - - - public VrfIpReservation tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfIpReservation addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VrfIpReservation type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nonnull - public TypeEnum getType() { - return type; - } - - - public void setType(TypeEnum type) { - this.type = type; - } - - - public VrfIpReservation vrf(Vrf vrf) { - - this.vrf = vrf; - return this; - } - - /** - * Get vrf - * @return vrf - **/ - @javax.annotation.Nonnull - public Vrf getVrf() { - return vrf; - } - - - public void setVrf(Vrf vrf) { - this.vrf = vrf; - } - - - public VrfIpReservation _public(Boolean _public) { - - this._public = _public; - return this; - } - - /** - * Get _public - * @return _public - **/ - @javax.annotation.Nullable - public Boolean getPublic() { - return _public; - } - - - public void setPublic(Boolean _public) { - this._public = _public; - } - - - public VrfIpReservation management(Boolean management) { - - this.management = management; - return this; - } - - /** - * Get management - * @return management - **/ - @javax.annotation.Nullable - public Boolean getManagement() { - return management; - } - - - public void setManagement(Boolean management) { - this.management = management; - } - - - public VrfIpReservation manageable(Boolean manageable) { - - this.manageable = manageable; - return this; - } - - /** - * Get manageable - * @return manageable - **/ - @javax.annotation.Nullable - public Boolean getManageable() { - return manageable; - } - - - public void setManageable(Boolean manageable) { - this.manageable = manageable; - } - - - public VrfIpReservation customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public VrfIpReservation bill(Boolean bill) { - - this.bill = bill; - return this; - } - - /** - * Get bill - * @return bill - **/ - @javax.annotation.Nullable - public Boolean getBill() { - return bill; - } - - - public void setBill(Boolean bill) { - this.bill = bill; - } - - - public VrfIpReservation projectLite(Project projectLite) { - - this.projectLite = projectLite; - return this; - } - - /** - * Get projectLite - * @return projectLite - **/ - @javax.annotation.Nullable - public Project getProjectLite() { - return projectLite; - } - - - public void setProjectLite(Project projectLite) { - this.projectLite = projectLite; - } - - - public VrfIpReservation address(String address) { - - this.address = address; - return this; - } - - /** - * Get address - * @return address - **/ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - - public void setAddress(String address) { - this.address = address; - } - - - public VrfIpReservation gateway(String gateway) { - - this.gateway = gateway; - return this; - } - - /** - * Get gateway - * @return gateway - **/ - @javax.annotation.Nullable - public String getGateway() { - return gateway; - } - - - public void setGateway(String gateway) { - this.gateway = gateway; - } - - - public VrfIpReservation metro(Metro metro) { - - this.metro = metro; - return this; - } - - /** - * Get metro - * @return metro - **/ - @javax.annotation.Nullable - public Metro getMetro() { - return metro; - } - - - public void setMetro(Metro metro) { - this.metro = metro; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfIpReservation instance itself - */ - public VrfIpReservation putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfIpReservation vrfIpReservation = (VrfIpReservation) o; - return Objects.equals(this.addressFamily, vrfIpReservation.addressFamily) && - Objects.equals(this.cidr, vrfIpReservation.cidr) && - Objects.equals(this.createdAt, vrfIpReservation.createdAt) && - Objects.equals(this.createdBy, vrfIpReservation.createdBy) && - Objects.equals(this.details, vrfIpReservation.details) && - Objects.equals(this.href, vrfIpReservation.href) && - Objects.equals(this.id, vrfIpReservation.id) && - Objects.equals(this.metalGateway, vrfIpReservation.metalGateway) && - Objects.equals(this.netmask, vrfIpReservation.netmask) && - Objects.equals(this.network, vrfIpReservation.network) && - Objects.equals(this.project, vrfIpReservation.project) && - Objects.equals(this.state, vrfIpReservation.state) && - Objects.equals(this.tags, vrfIpReservation.tags) && - Objects.equals(this.type, vrfIpReservation.type) && - Objects.equals(this.vrf, vrfIpReservation.vrf) && - Objects.equals(this._public, vrfIpReservation._public) && - Objects.equals(this.management, vrfIpReservation.management) && - Objects.equals(this.manageable, vrfIpReservation.manageable) && - Objects.equals(this.customdata, vrfIpReservation.customdata) && - Objects.equals(this.bill, vrfIpReservation.bill) && - Objects.equals(this.projectLite, vrfIpReservation.projectLite) && - Objects.equals(this.address, vrfIpReservation.address) && - Objects.equals(this.gateway, vrfIpReservation.gateway) && - Objects.equals(this.metro, vrfIpReservation.metro)&& - Objects.equals(this.additionalProperties, vrfIpReservation.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(addressFamily, cidr, createdAt, createdBy, details, href, id, metalGateway, netmask, network, project, state, tags, type, vrf, _public, management, manageable, customdata, bill, projectLite, address, gateway, metro, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfIpReservation {\n"); - sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); - sb.append(" cidr: ").append(toIndentedString(cidr)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" metalGateway: ").append(toIndentedString(metalGateway)).append("\n"); - sb.append(" netmask: ").append(toIndentedString(netmask)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" vrf: ").append(toIndentedString(vrf)).append("\n"); - sb.append(" _public: ").append(toIndentedString(_public)).append("\n"); - sb.append(" management: ").append(toIndentedString(management)).append("\n"); - sb.append(" manageable: ").append(toIndentedString(manageable)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" bill: ").append(toIndentedString(bill)).append("\n"); - sb.append(" projectLite: ").append(toIndentedString(projectLite)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); - sb.append(" metro: ").append(toIndentedString(metro)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("address_family"); - openapiFields.add("cidr"); - openapiFields.add("created_at"); - openapiFields.add("created_by"); - openapiFields.add("details"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("metal_gateway"); - openapiFields.add("netmask"); - openapiFields.add("network"); - openapiFields.add("project"); - openapiFields.add("state"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("vrf"); - openapiFields.add("public"); - openapiFields.add("management"); - openapiFields.add("manageable"); - openapiFields.add("customdata"); - openapiFields.add("bill"); - openapiFields.add("project_lite"); - openapiFields.add("address"); - openapiFields.add("gateway"); - openapiFields.add("metro"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("vrf"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfIpReservation - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfIpReservation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfIpReservation is not found in the empty JSON string", VrfIpReservation.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfIpReservation.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `created_by` - if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("created_by")); - } - if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `metal_gateway` - if (jsonObj.get("metal_gateway") != null && !jsonObj.get("metal_gateway").isJsonNull()) { - MetalGatewayLite.validateJsonElement(jsonObj.get("metal_gateway")); - } - if ((jsonObj.get("netmask") != null && !jsonObj.get("netmask").isJsonNull()) && !jsonObj.get("netmask").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `netmask` to be a primitive type in the JSON string but got `%s`", jsonObj.get("netmask").toString())); - } - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Project.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the required field `type` - TypeEnum.validateJsonElement(jsonObj.get("type")); - // validate the required field `vrf` - Vrf.validateJsonElement(jsonObj.get("vrf")); - // validate the optional field `project_lite` - if (jsonObj.get("project_lite") != null && !jsonObj.get("project_lite").isJsonNull()) { - Project.validateJsonElement(jsonObj.get("project_lite")); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("gateway") != null && !jsonObj.get("gateway").isJsonNull()) && !jsonObj.get("gateway").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `gateway` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gateway").toString())); - } - // validate the optional field `metro` - if (jsonObj.get("metro") != null && !jsonObj.get("metro").isJsonNull()) { - Metro.validateJsonElement(jsonObj.get("metro")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfIpReservation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfIpReservation' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfIpReservation.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfIpReservation value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfIpReservation read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfIpReservation instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfIpReservation given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfIpReservation - * @throws IOException if the JSON string is invalid with respect to VrfIpReservation - */ - public static VrfIpReservation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfIpReservation.class); - } - - /** - * Convert an instance of VrfIpReservation to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationCreateInput.java deleted file mode 100644 index ab6dab6f3..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationCreateInput.java +++ /dev/null @@ -1,488 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfIpReservationCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfIpReservationCreateInput { - public static final String SERIALIZED_NAME_CIDR = "cidr"; - @SerializedName(SERIALIZED_NAME_CIDR) - private Integer cidr; - - public static final String SERIALIZED_NAME_CUSTOMDATA = "customdata"; - @SerializedName(SERIALIZED_NAME_CUSTOMDATA) - private Object customdata; - - public static final String SERIALIZED_NAME_DETAILS = "details"; - @SerializedName(SERIALIZED_NAME_DETAILS) - private String details; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private String network; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_VRF_ID = "vrf_id"; - @SerializedName(SERIALIZED_NAME_VRF_ID) - private UUID vrfId; - - public VrfIpReservationCreateInput() { - } - - public VrfIpReservationCreateInput cidr(Integer cidr) { - - this.cidr = cidr; - return this; - } - - /** - * The size of the VRF IP Reservation's subnet - * @return cidr - **/ - @javax.annotation.Nonnull - public Integer getCidr() { - return cidr; - } - - - public void setCidr(Integer cidr) { - this.cidr = cidr; - } - - - public VrfIpReservationCreateInput customdata(Object customdata) { - - this.customdata = customdata; - return this; - } - - /** - * Get customdata - * @return customdata - **/ - @javax.annotation.Nullable - public Object getCustomdata() { - return customdata; - } - - - public void setCustomdata(Object customdata) { - this.customdata = customdata; - } - - - public VrfIpReservationCreateInput details(String details) { - - this.details = details; - return this; - } - - /** - * Get details - * @return details - **/ - @javax.annotation.Nullable - public String getDetails() { - return details; - } - - - public void setDetails(String details) { - this.details = details; - } - - - public VrfIpReservationCreateInput network(String network) { - - this.network = network; - return this; - } - - /** - * The starting address for this VRF IP Reservation's subnet - * @return network - **/ - @javax.annotation.Nonnull - public String getNetwork() { - return network; - } - - - public void setNetwork(String network) { - this.network = network; - } - - - public VrfIpReservationCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfIpReservationCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VrfIpReservationCreateInput type(String type) { - - this.type = type; - return this; - } - - /** - * Must be set to 'vrf' - * @return type - **/ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public VrfIpReservationCreateInput vrfId(UUID vrfId) { - - this.vrfId = vrfId; - return this; - } - - /** - * The ID of the VRF in which this VRF IP Reservation is created. The VRF must have an existing IP Range that contains the requested subnet. This field may be aliased as just 'vrf'. - * @return vrfId - **/ - @javax.annotation.Nonnull - public UUID getVrfId() { - return vrfId; - } - - - public void setVrfId(UUID vrfId) { - this.vrfId = vrfId; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfIpReservationCreateInput instance itself - */ - public VrfIpReservationCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfIpReservationCreateInput vrfIpReservationCreateInput = (VrfIpReservationCreateInput) o; - return Objects.equals(this.cidr, vrfIpReservationCreateInput.cidr) && - Objects.equals(this.customdata, vrfIpReservationCreateInput.customdata) && - Objects.equals(this.details, vrfIpReservationCreateInput.details) && - Objects.equals(this.network, vrfIpReservationCreateInput.network) && - Objects.equals(this.tags, vrfIpReservationCreateInput.tags) && - Objects.equals(this.type, vrfIpReservationCreateInput.type) && - Objects.equals(this.vrfId, vrfIpReservationCreateInput.vrfId)&& - Objects.equals(this.additionalProperties, vrfIpReservationCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(cidr, customdata, details, network, tags, type, vrfId, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfIpReservationCreateInput {\n"); - sb.append(" cidr: ").append(toIndentedString(cidr)).append("\n"); - sb.append(" customdata: ").append(toIndentedString(customdata)).append("\n"); - sb.append(" details: ").append(toIndentedString(details)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" vrfId: ").append(toIndentedString(vrfId)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cidr"); - openapiFields.add("customdata"); - openapiFields.add("details"); - openapiFields.add("network"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("vrf_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("cidr"); - openapiRequiredFields.add("network"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("vrf_id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfIpReservationCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfIpReservationCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfIpReservationCreateInput is not found in the empty JSON string", VrfIpReservationCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfIpReservationCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString())); - } - if (!jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!jsonObj.get("vrf_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vrf_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vrf_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfIpReservationCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfIpReservationCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfIpReservationCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfIpReservationCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfIpReservationCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfIpReservationCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfIpReservationCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfIpReservationCreateInput - * @throws IOException if the JSON string is invalid with respect to VrfIpReservationCreateInput - */ - public static VrfIpReservationCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfIpReservationCreateInput.class); - } - - /** - * Convert an instance of VrfIpReservationCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationList.java deleted file mode 100644 index 6d200196f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfIpReservationList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfIpReservationList { - public static final String SERIALIZED_NAME_IP_ADDRESSES = "ip_addresses"; - @SerializedName(SERIALIZED_NAME_IP_ADDRESSES) - private List ipAddresses; - - public VrfIpReservationList() { - } - - public VrfIpReservationList ipAddresses(List ipAddresses) { - - this.ipAddresses = ipAddresses; - return this; - } - - public VrfIpReservationList addIpAddressesItem(VrfIpReservation ipAddressesItem) { - if (this.ipAddresses == null) { - this.ipAddresses = new ArrayList<>(); - } - this.ipAddresses.add(ipAddressesItem); - return this; - } - - /** - * Get ipAddresses - * @return ipAddresses - **/ - @javax.annotation.Nullable - public List getIpAddresses() { - return ipAddresses; - } - - - public void setIpAddresses(List ipAddresses) { - this.ipAddresses = ipAddresses; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfIpReservationList instance itself - */ - public VrfIpReservationList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfIpReservationList vrfIpReservationList = (VrfIpReservationList) o; - return Objects.equals(this.ipAddresses, vrfIpReservationList.ipAddresses)&& - Objects.equals(this.additionalProperties, vrfIpReservationList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(ipAddresses, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfIpReservationList {\n"); - sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ip_addresses"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfIpReservationList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfIpReservationList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfIpReservationList is not found in the empty JSON string", VrfIpReservationList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("ip_addresses") != null && !jsonObj.get("ip_addresses").isJsonNull()) { - JsonArray jsonArrayipAddresses = jsonObj.getAsJsonArray("ip_addresses"); - if (jsonArrayipAddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("ip_addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_addresses` to be an array in the JSON string but got `%s`", jsonObj.get("ip_addresses").toString())); - } - - // validate the optional field `ip_addresses` (array) - for (int i = 0; i < jsonArrayipAddresses.size(); i++) { - VrfIpReservation.validateJsonElement(jsonArrayipAddresses.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfIpReservationList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfIpReservationList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfIpReservationList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfIpReservationList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfIpReservationList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfIpReservationList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfIpReservationList given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfIpReservationList - * @throws IOException if the JSON string is invalid with respect to VrfIpReservationList - */ - public static VrfIpReservationList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfIpReservationList.class); - } - - /** - * Convert an instance of VrfIpReservationList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationOrHref.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationOrHref.java deleted file mode 100644 index bf3286b27..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfIpReservationOrHref.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.equinix.openapi.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfIpReservationOrHref extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(VrfIpReservationOrHref.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfIpReservationOrHref.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfIpReservationOrHref' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterVrfIpReservation = gson.getDelegateAdapter(this, TypeToken.get(VrfIpReservation.class)); - final TypeAdapter adapterHref = gson.getDelegateAdapter(this, TypeToken.get(Href.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfIpReservationOrHref value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `VrfIpReservation` - if (value.getActualInstance() instanceof VrfIpReservation) { - JsonElement element = adapterVrfIpReservation.toJsonTree((VrfIpReservation)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Href` - if (value.getActualInstance() instanceof Href) { - JsonElement element = adapterHref.toJsonTree((Href)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match anyOf schemae: Href, VrfIpReservation"); - } - - @Override - public VrfIpReservationOrHref read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize VrfIpReservation - try { - // validate the JSON object to see if any exception is thrown - VrfIpReservation.validateJsonElement(jsonElement); - actualAdapter = adapterVrfIpReservation; - VrfIpReservationOrHref ret = new VrfIpReservationOrHref(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for VrfIpReservation failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'VrfIpReservation'", e); - } - // deserialize Href - try { - // validate the JSON object to see if any exception is thrown - Href.validateJsonElement(jsonElement); - actualAdapter = adapterHref; - VrfIpReservationOrHref ret = new VrfIpReservationOrHref(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Href failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Href'", e); - } - - throw new IOException(String.format("Failed deserialization for VrfIpReservationOrHref: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in anyOf - public static final Map> schemas = new HashMap>(); - - public VrfIpReservationOrHref() { - super("anyOf", Boolean.FALSE); - } - - public VrfIpReservationOrHref(Href o) { - super("anyOf", Boolean.FALSE); - setActualInstance(o); - } - - public VrfIpReservationOrHref(VrfIpReservation o) { - super("anyOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("VrfIpReservation", VrfIpReservation.class); - schemas.put("Href", Href.class); - } - - @Override - public Map> getSchemas() { - return VrfIpReservationOrHref.schemas; - } - - /** - * Set the instance that matches the anyOf child schema, check - * the instance parameter is valid against the anyOf child schemas: - * Href, VrfIpReservation - * - * It could be an instance of the 'anyOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof VrfIpReservation) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Href) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Href, VrfIpReservation"); - } - - /** - * Get the actual instance, which can be the following: - * Href, VrfIpReservation - * - * @return The actual instance (Href, VrfIpReservation) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `VrfIpReservation`. If the actual instance is not `VrfIpReservation`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `VrfIpReservation` - * @throws ClassCastException if the instance is not `VrfIpReservation` - */ - public VrfIpReservation getVrfIpReservation() throws ClassCastException { - return (VrfIpReservation)super.getActualInstance(); - } - /** - * Get the actual instance of `Href`. If the actual instance is not `Href`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Href` - * @throws ClassCastException if the instance is not `Href` - */ - public Href getHref() throws ClassCastException { - return (Href)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfIpReservationOrHref - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate anyOf schemas one by one - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with VrfIpReservation - try { - VrfIpReservation.validateJsonElement(jsonElement); - return; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for VrfIpReservation failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Href - try { - Href.validateJsonElement(jsonElement); - return; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Href failed with `%s`.", e.getMessage())); - // continue to the next one - } - throw new IOException(String.format("The JSON string is invalid for VrfIpReservationOrHref with anyOf schemas: Href, VrfIpReservation. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); - - } - - /** - * Create an instance of VrfIpReservationOrHref given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfIpReservationOrHref - * @throws IOException if the JSON string is invalid with respect to VrfIpReservationOrHref - */ - public static VrfIpReservationOrHref fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfIpReservationOrHref.class); - } - - /** - * Convert an instance of VrfIpReservationOrHref to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java deleted file mode 100644 index ea428b4cb..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfList.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfList { - public static final String SERIALIZED_NAME_VRFS = "vrfs"; - @SerializedName(SERIALIZED_NAME_VRFS) - private List vrfs; - - public VrfList() { - } - - public VrfList vrfs(List vrfs) { - - this.vrfs = vrfs; - return this; - } - - public VrfList addVrfsItem(Vrf vrfsItem) { - if (this.vrfs == null) { - this.vrfs = new ArrayList<>(); - } - this.vrfs.add(vrfsItem); - return this; - } - - /** - * Get vrfs - * @return vrfs - **/ - @javax.annotation.Nullable - public List getVrfs() { - return vrfs; - } - - - public void setVrfs(List vrfs) { - this.vrfs = vrfs; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfList instance itself - */ - public VrfList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfList vrfList = (VrfList) o; - return Objects.equals(this.vrfs, vrfList.vrfs)&& - Objects.equals(this.additionalProperties, vrfList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(vrfs, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfList {\n"); - sb.append(" vrfs: ").append(toIndentedString(vrfs)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("vrfs"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfList is not found in the empty JSON string", VrfList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("vrfs") != null && !jsonObj.get("vrfs").isJsonNull()) { - JsonArray jsonArrayvrfs = jsonObj.getAsJsonArray("vrfs"); - if (jsonArrayvrfs != null) { - // ensure the json data is an array - if (!jsonObj.get("vrfs").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `vrfs` to be an array in the JSON string but got `%s`", jsonObj.get("vrfs").toString())); - } - - // validate the optional field `vrfs` (array) - for (int i = 0; i < jsonArrayvrfs.size(); i++) { - Vrf.validateJsonElement(jsonArrayvrfs.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfList given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfList - * @throws IOException if the JSON string is invalid with respect to VrfList - */ - public static VrfList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfList.class); - } - - /** - * Convert an instance of VrfList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGateway.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGateway.java deleted file mode 100644 index 6c58c533f..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGateway.java +++ /dev/null @@ -1,634 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservationOrHref; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfMetalGateway - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfMetalGateway { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_CREATED_BY = "created_by"; - @SerializedName(SERIALIZED_NAME_CREATED_BY) - private Href createdBy; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_IP_RESERVATION = "ip_reservation"; - @SerializedName(SERIALIZED_NAME_IP_RESERVATION) - private VrfIpReservationOrHref ipReservation; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Project project; - - /** - * The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. - */ - @JsonAdapter(StateEnum.Adapter.class) - public enum StateEnum { - READY("ready"), - - ACTIVE("active"), - - DELETING("deleting"); - - private String value; - - StateEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StateEnum fromValue(String value) { - for (StateEnum b : StateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StateEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StateEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StateEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private StateEnum state; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_VIRTUAL_NETWORK = "virtual_network"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORK) - private VirtualNetwork virtualNetwork; - - public static final String SERIALIZED_NAME_VRF = "vrf"; - @SerializedName(SERIALIZED_NAME_VRF) - private Vrf vrf; - - public VrfMetalGateway() { - } - - public VrfMetalGateway createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public VrfMetalGateway createdBy(Href createdBy) { - - this.createdBy = createdBy; - return this; - } - - /** - * Get createdBy - * @return createdBy - **/ - @javax.annotation.Nullable - public Href getCreatedBy() { - return createdBy; - } - - - public void setCreatedBy(Href createdBy) { - this.createdBy = createdBy; - } - - - public VrfMetalGateway href(String href) { - - this.href = href; - return this; - } - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - public void setHref(String href) { - this.href = href; - } - - - public VrfMetalGateway id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public VrfMetalGateway ipReservation(VrfIpReservationOrHref ipReservation) { - - this.ipReservation = ipReservation; - return this; - } - - /** - * Get ipReservation - * @return ipReservation - **/ - @javax.annotation.Nullable - public VrfIpReservationOrHref getIpReservation() { - return ipReservation; - } - - - public void setIpReservation(VrfIpReservationOrHref ipReservation) { - this.ipReservation = ipReservation; - } - - - public VrfMetalGateway project(Project project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Project getProject() { - return project; - } - - - public void setProject(Project project) { - this.project = project; - } - - - public VrfMetalGateway state(StateEnum state) { - - this.state = state; - return this; - } - - /** - * The current state of the Metal Gateway. 'Ready' indicates the gateway record has been configured, but is currently not active on the network. 'Active' indicates the gateway has been configured on the network. 'Deleting' is a temporary state used to indicate that the gateway is in the process of being un-configured from the network, after which the gateway record will be deleted. - * @return state - **/ - @javax.annotation.Nullable - public StateEnum getState() { - return state; - } - - - public void setState(StateEnum state) { - this.state = state; - } - - - public VrfMetalGateway updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public VrfMetalGateway virtualNetwork(VirtualNetwork virtualNetwork) { - - this.virtualNetwork = virtualNetwork; - return this; - } - - /** - * Get virtualNetwork - * @return virtualNetwork - **/ - @javax.annotation.Nullable - public VirtualNetwork getVirtualNetwork() { - return virtualNetwork; - } - - - public void setVirtualNetwork(VirtualNetwork virtualNetwork) { - this.virtualNetwork = virtualNetwork; - } - - - public VrfMetalGateway vrf(Vrf vrf) { - - this.vrf = vrf; - return this; - } - - /** - * Get vrf - * @return vrf - **/ - @javax.annotation.Nonnull - public Vrf getVrf() { - return vrf; - } - - - public void setVrf(Vrf vrf) { - this.vrf = vrf; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfMetalGateway instance itself - */ - public VrfMetalGateway putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfMetalGateway vrfMetalGateway = (VrfMetalGateway) o; - return Objects.equals(this.createdAt, vrfMetalGateway.createdAt) && - Objects.equals(this.createdBy, vrfMetalGateway.createdBy) && - Objects.equals(this.href, vrfMetalGateway.href) && - Objects.equals(this.id, vrfMetalGateway.id) && - Objects.equals(this.ipReservation, vrfMetalGateway.ipReservation) && - Objects.equals(this.project, vrfMetalGateway.project) && - Objects.equals(this.state, vrfMetalGateway.state) && - Objects.equals(this.updatedAt, vrfMetalGateway.updatedAt) && - Objects.equals(this.virtualNetwork, vrfMetalGateway.virtualNetwork) && - Objects.equals(this.vrf, vrfMetalGateway.vrf)&& - Objects.equals(this.additionalProperties, vrfMetalGateway.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, createdBy, href, id, ipReservation, project, state, updatedAt, virtualNetwork, vrf, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfMetalGateway {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" ipReservation: ").append(toIndentedString(ipReservation)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" virtualNetwork: ").append(toIndentedString(virtualNetwork)).append("\n"); - sb.append(" vrf: ").append(toIndentedString(vrf)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("created_at"); - openapiFields.add("created_by"); - openapiFields.add("href"); - openapiFields.add("id"); - openapiFields.add("ip_reservation"); - openapiFields.add("project"); - openapiFields.add("state"); - openapiFields.add("updated_at"); - openapiFields.add("virtual_network"); - openapiFields.add("vrf"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("vrf"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfMetalGateway - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfMetalGateway.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfMetalGateway is not found in the empty JSON string", VrfMetalGateway.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfMetalGateway.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `created_by` - if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("created_by")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - // validate the optional field `ip_reservation` - if (jsonObj.get("ip_reservation") != null && !jsonObj.get("ip_reservation").isJsonNull()) { - VrfIpReservationOrHref.validateJsonElement(jsonObj.get("ip_reservation")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Project.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - // validate the optional field `state` - if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { - StateEnum.validateJsonElement(jsonObj.get("state")); - } - // validate the optional field `virtual_network` - if (jsonObj.get("virtual_network") != null && !jsonObj.get("virtual_network").isJsonNull()) { - VirtualNetwork.validateJsonElement(jsonObj.get("virtual_network")); - } - // validate the required field `vrf` - Vrf.validateJsonElement(jsonObj.get("vrf")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfMetalGateway.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfMetalGateway' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfMetalGateway.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfMetalGateway value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfMetalGateway read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfMetalGateway instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfMetalGateway given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfMetalGateway - * @throws IOException if the JSON string is invalid with respect to VrfMetalGateway - */ - public static VrfMetalGateway fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfMetalGateway.class); - } - - /** - * Convert an instance of VrfMetalGateway to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java deleted file mode 100644 index 320035f53..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInput.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfMetalGatewayCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfMetalGatewayCreateInput { - public static final String SERIALIZED_NAME_IP_RESERVATION_ID = "ip_reservation_id"; - @SerializedName(SERIALIZED_NAME_IP_RESERVATION_ID) - private UUID ipReservationId; - - public static final String SERIALIZED_NAME_VIRTUAL_NETWORK_ID = "virtual_network_id"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORK_ID) - private UUID virtualNetworkId; - - public VrfMetalGatewayCreateInput() { - } - - public VrfMetalGatewayCreateInput ipReservationId(UUID ipReservationId) { - - this.ipReservationId = ipReservationId; - return this; - } - - /** - * The UUID an a VRF IP Reservation that belongs to the same project as the one in which the Metal Gateway is to be created. Additionally, the VRF IP Reservation and the Virtual Network must reside in the same Metro. - * @return ipReservationId - **/ - @javax.annotation.Nonnull - public UUID getIpReservationId() { - return ipReservationId; - } - - - public void setIpReservationId(UUID ipReservationId) { - this.ipReservationId = ipReservationId; - } - - - public VrfMetalGatewayCreateInput virtualNetworkId(UUID virtualNetworkId) { - - this.virtualNetworkId = virtualNetworkId; - return this; - } - - /** - * THe UUID of a Metro Virtual Network that belongs to the same project as the one in which the Metal Gateway is to be created. Additionally, the Virtual Network and the VRF IP Reservation must reside in the same metro. - * @return virtualNetworkId - **/ - @javax.annotation.Nonnull - public UUID getVirtualNetworkId() { - return virtualNetworkId; - } - - - public void setVirtualNetworkId(UUID virtualNetworkId) { - this.virtualNetworkId = virtualNetworkId; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfMetalGatewayCreateInput instance itself - */ - public VrfMetalGatewayCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfMetalGatewayCreateInput vrfMetalGatewayCreateInput = (VrfMetalGatewayCreateInput) o; - return Objects.equals(this.ipReservationId, vrfMetalGatewayCreateInput.ipReservationId) && - Objects.equals(this.virtualNetworkId, vrfMetalGatewayCreateInput.virtualNetworkId)&& - Objects.equals(this.additionalProperties, vrfMetalGatewayCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(ipReservationId, virtualNetworkId, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfMetalGatewayCreateInput {\n"); - sb.append(" ipReservationId: ").append(toIndentedString(ipReservationId)).append("\n"); - sb.append(" virtualNetworkId: ").append(toIndentedString(virtualNetworkId)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ip_reservation_id"); - openapiFields.add("virtual_network_id"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("ip_reservation_id"); - openapiRequiredFields.add("virtual_network_id"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfMetalGatewayCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfMetalGatewayCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfMetalGatewayCreateInput is not found in the empty JSON string", VrfMetalGatewayCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfMetalGatewayCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("ip_reservation_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_reservation_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip_reservation_id").toString())); - } - if (!jsonObj.get("virtual_network_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `virtual_network_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("virtual_network_id").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfMetalGatewayCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfMetalGatewayCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfMetalGatewayCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfMetalGatewayCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfMetalGatewayCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfMetalGatewayCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfMetalGatewayCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfMetalGatewayCreateInput - * @throws IOException if the JSON string is invalid with respect to VrfMetalGatewayCreateInput - */ - public static VrfMetalGatewayCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfMetalGatewayCreateInput.class); - } - - /** - * Convert an instance of VrfMetalGatewayCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRoute.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRoute.java deleted file mode 100644 index 0b229b1bf..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRoute.java +++ /dev/null @@ -1,717 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfMetalGateway; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfRoute - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfRoute { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - /** - * The status of the route. Potential values are \"pending\", \"active\", \"deleting\", and \"error\", representing various lifecycle states of the route and whether or not it has been successfully configured on the network - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("pending"), - - ACTIVE("active"), - - DELETING("deleting"), - - ERROR("error"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_PREFIX = "prefix"; - @SerializedName(SERIALIZED_NAME_PREFIX) - private String prefix; - - public static final String SERIALIZED_NAME_NEXT_HOP = "next_hop"; - @SerializedName(SERIALIZED_NAME_NEXT_HOP) - private String nextHop; - - /** - * VRF route type, like 'bgp', 'connected', and 'static'. Currently, only static routes are supported - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - STATIC("static"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_METAL_GATEWAY = "metal_gateway"; - @SerializedName(SERIALIZED_NAME_METAL_GATEWAY) - private VrfMetalGateway metalGateway; - - public static final String SERIALIZED_NAME_VIRTUAL_NETWORK = "virtual_network"; - @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORK) - private VirtualNetwork virtualNetwork; - - public static final String SERIALIZED_NAME_VRF = "vrf"; - @SerializedName(SERIALIZED_NAME_VRF) - private Vrf vrf; - - public static final String SERIALIZED_NAME_HREF = "href"; - @SerializedName(SERIALIZED_NAME_HREF) - private String href; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public VrfRoute() { - } - - - public VrfRoute( - UUID id, - StatusEnum status, - TypeEnum type, - OffsetDateTime createdAt, - OffsetDateTime updatedAt, - String href - ) { - this(); - this.id = id; - this.status = status; - this.type = type; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.href = href; - } - - /** - * The unique identifier for the newly-created resource - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - - - /** - * The status of the route. Potential values are \"pending\", \"active\", \"deleting\", and \"error\", representing various lifecycle states of the route and whether or not it has been successfully configured on the network - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - - - public VrfRoute prefix(String prefix) { - - this.prefix = prefix; - return this; - } - - /** - * The IPv4 prefix for the route, in CIDR-style notation - * @return prefix - **/ - @javax.annotation.Nullable - public String getPrefix() { - return prefix; - } - - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - - public VrfRoute nextHop(String nextHop) { - - this.nextHop = nextHop; - return this; - } - - /** - * The next-hop IPv4 address for the route - * @return nextHop - **/ - @javax.annotation.Nullable - public String getNextHop() { - return nextHop; - } - - - public void setNextHop(String nextHop) { - this.nextHop = nextHop; - } - - - /** - * VRF route type, like 'bgp', 'connected', and 'static'. Currently, only static routes are supported - * @return type - **/ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - - public VrfRoute metalGateway(VrfMetalGateway metalGateway) { - - this.metalGateway = metalGateway; - return this; - } - - /** - * Get metalGateway - * @return metalGateway - **/ - @javax.annotation.Nullable - public VrfMetalGateway getMetalGateway() { - return metalGateway; - } - - - public void setMetalGateway(VrfMetalGateway metalGateway) { - this.metalGateway = metalGateway; - } - - - public VrfRoute virtualNetwork(VirtualNetwork virtualNetwork) { - - this.virtualNetwork = virtualNetwork; - return this; - } - - /** - * Get virtualNetwork - * @return virtualNetwork - **/ - @javax.annotation.Nullable - public VirtualNetwork getVirtualNetwork() { - return virtualNetwork; - } - - - public void setVirtualNetwork(VirtualNetwork virtualNetwork) { - this.virtualNetwork = virtualNetwork; - } - - - public VrfRoute vrf(Vrf vrf) { - - this.vrf = vrf; - return this; - } - - /** - * Get vrf - * @return vrf - **/ - @javax.annotation.Nullable - public Vrf getVrf() { - return vrf; - } - - - public void setVrf(Vrf vrf) { - this.vrf = vrf; - } - - - /** - * Get href - * @return href - **/ - @javax.annotation.Nullable - public String getHref() { - return href; - } - - - - - public VrfRoute tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfRoute addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfRoute instance itself - */ - public VrfRoute putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfRoute vrfRoute = (VrfRoute) o; - return Objects.equals(this.id, vrfRoute.id) && - Objects.equals(this.status, vrfRoute.status) && - Objects.equals(this.prefix, vrfRoute.prefix) && - Objects.equals(this.nextHop, vrfRoute.nextHop) && - Objects.equals(this.type, vrfRoute.type) && - Objects.equals(this.createdAt, vrfRoute.createdAt) && - Objects.equals(this.updatedAt, vrfRoute.updatedAt) && - Objects.equals(this.metalGateway, vrfRoute.metalGateway) && - Objects.equals(this.virtualNetwork, vrfRoute.virtualNetwork) && - Objects.equals(this.vrf, vrfRoute.vrf) && - Objects.equals(this.href, vrfRoute.href) && - Objects.equals(this.tags, vrfRoute.tags)&& - Objects.equals(this.additionalProperties, vrfRoute.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, status, prefix, nextHop, type, createdAt, updatedAt, metalGateway, virtualNetwork, vrf, href, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfRoute {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); - sb.append(" nextHop: ").append(toIndentedString(nextHop)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" metalGateway: ").append(toIndentedString(metalGateway)).append("\n"); - sb.append(" virtualNetwork: ").append(toIndentedString(virtualNetwork)).append("\n"); - sb.append(" vrf: ").append(toIndentedString(vrf)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("status"); - openapiFields.add("prefix"); - openapiFields.add("next_hop"); - openapiFields.add("type"); - openapiFields.add("created_at"); - openapiFields.add("updated_at"); - openapiFields.add("metal_gateway"); - openapiFields.add("virtual_network"); - openapiFields.add("vrf"); - openapiFields.add("href"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfRoute - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfRoute.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfRoute is not found in the empty JSON string", VrfRoute.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - if ((jsonObj.get("prefix") != null && !jsonObj.get("prefix").isJsonNull()) && !jsonObj.get("prefix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); - } - if ((jsonObj.get("next_hop") != null && !jsonObj.get("next_hop").isJsonNull()) && !jsonObj.get("next_hop").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `next_hop` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next_hop").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `metal_gateway` - if (jsonObj.get("metal_gateway") != null && !jsonObj.get("metal_gateway").isJsonNull()) { - VrfMetalGateway.validateJsonElement(jsonObj.get("metal_gateway")); - } - // validate the optional field `virtual_network` - if (jsonObj.get("virtual_network") != null && !jsonObj.get("virtual_network").isJsonNull()) { - VirtualNetwork.validateJsonElement(jsonObj.get("virtual_network")); - } - // validate the optional field `vrf` - if (jsonObj.get("vrf") != null && !jsonObj.get("vrf").isJsonNull()) { - Vrf.validateJsonElement(jsonObj.get("vrf")); - } - if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfRoute.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfRoute' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfRoute.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfRoute value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfRoute read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfRoute instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfRoute given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfRoute - * @throws IOException if the JSON string is invalid with respect to VrfRoute - */ - public static VrfRoute fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfRoute.class); - } - - /** - * Convert an instance of VrfRoute to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteCreateInput.java deleted file mode 100644 index e43ac1e10..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteCreateInput.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfRouteCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfRouteCreateInput { - public static final String SERIALIZED_NAME_PREFIX = "prefix"; - @SerializedName(SERIALIZED_NAME_PREFIX) - private String prefix; - - public static final String SERIALIZED_NAME_NEXT_HOP = "next_hop"; - @SerializedName(SERIALIZED_NAME_NEXT_HOP) - private String nextHop; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public VrfRouteCreateInput() { - } - - public VrfRouteCreateInput prefix(String prefix) { - - this.prefix = prefix; - return this; - } - - /** - * The IPv4 prefix for the route, in CIDR-style notation. For a static default route, this will always be \"0.0.0.0/0\" - * @return prefix - **/ - @javax.annotation.Nonnull - public String getPrefix() { - return prefix; - } - - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - - public VrfRouteCreateInput nextHop(String nextHop) { - - this.nextHop = nextHop; - return this; - } - - /** - * The IPv4 address within the VRF of the host that will handle this route - * @return nextHop - **/ - @javax.annotation.Nonnull - public String getNextHop() { - return nextHop; - } - - - public void setNextHop(String nextHop) { - this.nextHop = nextHop; - } - - - public VrfRouteCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfRouteCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfRouteCreateInput instance itself - */ - public VrfRouteCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfRouteCreateInput vrfRouteCreateInput = (VrfRouteCreateInput) o; - return Objects.equals(this.prefix, vrfRouteCreateInput.prefix) && - Objects.equals(this.nextHop, vrfRouteCreateInput.nextHop) && - Objects.equals(this.tags, vrfRouteCreateInput.tags)&& - Objects.equals(this.additionalProperties, vrfRouteCreateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(prefix, nextHop, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfRouteCreateInput {\n"); - sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); - sb.append(" nextHop: ").append(toIndentedString(nextHop)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("prefix"); - openapiFields.add("next_hop"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("prefix"); - openapiRequiredFields.add("next_hop"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfRouteCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfRouteCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfRouteCreateInput is not found in the empty JSON string", VrfRouteCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfRouteCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("prefix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); - } - if (!jsonObj.get("next_hop").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `next_hop` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next_hop").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfRouteCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfRouteCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfRouteCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfRouteCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfRouteCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfRouteCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfRouteCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfRouteCreateInput - * @throws IOException if the JSON string is invalid with respect to VrfRouteCreateInput - */ - public static VrfRouteCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfRouteCreateInput.class); - } - - /** - * Convert an instance of VrfRouteCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteList.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteList.java deleted file mode 100644 index 7c08eabff..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteList.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.VrfRoute; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfRouteList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfRouteList { - public static final String SERIALIZED_NAME_ROUTES = "routes"; - @SerializedName(SERIALIZED_NAME_ROUTES) - private List routes; - - public static final String SERIALIZED_NAME_META = "meta"; - @SerializedName(SERIALIZED_NAME_META) - private Meta meta; - - public VrfRouteList() { - } - - public VrfRouteList routes(List routes) { - - this.routes = routes; - return this; - } - - public VrfRouteList addRoutesItem(VrfRoute routesItem) { - if (this.routes == null) { - this.routes = new ArrayList<>(); - } - this.routes.add(routesItem); - return this; - } - - /** - * Get routes - * @return routes - **/ - @javax.annotation.Nullable - public List getRoutes() { - return routes; - } - - - public void setRoutes(List routes) { - this.routes = routes; - } - - - public VrfRouteList meta(Meta meta) { - - this.meta = meta; - return this; - } - - /** - * Get meta - * @return meta - **/ - @javax.annotation.Nullable - public Meta getMeta() { - return meta; - } - - - public void setMeta(Meta meta) { - this.meta = meta; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfRouteList instance itself - */ - public VrfRouteList putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfRouteList vrfRouteList = (VrfRouteList) o; - return Objects.equals(this.routes, vrfRouteList.routes) && - Objects.equals(this.meta, vrfRouteList.meta)&& - Objects.equals(this.additionalProperties, vrfRouteList.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(routes, meta, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfRouteList {\n"); - sb.append(" routes: ").append(toIndentedString(routes)).append("\n"); - sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("routes"); - openapiFields.add("meta"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfRouteList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfRouteList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfRouteList is not found in the empty JSON string", VrfRouteList.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("routes") != null && !jsonObj.get("routes").isJsonNull()) { - JsonArray jsonArrayroutes = jsonObj.getAsJsonArray("routes"); - if (jsonArrayroutes != null) { - // ensure the json data is an array - if (!jsonObj.get("routes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `routes` to be an array in the JSON string but got `%s`", jsonObj.get("routes").toString())); - } - - // validate the optional field `routes` (array) - for (int i = 0; i < jsonArrayroutes.size(); i++) { - VrfRoute.validateJsonElement(jsonArrayroutes.get(i)); - }; - } - } - // validate the optional field `meta` - if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { - Meta.validateJsonElement(jsonObj.get("meta")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfRouteList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfRouteList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfRouteList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfRouteList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfRouteList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfRouteList instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfRouteList given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfRouteList - * @throws IOException if the JSON string is invalid with respect to VrfRouteList - */ - public static VrfRouteList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfRouteList.class); - } - - /** - * Convert an instance of VrfRouteList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteUpdateInput.java deleted file mode 100644 index 327ecbe79..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfRouteUpdateInput.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfRouteUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfRouteUpdateInput { - public static final String SERIALIZED_NAME_PREFIX = "prefix"; - @SerializedName(SERIALIZED_NAME_PREFIX) - private String prefix; - - public static final String SERIALIZED_NAME_NEXT_HOP = "next_hop"; - @SerializedName(SERIALIZED_NAME_NEXT_HOP) - private String nextHop; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public VrfRouteUpdateInput() { - } - - public VrfRouteUpdateInput prefix(String prefix) { - - this.prefix = prefix; - return this; - } - - /** - * The IPv4 prefix for the route, in CIDR-style notation. For a static default route, this will always be \"0.0.0.0/0\" - * @return prefix - **/ - @javax.annotation.Nullable - public String getPrefix() { - return prefix; - } - - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - - public VrfRouteUpdateInput nextHop(String nextHop) { - - this.nextHop = nextHop; - return this; - } - - /** - * The IPv4 address within the VRF of the host that will handle this route - * @return nextHop - **/ - @javax.annotation.Nullable - public String getNextHop() { - return nextHop; - } - - - public void setNextHop(String nextHop) { - this.nextHop = nextHop; - } - - - public VrfRouteUpdateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfRouteUpdateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfRouteUpdateInput instance itself - */ - public VrfRouteUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfRouteUpdateInput vrfRouteUpdateInput = (VrfRouteUpdateInput) o; - return Objects.equals(this.prefix, vrfRouteUpdateInput.prefix) && - Objects.equals(this.nextHop, vrfRouteUpdateInput.nextHop) && - Objects.equals(this.tags, vrfRouteUpdateInput.tags)&& - Objects.equals(this.additionalProperties, vrfRouteUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(prefix, nextHop, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfRouteUpdateInput {\n"); - sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); - sb.append(" nextHop: ").append(toIndentedString(nextHop)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("prefix"); - openapiFields.add("next_hop"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfRouteUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfRouteUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfRouteUpdateInput is not found in the empty JSON string", VrfRouteUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("prefix") != null && !jsonObj.get("prefix").isJsonNull()) && !jsonObj.get("prefix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); - } - if ((jsonObj.get("next_hop") != null && !jsonObj.get("next_hop").isJsonNull()) && !jsonObj.get("next_hop").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `next_hop` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next_hop").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfRouteUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfRouteUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfRouteUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfRouteUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfRouteUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfRouteUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfRouteUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfRouteUpdateInput - * @throws IOException if the JSON string is invalid with respect to VrfRouteUpdateInput - */ - public static VrfRouteUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfRouteUpdateInput.class); - } - - /** - * Convert an instance of VrfRouteUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java deleted file mode 100644 index 699aaa837..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfUpdateInput.java +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfUpdateInput { - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_ENABLED = "bgp_dynamic_neighbors_enabled"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_ENABLED) - private Boolean bgpDynamicNeighborsEnabled; - - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_EXPORT_ROUTE_MAP = "bgp_dynamic_neighbors_export_route_map"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_EXPORT_ROUTE_MAP) - private Boolean bgpDynamicNeighborsExportRouteMap; - - public static final String SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_BFD_ENABLED = "bgp_dynamic_neighbors_bfd_enabled"; - @SerializedName(SERIALIZED_NAME_BGP_DYNAMIC_NEIGHBORS_BFD_ENABLED) - private Boolean bgpDynamicNeighborsBfdEnabled; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_IP_RANGES = "ip_ranges"; - @SerializedName(SERIALIZED_NAME_IP_RANGES) - private List ipRanges; - - public static final String SERIALIZED_NAME_LOCAL_ASN = "local_asn"; - @SerializedName(SERIALIZED_NAME_LOCAL_ASN) - private Integer localAsn; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public VrfUpdateInput() { - } - - public VrfUpdateInput bgpDynamicNeighborsEnabled(Boolean bgpDynamicNeighborsEnabled) { - - this.bgpDynamicNeighborsEnabled = bgpDynamicNeighborsEnabled; - return this; - } - - /** - * Toggle to enable the dynamic bgp neighbors feature on the VRF - * @return bgpDynamicNeighborsEnabled - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsEnabled() { - return bgpDynamicNeighborsEnabled; - } - - - public void setBgpDynamicNeighborsEnabled(Boolean bgpDynamicNeighborsEnabled) { - this.bgpDynamicNeighborsEnabled = bgpDynamicNeighborsEnabled; - } - - - public VrfUpdateInput bgpDynamicNeighborsExportRouteMap(Boolean bgpDynamicNeighborsExportRouteMap) { - - this.bgpDynamicNeighborsExportRouteMap = bgpDynamicNeighborsExportRouteMap; - return this; - } - - /** - * Toggle to export the VRF route-map to the dynamic bgp neighbors - * @return bgpDynamicNeighborsExportRouteMap - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsExportRouteMap() { - return bgpDynamicNeighborsExportRouteMap; - } - - - public void setBgpDynamicNeighborsExportRouteMap(Boolean bgpDynamicNeighborsExportRouteMap) { - this.bgpDynamicNeighborsExportRouteMap = bgpDynamicNeighborsExportRouteMap; - } - - - public VrfUpdateInput bgpDynamicNeighborsBfdEnabled(Boolean bgpDynamicNeighborsBfdEnabled) { - - this.bgpDynamicNeighborsBfdEnabled = bgpDynamicNeighborsBfdEnabled; - return this; - } - - /** - * Toggle BFD on dynamic bgp neighbors sessions - * @return bgpDynamicNeighborsBfdEnabled - **/ - @javax.annotation.Nullable - public Boolean getBgpDynamicNeighborsBfdEnabled() { - return bgpDynamicNeighborsBfdEnabled; - } - - - public void setBgpDynamicNeighborsBfdEnabled(Boolean bgpDynamicNeighborsBfdEnabled) { - this.bgpDynamicNeighborsBfdEnabled = bgpDynamicNeighborsBfdEnabled; - } - - - public VrfUpdateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VrfUpdateInput ipRanges(List ipRanges) { - - this.ipRanges = ipRanges; - return this; - } - - public VrfUpdateInput addIpRangesItem(String ipRangesItem) { - if (this.ipRanges == null) { - this.ipRanges = new ArrayList<>(); - } - this.ipRanges.add(ipRangesItem); - return this; - } - - /** - * A list of CIDR network addresses. Like [\"10.0.0.0/16\", \"2001:d78::/56\"]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64. A VRF\\'s IP ranges must be defined in order to create VRF IP Reservations, which can then be used for Metal Gateways or Virtual Circuits. Adding a new CIDR address to the list will result in the creation of a new IP Range for this VRF. Removal of an existing CIDR address from the list will result in the deletion of an existing IP Range for this VRF. Deleting an IP Range will result in the deletion of any VRF IP Reservations contained within the IP Range, as well as the VRF IP Reservation\\'s associated Metal Gateways or Virtual Circuits. If you do not wish to add or remove IP Ranges, either include the full existing list of IP Ranges in the update request, or do not specify the `ip_ranges` field in the update request. Specifying a value of `[]` will remove all existing IP Ranges from the VRF. - * @return ipRanges - **/ - @javax.annotation.Nullable - public List getIpRanges() { - return ipRanges; - } - - - public void setIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - } - - - public VrfUpdateInput localAsn(Integer localAsn) { - - this.localAsn = localAsn; - return this; - } - - /** - * The new `local_asn` value for the VRF. This field cannot be updated when there are active Interconnection Virtual Circuits associated to the VRF, or if any of the VLANs of the VRF's metal gateway has been assigned on an instance. - * @return localAsn - **/ - @javax.annotation.Nullable - public Integer getLocalAsn() { - return localAsn; - } - - - public void setLocalAsn(Integer localAsn) { - this.localAsn = localAsn; - } - - - public VrfUpdateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VrfUpdateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfUpdateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfUpdateInput instance itself - */ - public VrfUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfUpdateInput vrfUpdateInput = (VrfUpdateInput) o; - return Objects.equals(this.bgpDynamicNeighborsEnabled, vrfUpdateInput.bgpDynamicNeighborsEnabled) && - Objects.equals(this.bgpDynamicNeighborsExportRouteMap, vrfUpdateInput.bgpDynamicNeighborsExportRouteMap) && - Objects.equals(this.bgpDynamicNeighborsBfdEnabled, vrfUpdateInput.bgpDynamicNeighborsBfdEnabled) && - Objects.equals(this.description, vrfUpdateInput.description) && - Objects.equals(this.ipRanges, vrfUpdateInput.ipRanges) && - Objects.equals(this.localAsn, vrfUpdateInput.localAsn) && - Objects.equals(this.name, vrfUpdateInput.name) && - Objects.equals(this.tags, vrfUpdateInput.tags)&& - Objects.equals(this.additionalProperties, vrfUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(bgpDynamicNeighborsEnabled, bgpDynamicNeighborsExportRouteMap, bgpDynamicNeighborsBfdEnabled, description, ipRanges, localAsn, name, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfUpdateInput {\n"); - sb.append(" bgpDynamicNeighborsEnabled: ").append(toIndentedString(bgpDynamicNeighborsEnabled)).append("\n"); - sb.append(" bgpDynamicNeighborsExportRouteMap: ").append(toIndentedString(bgpDynamicNeighborsExportRouteMap)).append("\n"); - sb.append(" bgpDynamicNeighborsBfdEnabled: ").append(toIndentedString(bgpDynamicNeighborsBfdEnabled)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" ipRanges: ").append(toIndentedString(ipRanges)).append("\n"); - sb.append(" localAsn: ").append(toIndentedString(localAsn)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("bgp_dynamic_neighbors_enabled"); - openapiFields.add("bgp_dynamic_neighbors_export_route_map"); - openapiFields.add("bgp_dynamic_neighbors_bfd_enabled"); - openapiFields.add("description"); - openapiFields.add("ip_ranges"); - openapiFields.add("local_asn"); - openapiFields.add("name"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfUpdateInput is not found in the empty JSON string", VrfUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("ip_ranges") != null && !jsonObj.get("ip_ranges").isJsonNull() && !jsonObj.get("ip_ranges").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ip_ranges` to be an array in the JSON string but got `%s`", jsonObj.get("ip_ranges").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfUpdateInput - * @throws IOException if the JSON string is invalid with respect to VrfUpdateInput - */ - public static VrfUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfUpdateInput.class); - } - - /** - * Convert an instance of VrfUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java deleted file mode 100644 index 870722f27..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java +++ /dev/null @@ -1,899 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuitType; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfVirtualCircuit - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfVirtualCircuit { - public static final String SERIALIZED_NAME_CUSTOMER_IP = "customer_ip"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_IP) - private String customerIp; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private UUID id; - - public static final String SERIALIZED_NAME_MD5 = "md5"; - @SerializedName(SERIALIZED_NAME_MD5) - private String md5; - - public static final String SERIALIZED_NAME_METAL_IP = "metal_ip"; - @SerializedName(SERIALIZED_NAME_METAL_IP) - private String metalIp; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PORT = "port"; - @SerializedName(SERIALIZED_NAME_PORT) - private Href port; - - public static final String SERIALIZED_NAME_NNI_VLAN = "nni_vlan"; - @SerializedName(SERIALIZED_NAME_NNI_VLAN) - private Integer nniVlan; - - public static final String SERIALIZED_NAME_PEER_ASN = "peer_asn"; - @SerializedName(SERIALIZED_NAME_PEER_ASN) - private Integer peerAsn; - - public static final String SERIALIZED_NAME_PROJECT = "project"; - @SerializedName(SERIALIZED_NAME_PROJECT) - private Href project; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - /** - * The status changes of a VRF virtual circuit are generally the same as Virtual Circuits that aren't in a VRF. However, for VRF Virtual Circuits on Fabric VCs, the status will change to 'waiting_on_peering_details' once the Fabric service token associated with the virtual circuit has been redeemed on Fabric, and Metal has found the associated Fabric connection. At this point, users can update the subnet, MD5 password, customer IP and/or metal IP accordingly. For VRF Virtual Circuits on Dedicated Ports, we require all peering details to be set on creation of a VRF Virtual Circuit. The status will change to `changing_peering_details` whenever an active VRF Virtual Circuit has any of its peering details updated. - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("pending"), - - WAITING_ON_PEERING_DETAILS("waiting_on_peering_details"), - - ACTIVATING("activating"), - - CHANGING_PEERING_DETAILS("changing_peering_details"), - - DEACTIVATING("deactivating"), - - DELETING("deleting"), - - ACTIVE("active"), - - EXPIRED("expired"), - - ACTIVATION_FAILED("activation_failed"), - - CHANGING_PEERING_DETAILS_FAILED("changing_peering_details_failed"), - - DEACTIVATION_FAILED("deactivation_failed"), - - DELETE_FAILED("delete_failed"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_SUBNET = "subnet"; - @SerializedName(SERIALIZED_NAME_SUBNET) - private String subnet; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private VrfVirtualCircuitType type; - - public static final String SERIALIZED_NAME_VRF = "vrf"; - @SerializedName(SERIALIZED_NAME_VRF) - private Vrf vrf; - - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public VrfVirtualCircuit() { - } - - public VrfVirtualCircuit customerIp(String customerIp) { - - this.customerIp = customerIp; - return this; - } - - /** - * An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. - * @return customerIp - **/ - @javax.annotation.Nullable - public String getCustomerIp() { - return customerIp; - } - - - public void setCustomerIp(String customerIp) { - this.customerIp = customerIp; - } - - - public VrfVirtualCircuit description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VrfVirtualCircuit id(UUID id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public UUID getId() { - return id; - } - - - public void setId(UUID id) { - this.id = id; - } - - - public VrfVirtualCircuit md5(String md5) { - - this.md5 = md5; - return this; - } - - /** - * The MD5 password for the BGP peering in plaintext (not a checksum). - * @return md5 - **/ - @javax.annotation.Nullable - public String getMd5() { - return md5; - } - - - public void setMd5(String md5) { - this.md5 = md5; - } - - - public VrfVirtualCircuit metalIp(String metalIp) { - - this.metalIp = metalIp; - return this; - } - - /** - * An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. - * @return metalIp - **/ - @javax.annotation.Nullable - public String getMetalIp() { - return metalIp; - } - - - public void setMetalIp(String metalIp) { - this.metalIp = metalIp; - } - - - public VrfVirtualCircuit name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VrfVirtualCircuit port(Href port) { - - this.port = port; - return this; - } - - /** - * Get port - * @return port - **/ - @javax.annotation.Nullable - public Href getPort() { - return port; - } - - - public void setPort(Href port) { - this.port = port; - } - - - public VrfVirtualCircuit nniVlan(Integer nniVlan) { - - this.nniVlan = nniVlan; - return this; - } - - /** - * Get nniVlan - * @return nniVlan - **/ - @javax.annotation.Nullable - public Integer getNniVlan() { - return nniVlan; - } - - - public void setNniVlan(Integer nniVlan) { - this.nniVlan = nniVlan; - } - - - public VrfVirtualCircuit peerAsn(Integer peerAsn) { - - this.peerAsn = peerAsn; - return this; - } - - /** - * The peer ASN that will be used with the VRF on the Virtual Circuit. - * @return peerAsn - **/ - @javax.annotation.Nullable - public Integer getPeerAsn() { - return peerAsn; - } - - - public void setPeerAsn(Integer peerAsn) { - this.peerAsn = peerAsn; - } - - - public VrfVirtualCircuit project(Href project) { - - this.project = project; - return this; - } - - /** - * Get project - * @return project - **/ - @javax.annotation.Nullable - public Href getProject() { - return project; - } - - - public void setProject(Href project) { - this.project = project; - } - - - public VrfVirtualCircuit speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * integer representing bps speed - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public VrfVirtualCircuit status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * The status changes of a VRF virtual circuit are generally the same as Virtual Circuits that aren't in a VRF. However, for VRF Virtual Circuits on Fabric VCs, the status will change to 'waiting_on_peering_details' once the Fabric service token associated with the virtual circuit has been redeemed on Fabric, and Metal has found the associated Fabric connection. At this point, users can update the subnet, MD5 password, customer IP and/or metal IP accordingly. For VRF Virtual Circuits on Dedicated Ports, we require all peering details to be set on creation of a VRF Virtual Circuit. The status will change to `changing_peering_details` whenever an active VRF Virtual Circuit has any of its peering details updated. - * @return status - **/ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public VrfVirtualCircuit subnet(String subnet) { - - this.subnet = subnet; - return this; - } - - /** - * The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. - * @return subnet - **/ - @javax.annotation.Nullable - public String getSubnet() { - return subnet; - } - - - public void setSubnet(String subnet) { - this.subnet = subnet; - } - - - public VrfVirtualCircuit tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfVirtualCircuit addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VrfVirtualCircuit type(VrfVirtualCircuitType type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - public VrfVirtualCircuitType getType() { - return type; - } - - - public void setType(VrfVirtualCircuitType type) { - this.type = type; - } - - - public VrfVirtualCircuit vrf(Vrf vrf) { - - this.vrf = vrf; - return this; - } - - /** - * Get vrf - * @return vrf - **/ - @javax.annotation.Nonnull - public Vrf getVrf() { - return vrf; - } - - - public void setVrf(Vrf vrf) { - this.vrf = vrf; - } - - - public VrfVirtualCircuit createdAt(OffsetDateTime createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public VrfVirtualCircuit updatedAt(OffsetDateTime updatedAt) { - - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - **/ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfVirtualCircuit instance itself - */ - public VrfVirtualCircuit putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfVirtualCircuit vrfVirtualCircuit = (VrfVirtualCircuit) o; - return Objects.equals(this.customerIp, vrfVirtualCircuit.customerIp) && - Objects.equals(this.description, vrfVirtualCircuit.description) && - Objects.equals(this.id, vrfVirtualCircuit.id) && - Objects.equals(this.md5, vrfVirtualCircuit.md5) && - Objects.equals(this.metalIp, vrfVirtualCircuit.metalIp) && - Objects.equals(this.name, vrfVirtualCircuit.name) && - Objects.equals(this.port, vrfVirtualCircuit.port) && - Objects.equals(this.nniVlan, vrfVirtualCircuit.nniVlan) && - Objects.equals(this.peerAsn, vrfVirtualCircuit.peerAsn) && - Objects.equals(this.project, vrfVirtualCircuit.project) && - Objects.equals(this.speed, vrfVirtualCircuit.speed) && - Objects.equals(this.status, vrfVirtualCircuit.status) && - Objects.equals(this.subnet, vrfVirtualCircuit.subnet) && - Objects.equals(this.tags, vrfVirtualCircuit.tags) && - Objects.equals(this.type, vrfVirtualCircuit.type) && - Objects.equals(this.vrf, vrfVirtualCircuit.vrf) && - Objects.equals(this.createdAt, vrfVirtualCircuit.createdAt) && - Objects.equals(this.updatedAt, vrfVirtualCircuit.updatedAt)&& - Objects.equals(this.additionalProperties, vrfVirtualCircuit.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(customerIp, description, id, md5, metalIp, name, port, nniVlan, peerAsn, project, speed, status, subnet, tags, type, vrf, createdAt, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfVirtualCircuit {\n"); - sb.append(" customerIp: ").append(toIndentedString(customerIp)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" md5: ").append(toIndentedString(md5)).append("\n"); - sb.append(" metalIp: ").append(toIndentedString(metalIp)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" port: ").append(toIndentedString(port)).append("\n"); - sb.append(" nniVlan: ").append(toIndentedString(nniVlan)).append("\n"); - sb.append(" peerAsn: ").append(toIndentedString(peerAsn)).append("\n"); - sb.append(" project: ").append(toIndentedString(project)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" subnet: ").append(toIndentedString(subnet)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" vrf: ").append(toIndentedString(vrf)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer_ip"); - openapiFields.add("description"); - openapiFields.add("id"); - openapiFields.add("md5"); - openapiFields.add("metal_ip"); - openapiFields.add("name"); - openapiFields.add("port"); - openapiFields.add("nni_vlan"); - openapiFields.add("peer_asn"); - openapiFields.add("project"); - openapiFields.add("speed"); - openapiFields.add("status"); - openapiFields.add("subnet"); - openapiFields.add("tags"); - openapiFields.add("type"); - openapiFields.add("vrf"); - openapiFields.add("created_at"); - openapiFields.add("updated_at"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("vrf"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfVirtualCircuit - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfVirtualCircuit.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfVirtualCircuit is not found in the empty JSON string", VrfVirtualCircuit.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfVirtualCircuit.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("customer_ip") != null && !jsonObj.get("customer_ip").isJsonNull()) && !jsonObj.get("customer_ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customer_ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_ip").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("md5") != null && !jsonObj.get("md5").isJsonNull()) && !jsonObj.get("md5").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `md5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5").toString())); - } - if ((jsonObj.get("metal_ip") != null && !jsonObj.get("metal_ip").isJsonNull()) && !jsonObj.get("metal_ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metal_ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metal_ip").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `port` - if (jsonObj.get("port") != null && !jsonObj.get("port").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("port")); - } - // validate the optional field `project` - if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { - Href.validateJsonElement(jsonObj.get("project")); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - if ((jsonObj.get("subnet") != null && !jsonObj.get("subnet").isJsonNull()) && !jsonObj.get("subnet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subnet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subnet").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - VrfVirtualCircuitType.validateJsonElement(jsonObj.get("type")); - } - // validate the required field `vrf` - Vrf.validateJsonElement(jsonObj.get("vrf")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfVirtualCircuit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfVirtualCircuit' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfVirtualCircuit.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfVirtualCircuit value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfVirtualCircuit read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfVirtualCircuit instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfVirtualCircuit given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfVirtualCircuit - * @throws IOException if the JSON string is invalid with respect to VrfVirtualCircuit - */ - public static VrfVirtualCircuit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfVirtualCircuit.class); - } - - /** - * Convert an instance of VrfVirtualCircuit to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java deleted file mode 100644 index bc2ed6ba7..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInput.java +++ /dev/null @@ -1,655 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfVirtualCircuitCreateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfVirtualCircuitCreateInput { - public static final String SERIALIZED_NAME_CUSTOMER_IP = "customer_ip"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_IP) - private String customerIp; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_MD5 = "md5"; - @SerializedName(SERIALIZED_NAME_MD5) - private String md5; - - public static final String SERIALIZED_NAME_METAL_IP = "metal_ip"; - @SerializedName(SERIALIZED_NAME_METAL_IP) - private String metalIp; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NNI_VLAN = "nni_vlan"; - @SerializedName(SERIALIZED_NAME_NNI_VLAN) - private Integer nniVlan; - - public static final String SERIALIZED_NAME_PEER_ASN = "peer_asn"; - @SerializedName(SERIALIZED_NAME_PEER_ASN) - private Integer peerAsn; - - public static final String SERIALIZED_NAME_PROJECT_ID = "project_id"; - @SerializedName(SERIALIZED_NAME_PROJECT_ID) - private UUID projectId; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private Integer speed; - - public static final String SERIALIZED_NAME_SUBNET = "subnet"; - @SerializedName(SERIALIZED_NAME_SUBNET) - private String subnet; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_VRF = "vrf"; - @SerializedName(SERIALIZED_NAME_VRF) - private UUID vrf; - - public VrfVirtualCircuitCreateInput() { - } - - public VrfVirtualCircuitCreateInput customerIp(String customerIp) { - - this.customerIp = customerIp; - return this; - } - - /** - * An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. - * @return customerIp - **/ - @javax.annotation.Nullable - public String getCustomerIp() { - return customerIp; - } - - - public void setCustomerIp(String customerIp) { - this.customerIp = customerIp; - } - - - public VrfVirtualCircuitCreateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VrfVirtualCircuitCreateInput md5(String md5) { - - this.md5 = md5; - return this; - } - - /** - * The plaintext BGP peering password shared by neighbors as an MD5 checksum: * must be 10-20 characters long * may not include punctuation * must be a combination of numbers and letters * must contain at least one lowercase, uppercase, and digit character - * @return md5 - **/ - @javax.annotation.Nullable - public String getMd5() { - return md5; - } - - - public void setMd5(String md5) { - this.md5 = md5; - } - - - public VrfVirtualCircuitCreateInput metalIp(String metalIp) { - - this.metalIp = metalIp; - return this; - } - - /** - * An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. - * @return metalIp - **/ - @javax.annotation.Nullable - public String getMetalIp() { - return metalIp; - } - - - public void setMetalIp(String metalIp) { - this.metalIp = metalIp; - } - - - public VrfVirtualCircuitCreateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VrfVirtualCircuitCreateInput nniVlan(Integer nniVlan) { - - this.nniVlan = nniVlan; - return this; - } - - /** - * Get nniVlan - * minimum: 2 - * maximum: 4094 - * @return nniVlan - **/ - @javax.annotation.Nonnull - public Integer getNniVlan() { - return nniVlan; - } - - - public void setNniVlan(Integer nniVlan) { - this.nniVlan = nniVlan; - } - - - public VrfVirtualCircuitCreateInput peerAsn(Integer peerAsn) { - - this.peerAsn = peerAsn; - return this; - } - - /** - * The peer ASN that will be used with the VRF on the Virtual Circuit. - * @return peerAsn - **/ - @javax.annotation.Nonnull - public Integer getPeerAsn() { - return peerAsn; - } - - - public void setPeerAsn(Integer peerAsn) { - this.peerAsn = peerAsn; - } - - - public VrfVirtualCircuitCreateInput projectId(UUID projectId) { - - this.projectId = projectId; - return this; - } - - /** - * Get projectId - * @return projectId - **/ - @javax.annotation.Nonnull - public UUID getProjectId() { - return projectId; - } - - - public void setProjectId(UUID projectId) { - this.projectId = projectId; - } - - - public VrfVirtualCircuitCreateInput speed(Integer speed) { - - this.speed = speed; - return this; - } - - /** - * speed can be passed as integer number representing bps speed or string (e.g. '52m' or '100g' or '4 gbps') - * @return speed - **/ - @javax.annotation.Nullable - public Integer getSpeed() { - return speed; - } - - - public void setSpeed(Integer speed) { - this.speed = speed; - } - - - public VrfVirtualCircuitCreateInput subnet(String subnet) { - - this.subnet = subnet; - return this; - } - - /** - * The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. The subnet specified must be contained within an already-defined IP Range for the VRF. - * @return subnet - **/ - @javax.annotation.Nonnull - public String getSubnet() { - return subnet; - } - - - public void setSubnet(String subnet) { - this.subnet = subnet; - } - - - public VrfVirtualCircuitCreateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfVirtualCircuitCreateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - - public VrfVirtualCircuitCreateInput vrf(UUID vrf) { - - this.vrf = vrf; - return this; - } - - /** - * The UUID of the VRF that will be associated with the Virtual Circuit. - * @return vrf - **/ - @javax.annotation.Nonnull - public UUID getVrf() { - return vrf; - } - - - public void setVrf(UUID vrf) { - this.vrf = vrf; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfVirtualCircuitCreateInput instance itself - */ - public VrfVirtualCircuitCreateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfVirtualCircuitCreateInput vrfVirtualCircuitCreateInput = (VrfVirtualCircuitCreateInput) o; - return Objects.equals(this.customerIp, vrfVirtualCircuitCreateInput.customerIp) && - Objects.equals(this.description, vrfVirtualCircuitCreateInput.description) && - Objects.equals(this.md5, vrfVirtualCircuitCreateInput.md5) && - Objects.equals(this.metalIp, vrfVirtualCircuitCreateInput.metalIp) && - Objects.equals(this.name, vrfVirtualCircuitCreateInput.name) && - Objects.equals(this.nniVlan, vrfVirtualCircuitCreateInput.nniVlan) && - Objects.equals(this.peerAsn, vrfVirtualCircuitCreateInput.peerAsn) && - Objects.equals(this.projectId, vrfVirtualCircuitCreateInput.projectId) && - Objects.equals(this.speed, vrfVirtualCircuitCreateInput.speed) && - Objects.equals(this.subnet, vrfVirtualCircuitCreateInput.subnet) && - Objects.equals(this.tags, vrfVirtualCircuitCreateInput.tags) && - Objects.equals(this.vrf, vrfVirtualCircuitCreateInput.vrf)&& - Objects.equals(this.additionalProperties, vrfVirtualCircuitCreateInput.additionalProperties); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(customerIp, description, md5, metalIp, name, nniVlan, peerAsn, projectId, speed, subnet, tags, vrf, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfVirtualCircuitCreateInput {\n"); - sb.append(" customerIp: ").append(toIndentedString(customerIp)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" md5: ").append(toIndentedString(md5)).append("\n"); - sb.append(" metalIp: ").append(toIndentedString(metalIp)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" nniVlan: ").append(toIndentedString(nniVlan)).append("\n"); - sb.append(" peerAsn: ").append(toIndentedString(peerAsn)).append("\n"); - sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" subnet: ").append(toIndentedString(subnet)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" vrf: ").append(toIndentedString(vrf)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer_ip"); - openapiFields.add("description"); - openapiFields.add("md5"); - openapiFields.add("metal_ip"); - openapiFields.add("name"); - openapiFields.add("nni_vlan"); - openapiFields.add("peer_asn"); - openapiFields.add("project_id"); - openapiFields.add("speed"); - openapiFields.add("subnet"); - openapiFields.add("tags"); - openapiFields.add("vrf"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("nni_vlan"); - openapiRequiredFields.add("peer_asn"); - openapiRequiredFields.add("project_id"); - openapiRequiredFields.add("subnet"); - openapiRequiredFields.add("vrf"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfVirtualCircuitCreateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfVirtualCircuitCreateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfVirtualCircuitCreateInput is not found in the empty JSON string", VrfVirtualCircuitCreateInput.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VrfVirtualCircuitCreateInput.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("customer_ip") != null && !jsonObj.get("customer_ip").isJsonNull()) && !jsonObj.get("customer_ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customer_ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_ip").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("md5") != null && !jsonObj.get("md5").isJsonNull()) && !jsonObj.get("md5").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `md5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5").toString())); - } - if ((jsonObj.get("metal_ip") != null && !jsonObj.get("metal_ip").isJsonNull()) && !jsonObj.get("metal_ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metal_ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metal_ip").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("project_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `project_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_id").toString())); - } - if (!jsonObj.get("subnet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subnet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subnet").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - if (!jsonObj.get("vrf").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `vrf` to be a primitive type in the JSON string but got `%s`", jsonObj.get("vrf").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfVirtualCircuitCreateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfVirtualCircuitCreateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfVirtualCircuitCreateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfVirtualCircuitCreateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfVirtualCircuitCreateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfVirtualCircuitCreateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfVirtualCircuitCreateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfVirtualCircuitCreateInput - * @throws IOException if the JSON string is invalid with respect to VrfVirtualCircuitCreateInput - */ - public static VrfVirtualCircuitCreateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfVirtualCircuitCreateInput.class); - } - - /** - * Convert an instance of VrfVirtualCircuitCreateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitType.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitType.java deleted file mode 100644 index bacb6fe75..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitType.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import com.google.gson.TypeAdapter; -import com.google.gson.JsonElement; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * Gets or Sets VrfVirtualCircuitType - */ -@JsonAdapter(VrfVirtualCircuitType.Adapter.class) -public enum VrfVirtualCircuitType { - - VRF("vrf"); - - private String value; - - VrfVirtualCircuitType(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static VrfVirtualCircuitType fromValue(String value) { - for (VrfVirtualCircuitType b : VrfVirtualCircuitType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final VrfVirtualCircuitType enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public VrfVirtualCircuitType read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return VrfVirtualCircuitType.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - VrfVirtualCircuitType.fromValue(value); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java deleted file mode 100644 index e7ca8d7d4..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInput.java +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.equinix.openapi.JSON; - -/** - * VrfVirtualCircuitUpdateInput - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class VrfVirtualCircuitUpdateInput { - public static final String SERIALIZED_NAME_CUSTOMER_IP = "customer_ip"; - @SerializedName(SERIALIZED_NAME_CUSTOMER_IP) - private String customerIp; - - public static final String SERIALIZED_NAME_DESCRIPTION = "description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_MD5 = "md5"; - @SerializedName(SERIALIZED_NAME_MD5) - private String md5; - - public static final String SERIALIZED_NAME_METAL_IP = "metal_ip"; - @SerializedName(SERIALIZED_NAME_METAL_IP) - private String metalIp; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PEER_ASN = "peer_asn"; - @SerializedName(SERIALIZED_NAME_PEER_ASN) - private Integer peerAsn; - - public static final String SERIALIZED_NAME_SPEED = "speed"; - @SerializedName(SERIALIZED_NAME_SPEED) - private String speed; - - public static final String SERIALIZED_NAME_SUBNET = "subnet"; - @SerializedName(SERIALIZED_NAME_SUBNET) - private String subnet; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public VrfVirtualCircuitUpdateInput() { - } - - public VrfVirtualCircuitUpdateInput customerIp(String customerIp) { - - this.customerIp = customerIp; - return this; - } - - /** - * An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. - * @return customerIp - **/ - @javax.annotation.Nullable - public String getCustomerIp() { - return customerIp; - } - - - public void setCustomerIp(String customerIp) { - this.customerIp = customerIp; - } - - - public VrfVirtualCircuitUpdateInput description(String description) { - - this.description = description; - return this; - } - - /** - * Get description - * @return description - **/ - @javax.annotation.Nullable - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public VrfVirtualCircuitUpdateInput md5(String md5) { - - this.md5 = md5; - return this; - } - - /** - * The plaintext BGP peering password shared by neighbors as an MD5 checksum: * must be 10-20 characters long * may not include punctuation * must be a combination of numbers and letters * must contain at least one lowercase, uppercase, and digit character - * @return md5 - **/ - @javax.annotation.Nullable - public String getMd5() { - return md5; - } - - - public void setMd5(String md5) { - this.md5 = md5; - } - - - public VrfVirtualCircuitUpdateInput metalIp(String metalIp) { - - this.metalIp = metalIp; - return this; - } - - /** - * An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. - * @return metalIp - **/ - @javax.annotation.Nullable - public String getMetalIp() { - return metalIp; - } - - - public void setMetalIp(String metalIp) { - this.metalIp = metalIp; - } - - - public VrfVirtualCircuitUpdateInput name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public VrfVirtualCircuitUpdateInput peerAsn(Integer peerAsn) { - - this.peerAsn = peerAsn; - return this; - } - - /** - * The peer ASN that will be used with the VRF on the Virtual Circuit. - * @return peerAsn - **/ - @javax.annotation.Nullable - public Integer getPeerAsn() { - return peerAsn; - } - - - public void setPeerAsn(Integer peerAsn) { - this.peerAsn = peerAsn; - } - - - public VrfVirtualCircuitUpdateInput speed(String speed) { - - this.speed = speed; - return this; - } - - /** - * Speed can be changed only if it is an interconnection on a Dedicated Port - * @return speed - **/ - @javax.annotation.Nullable - public String getSpeed() { - return speed; - } - - - public void setSpeed(String speed) { - this.speed = speed; - } - - - public VrfVirtualCircuitUpdateInput subnet(String subnet) { - - this.subnet = subnet; - return this; - } - - /** - * The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. - * @return subnet - **/ - @javax.annotation.Nullable - public String getSubnet() { - return subnet; - } - - - public void setSubnet(String subnet) { - this.subnet = subnet; - } - - - public VrfVirtualCircuitUpdateInput tags(List tags) { - - this.tags = tags; - return this; - } - - public VrfVirtualCircuitUpdateInput addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - - public void setTags(List tags) { - this.tags = tags; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the VrfVirtualCircuitUpdateInput instance itself - */ - public VrfVirtualCircuitUpdateInput putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VrfVirtualCircuitUpdateInput vrfVirtualCircuitUpdateInput = (VrfVirtualCircuitUpdateInput) o; - return Objects.equals(this.customerIp, vrfVirtualCircuitUpdateInput.customerIp) && - Objects.equals(this.description, vrfVirtualCircuitUpdateInput.description) && - Objects.equals(this.md5, vrfVirtualCircuitUpdateInput.md5) && - Objects.equals(this.metalIp, vrfVirtualCircuitUpdateInput.metalIp) && - Objects.equals(this.name, vrfVirtualCircuitUpdateInput.name) && - Objects.equals(this.peerAsn, vrfVirtualCircuitUpdateInput.peerAsn) && - Objects.equals(this.speed, vrfVirtualCircuitUpdateInput.speed) && - Objects.equals(this.subnet, vrfVirtualCircuitUpdateInput.subnet) && - Objects.equals(this.tags, vrfVirtualCircuitUpdateInput.tags)&& - Objects.equals(this.additionalProperties, vrfVirtualCircuitUpdateInput.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(customerIp, description, md5, metalIp, name, peerAsn, speed, subnet, tags, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VrfVirtualCircuitUpdateInput {\n"); - sb.append(" customerIp: ").append(toIndentedString(customerIp)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" md5: ").append(toIndentedString(md5)).append("\n"); - sb.append(" metalIp: ").append(toIndentedString(metalIp)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" peerAsn: ").append(toIndentedString(peerAsn)).append("\n"); - sb.append(" speed: ").append(toIndentedString(speed)).append("\n"); - sb.append(" subnet: ").append(toIndentedString(subnet)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("customer_ip"); - openapiFields.add("description"); - openapiFields.add("md5"); - openapiFields.add("metal_ip"); - openapiFields.add("name"); - openapiFields.add("peer_asn"); - openapiFields.add("speed"); - openapiFields.add("subnet"); - openapiFields.add("tags"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VrfVirtualCircuitUpdateInput - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VrfVirtualCircuitUpdateInput.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VrfVirtualCircuitUpdateInput is not found in the empty JSON string", VrfVirtualCircuitUpdateInput.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("customer_ip") != null && !jsonObj.get("customer_ip").isJsonNull()) && !jsonObj.get("customer_ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `customer_ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_ip").toString())); - } - if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); - } - if ((jsonObj.get("md5") != null && !jsonObj.get("md5").isJsonNull()) && !jsonObj.get("md5").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `md5` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5").toString())); - } - if ((jsonObj.get("metal_ip") != null && !jsonObj.get("metal_ip").isJsonNull()) && !jsonObj.get("metal_ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `metal_ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("metal_ip").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("speed") != null && !jsonObj.get("speed").isJsonNull()) && !jsonObj.get("speed").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `speed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("speed").toString())); - } - if ((jsonObj.get("subnet") != null && !jsonObj.get("subnet").isJsonNull()) && !jsonObj.get("subnet").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subnet` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subnet").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!VrfVirtualCircuitUpdateInput.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'VrfVirtualCircuitUpdateInput' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(VrfVirtualCircuitUpdateInput.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, VrfVirtualCircuitUpdateInput value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public VrfVirtualCircuitUpdateInput read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - VrfVirtualCircuitUpdateInput instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of VrfVirtualCircuitUpdateInput given an JSON string - * - * @param jsonString JSON string - * @return An instance of VrfVirtualCircuitUpdateInput - * @throws IOException if the JSON string is invalid with respect to VrfVirtualCircuitUpdateInput - */ - public static VrfVirtualCircuitUpdateInput fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, VrfVirtualCircuitUpdateInput.class); - } - - /** - * Convert an instance of VrfVirtualCircuitUpdateInput to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/equinix-openapi-metal/src/main/java/com/equinix/workflow/DeviceOperator.java b/equinix-openapi-metal/src/main/java/com/equinix/workflow/DeviceOperator.java deleted file mode 100644 index bc04a9de9..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/workflow/DeviceOperator.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.equinix.workflow; - -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.api.DevicesApi; -import com.equinix.openapi.metal.v1.model.Device; -import com.equinix.openapi.metal.v1.model.CreateDeviceRequest; -import com.equinix.openapi.metal.v1.model.Device.StateEnum; - -import java.time.Duration; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -public class DeviceOperator { - private DevicesApi deviceApiInstance; - - /** - * After device get's deployed we get provisioning - * percentage as `null`. But during provisioning, - * percentage can be null even before provisioning - * even starts. Hence we should look at device state. - * - * Target : active or failed. - * Pending: queued, provisioning or reinstalling. - */ - private final List targetState = Arrays.asList(StateEnum.ACTIVE, StateEnum.FAILED); - - public DeviceOperator(ApiClient client) { - this.deviceApiInstance = new DevicesApi(client); - } - - public Device createDeviceAndPoll(CreateDeviceRequest createDeviceRequest, UUID project, int retries, Duration wait) throws ApiException, InterruptedException { - Device device = deviceApiInstance.createDevice(project, createDeviceRequest, null, null); - - return deviceAndPoll(device, retries, wait); - } - - public Device deviceReadyAndPoll(UUID deviceId, int retries, Duration wait) throws ApiException, InterruptedException { - List empty = new ArrayList<>(); - Device device = deviceApiInstance.findDeviceById(deviceId, empty, empty); - - return deviceAndPoll(device, retries, wait); - } - - private Device deviceAndPoll(Device device, int retries, Duration wait) throws ApiException, InterruptedException { - UUID deviceId = null; - - List empty = new ArrayList<>(); - for(int i=0; (i < retries) && !targetState.contains(device.getState()); i++) { - deviceId = device.getId(); - Thread.sleep(wait.toMillis()); - device = deviceApiInstance.findDeviceById(deviceId, empty, empty); - } - return device; - } - - public void deleteDevice(UUID id, Boolean forceDelete) throws ApiException { - this.deviceApiInstance.deleteDevice(id, forceDelete); - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/workflow/MetalGatewayOperator.java b/equinix-openapi-metal/src/main/java/com/equinix/workflow/MetalGatewayOperator.java deleted file mode 100644 index a57380492..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/workflow/MetalGatewayOperator.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.equinix.workflow; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.time.Duration; -import java.util.List; -import java.util.UUID; - -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.api.MetalGatewaysApi; -import com.equinix.openapi.metal.v1.model.CreateMetalGatewayRequest; -import com.equinix.openapi.metal.v1.model.MetalGateway; -import com.equinix.openapi.metal.v1.model.MetalGateway.StateEnum; -import com.equinix.openapi.metal.v1.model.MetalGatewayCreateInput; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.workflow.helpers.VlanHelper; - -public class MetalGatewayOperator { - private MetalGatewaysApi metalGatewaysApi; - private VlanHelper vlanHelper; - private static final Integer RESPONSE_PAGE = 1; - private static final Integer RESPONSE_ITEMS_PER_PAGE = 10; - private static final String VIRTUAL_NETWORK = "virtual_network"; - - public MetalGatewayOperator(ApiClient apiClient) { - this.metalGatewaysApi = new MetalGatewaysApi(apiClient); - this.vlanHelper = new VlanHelper(apiClient); - } - - // Returns the metal gateway queried by its id - public MetalGateway getMetalGateway(UUID metalGatewayId, List include, List exclude) throws ApiException { - return metalGatewaysApi.findMetalGatewayById(metalGatewayId, include, exclude).getMetalGateway(); - } - - // Returns the vlan associated with the metal gateway queried by its id - public VirtualNetwork getVlanOfMetalGateway(UUID metalGatewayId) throws ApiException { - MetalGateway metalGateway = getMetalGateway(metalGatewayId, Collections.singletonList(VIRTUAL_NETWORK), null); - return metalGateway.getVirtualNetwork(); - } - - // Creates a Metal Gateway with a private IPv4 block specified for the associated Virtual Network - public MetalGateway createMetalGatewayWithPrivateIpBlock(UUID projectId, String metro, Integer vxlan, Integer privateIpv4SubnetSize) - throws ApiException, InterruptedException { - - VirtualNetwork vlan = vlanHelper.getVlanByVxlanInProjectMetro(projectId, metro, vxlan); - if (vlan==null) - vlan = vlanHelper.createVlan(projectId, metro, vxlan); - - MetalGatewayCreateInput metalGatewayCreateInput = new MetalGatewayCreateInput() - .privateIpv4SubnetSize(privateIpv4SubnetSize) - .virtualNetworkId(vlan.getId()); - - CreateMetalGatewayRequest createMetalGatewayRequest = new CreateMetalGatewayRequest(metalGatewayCreateInput); - return createMetalGateway(projectId, createMetalGatewayRequest); - } - - /** - * General wrapper to create metal gateway. Types of inputs supported in the request: - * 1. MetalGatewayCreateInput: for a regular metal gateway with reserved or private ip block - * 2. VrfMetalGatewayCreateInput: for a vrf metal gateway with a reserved ip block - */ - public MetalGateway createMetalGateway(UUID projectId, CreateMetalGatewayRequest metalGatewayRequest) - throws ApiException { - return metalGatewaysApi.createMetalGateway(projectId, metalGatewayRequest, null, null, RESPONSE_PAGE, RESPONSE_ITEMS_PER_PAGE).getMetalGateway(); - } - - // Poll until metal gateway record is deleted when state is "deleting" - private void metalGatewayDeletedAndPoll(MetalGateway metalGateway, int retries, Duration wait) - throws InterruptedException, ApiException { - - UUID metalGatewayId = metalGateway.getId(); - for (int i=0; i include, List exclude, int retries, Duration wait) - throws ApiException, InterruptedException { - MetalGateway metalGateway = getMetalGateway(metalGatewayId, null, null); - metalGatewaysApi.deleteMetalGateway(metalGatewayId, include, exclude); - metalGatewayDeletedAndPoll(metalGateway, retries, wait); - } - - // Delete the vlan and associated metal gateway - public void deleteVlanAndMetalGateway(UUID metalGatewayId, int retries, Duration wait) - throws ApiException, InterruptedException { - - MetalGateway metalGateway = getMetalGateway(metalGatewayId, Collections.singletonList(VIRTUAL_NETWORK), null); - VirtualNetwork vlan = metalGateway.getVirtualNetwork(); - if (vlan!=null) { - vlanHelper.deleteVlan(vlan.getId()); // deleting vlan also deletes the associated metal gateways - metalGatewayDeletedAndPoll(metalGateway, retries, wait); - } - else - deleteMetalGatewayAndPoll(metalGatewayId, new ArrayList(), new ArrayList(), retries, wait); - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/workflow/ProjectAPIKeyOperator.java b/equinix-openapi-metal/src/main/java/com/equinix/workflow/ProjectAPIKeyOperator.java deleted file mode 100644 index 9d40616b5..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/workflow/ProjectAPIKeyOperator.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.equinix.workflow; - -import com.equinix.openapi.metal.v1.api.AuthenticationApi; -import com.equinix.openapi.metal.v1.api.ProjectsApi; -import com.equinix.openapi.metal.v1.model.AuthToken; -import com.equinix.openapi.metal.v1.model.AuthTokenInput; -import com.equinix.openapi.metal.v1.model.AuthTokenList; -import com.equinix.openapi.metal.v1.model.ProjectList; -import com.equinix.openapi.ApiClient; - -import java.util.AbstractMap.SimpleEntry; -import java.util.UUID; - -public class ProjectAPIKeyOperator { - private AuthenticationApi authApi; - private ProjectsApi projectsApi; - private ApiClient apiClient; - - public void initializeApiClient(String apiKey) { - apiClient = new ApiClient(); - apiClient.setApiKey(apiKey); - authApi = new AuthenticationApi(apiClient); - projectsApi = new ProjectsApi(apiClient); - } - - public AuthToken createProjectAPIKey(UUID projectId, String description) throws Exception { - AuthTokenInput authTokenInput = new AuthTokenInput(); - authTokenInput.setDescription(description); - - AuthToken newAuthToken = authApi.createProjectAPIKey(projectId, authTokenInput, null); - return newAuthToken; - } - - public SimpleEntry getProjectAuthTokenByToken(String token) throws Exception { - ProjectList projectList = projectsApi.findProjects(null, null, null, null, null); - if (projectList.getProjects().size() != 1) { - throw new Exception("Expected only one project to be associated with the token"); - } - UUID projectId = projectList.getProjects().get(0).getId(); - - AuthTokenList tokenList = authApi.findProjectAPIKeys(projectId, null); - for (AuthToken authToken : tokenList.getApiKeys()) { - if (authToken.getToken().equals(token)) { - return new SimpleEntry<>(authToken, projectId); - } - } - throw new Exception("Provided token not found"); - } - - public void deleteAPIKey(UUID apiKeyId) throws Exception { - authApi.deleteAPIKey(apiKeyId); - } - - public AuthToken rotateProjectKey(String authToken) { - try { - SimpleEntry result = getProjectAuthTokenByToken(authToken); - AuthToken oldAuthToken = result.getKey(); - UUID projectId = result.getValue(); - - if (oldAuthToken == null || oldAuthToken.getProject() == null) { - throw new Exception("Cannot rotate API key. The current API key is not associated with a project."); - } - - AuthToken newAuthToken = createProjectAPIKey(projectId, "rotated-api-key"); - - // Update the API client with the new API key - initializeApiClient(newAuthToken.getToken()); - - deleteAPIKey(oldAuthToken.getId()); - - return newAuthToken; - } catch (Exception e) { - throw new RuntimeException("Failed to rotate the API key: " + e.getMessage(), e); - } - } -} diff --git a/equinix-openapi-metal/src/main/java/com/equinix/workflow/helpers/VlanHelper.java b/equinix-openapi-metal/src/main/java/com/equinix/workflow/helpers/VlanHelper.java deleted file mode 100644 index 135849521..000000000 --- a/equinix-openapi-metal/src/main/java/com/equinix/workflow/helpers/VlanHelper.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.equinix.workflow.helpers; - -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.UUID; - -import com.equinix.openapi.ApiClient; -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.api.VlansApi; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.VirtualNetworkCreateInput; - -// Helper class wrapping over auto generated Vlan APIs including some additional methods -public class VlanHelper { - private VlansApi vlansApi; - - public VlanHelper(ApiClient apiClient) { - this.vlansApi = new VlansApi(apiClient); - } - - // Returns the vlan queried by its id - public VirtualNetwork getVlan(UUID vlanId) throws ApiException { - return vlansApi.getVirtualNetwork(vlanId, null, null); - } - - // Returns a vlan in a project metro by its vxlan identifier - public VirtualNetwork getVlanByVxlanInProjectMetro(UUID projectId, String metro, Integer vxlan) throws ApiException { - VirtualNetwork vlan = null; - List vlanList = vlansApi.findVirtualNetworks(projectId, null, null, null, metro).getVirtualNetworks(); - if (vlanList!=null && !vlanList.isEmpty()) { - Optional requiredVlan = vlanList.stream() - .filter(vlanObj -> Objects.equals(vlanObj.getVxlan(), vxlan)) - .findFirst(); - if (requiredVlan.isPresent()) - vlan = requiredVlan.get(); - } - return vlan; - } - - // Create a vlan - public VirtualNetwork createVlan(UUID projectId, String metro, Integer vxlan) throws ApiException { - VirtualNetworkCreateInput vlanInput=new VirtualNetworkCreateInput() - .metro(metro) - .vxlan(vxlan); - return vlansApi.createVirtualNetwork(projectId, vlanInput, null, null); - } - - // Delete vlan by id - public void deleteVlan(UUID vlanId) throws ApiException { - vlansApi.deleteVirtualNetwork(vlanId, null, null); - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/AuthenticationApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/AuthenticationApiTest.java deleted file mode 100644 index 94ceff08f..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/AuthenticationApiTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.AuthToken; -import com.equinix.openapi.metal.v1.model.AuthTokenInput; -import com.equinix.openapi.metal.v1.model.AuthTokenList; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AuthenticationApi - */ -@Disabled -public class AuthenticationApiTest { - - private final AuthenticationApi api = new AuthenticationApi(); - - /** - * Create an API key - * - * Creates a API key for the current user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createAPIKeyTest() throws ApiException { - AuthTokenInput authTokenInput = null; - List include = null; - AuthToken response = api.createAPIKey(authTokenInput, include); - // TODO: test validations - } - - /** - * Create an API key for a project. - * - * Creates an API key for a project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createProjectAPIKeyTest() throws ApiException { - UUID id = null; - AuthTokenInput authTokenInput = null; - List include = null; - AuthToken response = api.createProjectAPIKey(id, authTokenInput, include); - // TODO: test validations - } - - /** - * Delete the API key - * - * Deletes the API key. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteAPIKeyTest() throws ApiException { - UUID id = null; - api.deleteAPIKey(id); - // TODO: test validations - } - - /** - * Delete the API key - * - * Deletes the current user API key. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteUserAPIKeyTest() throws ApiException { - UUID id = null; - api.deleteUserAPIKey(id); - // TODO: test validations - } - - /** - * Retrieve all user API keys - * - * Returns all API keys for the current user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAPIKeysTest() throws ApiException { - String search = null; - List include = null; - AuthTokenList response = api.findAPIKeys(search, include); - // TODO: test validations - } - - /** - * Retrieve all API keys for the project. - * - * Returns all API keys for a specific project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectAPIKeysTest() throws ApiException { - UUID id = null; - List include = null; - AuthTokenList response = api.findProjectAPIKeys(id, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/BatchesApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/BatchesApiTest.java deleted file mode 100644 index 6cf0debea..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/BatchesApiTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Batch; -import com.equinix.openapi.metal.v1.model.BatchesList; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.InstancesBatchCreateInput; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for BatchesApi - */ -@Disabled -public class BatchesApiTest { - - private final BatchesApi api = new BatchesApi(); - - /** - * Create a devices batch - * - * Creates new devices in batch and provisions them in our datacenter. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createDeviceBatchTest() throws ApiException { - UUID id = null; - InstancesBatchCreateInput instancesBatchCreateInput = null; - BatchesList response = api.createDeviceBatch(id, instancesBatchCreateInput); - // TODO: test validations - } - - /** - * Delete the Batch - * - * Deletes the Batch. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteBatchTest() throws ApiException { - UUID id = null; - Boolean removeAssociatedInstances = null; - api.deleteBatch(id, removeAssociatedInstances); - // TODO: test validations - } - - /** - * Retrieve a Batch - * - * Returns a Batch - * - * @throws ApiException if the Api call fails - */ - @Test - public void findBatchByIdTest() throws ApiException { - UUID id = null; - List include = null; - Batch response = api.findBatchById(id, include); - // TODO: test validations - } - - /** - * Retrieve all batches by project - * - * Returns all batches for the given project - * - * @throws ApiException if the Api call fails - */ - @Test - public void findBatchesByProjectTest() throws ApiException { - UUID id = null; - List include = null; - BatchesList response = api.findBatchesByProject(id, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/BgpApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/BgpApiTest.java deleted file mode 100644 index b51fde0c1..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/BgpApiTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.BgpConfig; -import com.equinix.openapi.metal.v1.model.BgpConfigRequestInput; -import com.equinix.openapi.metal.v1.model.BgpSession; -import com.equinix.openapi.metal.v1.model.BgpSessionList; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.GlobalBgpRangeList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for BgpApi - */ -@Disabled -public class BgpApiTest { - - private final BgpApi api = new BgpApi(); - - /** - * Delete the BGP session - * - * Deletes the BGP session. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteBgpSessionTest() throws ApiException { - UUID id = null; - api.deleteBgpSession(id); - // TODO: test validations - } - - /** - * Retrieve a bgp config - * - * Returns a bgp config - * - * @throws ApiException if the Api call fails - */ - @Test - public void findBgpConfigByProjectTest() throws ApiException { - UUID id = null; - List include = null; - BgpConfig response = api.findBgpConfigByProject(id, include); - // TODO: test validations - } - - /** - * Retrieve a BGP session - * - * Returns a BGP session - * - * @throws ApiException if the Api call fails - */ - @Test - public void findBgpSessionByIdTest() throws ApiException { - UUID id = null; - List include = null; - BgpSession response = api.findBgpSessionById(id, include); - // TODO: test validations - } - - /** - * Retrieve all global bgp ranges - * - * Returns all global bgp ranges for a project - * - * @throws ApiException if the Api call fails - */ - @Test - public void findGlobalBgpRangesTest() throws ApiException { - UUID id = null; - GlobalBgpRangeList response = api.findGlobalBgpRanges(id); - // TODO: test validations - } - - /** - * Retrieve all BGP sessions for project - * - * Provides a listing of available BGP sessions for the project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectBgpSessionsTest() throws ApiException { - UUID id = null; - BgpSessionList response = api.findProjectBgpSessions(id); - // TODO: test validations - } - - /** - * Requesting bgp config - * - * Requests to enable bgp configuration for a project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void requestBgpConfigTest() throws ApiException { - UUID id = null; - BgpConfigRequestInput bgpConfigRequestInput = null; - List include = null; - api.requestBgpConfig(id, bgpConfigRequestInput, include); - // TODO: test validations - } - - /** - * Update the BGP session - * - * Updates the BGP session by either enabling or disabling the default route functionality. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateBgpSessionTest() throws ApiException { - UUID id = null; - Boolean body = null; - api.updateBgpSession(id, body); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/CapacityApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/CapacityApiTest.java deleted file mode 100644 index 661d4269a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/CapacityApiTest.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.CapacityCheckPerFacilityList; -import com.equinix.openapi.metal.v1.model.CapacityCheckPerMetroList; -import com.equinix.openapi.metal.v1.model.CapacityInput; -import com.equinix.openapi.metal.v1.model.CapacityList; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for CapacityApi - */ -@Disabled -public class CapacityApiTest { - - private final CapacityApi api = new CapacityApi(); - - /** - * Check capacity - * - * Validates if a deploy can be fulfilled. - * - * @throws ApiException if the Api call fails - */ - @Test - public void checkCapacityForFacilityTest() throws ApiException { - CapacityInput capacityInput = null; - CapacityCheckPerFacilityList response = api.checkCapacityForFacility(capacityInput); - // TODO: test validations - } - - /** - * Check capacity for a metro - * - * Validates if a deploy can be fulfilled in a metro. - * - * @throws ApiException if the Api call fails - */ - @Test - public void checkCapacityForMetroTest() throws ApiException { - CapacityInput capacityInput = null; - CapacityCheckPerMetroList response = api.checkCapacityForMetro(capacityInput); - // TODO: test validations - } - - /** - * View capacity - * - * Returns a list of facilities and plans with their current capacity. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findCapacityForFacilityTest() throws ApiException { - CapacityList response = api.findCapacityForFacility(); - // TODO: test validations - } - - /** - * View capacity for metros - * - * Returns a list of metros and plans with their current capacity. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findCapacityForMetroTest() throws ApiException { - CapacityList response = api.findCapacityForMetro(); - // TODO: test validations - } - - /** - * View available hardware plans per Facility for given organization - * - * Returns a list of facilities and plans with their current capacity. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationCapacityPerFacilityTest() throws ApiException { - UUID id = null; - CapacityList response = api.findOrganizationCapacityPerFacility(id); - // TODO: test validations - } - - /** - * View available hardware plans per Metro for given organization - * - * Returns a list of metros and plans with their current capacity. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationCapacityPerMetroTest() throws ApiException { - UUID id = null; - CapacityList response = api.findOrganizationCapacityPerMetro(id); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/ConsoleLogDetailsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/ConsoleLogDetailsApiTest.java deleted file mode 100644 index 24a7dd7b7..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/ConsoleLogDetailsApiTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import java.io.File; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ConsoleLogDetailsApi - */ -@Disabled -public class ConsoleLogDetailsApiTest { - - private final ConsoleLogDetailsApi api = new ConsoleLogDetailsApi(); - - /** - * Capture a screenshot from the device, if supported, via the BMC. - * - * @throws ApiException if the Api call fails - */ - @Test - public void captureScreenshotTest() throws ApiException { - UUID id = null; - File response = api.captureScreenshot(id); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/DevicesApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/DevicesApiTest.java deleted file mode 100644 index 479ce859e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/DevicesApiTest.java +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.BGPSessionInput; -import com.equinix.openapi.metal.v1.model.BgpSession; -import com.equinix.openapi.metal.v1.model.BgpSessionList; -import com.equinix.openapi.metal.v1.model.BgpSessionNeighbors; -import com.equinix.openapi.metal.v1.model.CreateDeviceRequest; -import com.equinix.openapi.metal.v1.model.Device; -import com.equinix.openapi.metal.v1.model.DeviceActionInput; -import com.equinix.openapi.metal.v1.model.DeviceHealthRollup; -import com.equinix.openapi.metal.v1.model.DeviceList; -import com.equinix.openapi.metal.v1.model.DeviceUpdateInput; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FindTrafficTimeframeParameter; -import com.equinix.openapi.metal.v1.model.FirmwareSetResponse; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPAssignmentInput; -import com.equinix.openapi.metal.v1.model.IPAssignmentList; -import com.equinix.openapi.metal.v1.model.Metadata; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.Userdata; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for DevicesApi - */ -@Disabled -public class DevicesApiTest { - - private final DevicesApi api = new DevicesApi(); - - /** - * Create a BGP session - * - * Creates a BGP session. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createBgpSessionTest() throws ApiException { - UUID id = null; - BGPSessionInput bgPSessionInput = null; - List include = null; - BgpSession response = api.createBgpSession(id, bgPSessionInput, include); - // TODO: test validations - } - - /** - * Create a device - * - * Creates a new device and provisions it in the specified location. Device type-specific options are accepted. For example, `baremetal` devices accept `operating_system`, `hostname`, and `plan`. These parameters may not be accepted for other device types. The default device type is `baremetal`. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createDeviceTest() throws ApiException { - UUID id = null; - CreateDeviceRequest createDeviceRequest = null; - List include = null; - List exclude = null; - Device response = api.createDevice(id, createDeviceRequest, include, exclude); - // TODO: test validations - } - - /** - * Create an ip assignment - * - * Creates an ip assignment for a device. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createIPAssignmentTest() throws ApiException { - UUID id = null; - IPAssignmentInput ipAssignmentInput = null; - List include = null; - List exclude = null; - IPAssignment response = api.createIPAssignment(id, ipAssignmentInput, include, exclude); - // TODO: test validations - } - - /** - * Delete the device - * - * Deletes a device and deprovisions it in our datacenter. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteDeviceTest() throws ApiException { - UUID id = null; - Boolean forceDelete = null; - api.deleteDevice(id, forceDelete); - // TODO: test validations - } - - /** - * Retrieve all BGP sessions - * - * Provides a listing of available BGP sessions for the device. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findBgpSessionsTest() throws ApiException { - UUID id = null; - List include = null; - BgpSessionList response = api.findBgpSessions(id, include); - // TODO: test validations - } - - /** - * Retrieve a device - * - * Type-specific options (such as facility for baremetal devices) will be included as part of the main data structure. State value can be one of: active inactive queued or provisioning - * - * @throws ApiException if the Api call fails - */ - @Test - public void findDeviceByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Device response = api.findDeviceById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve the custom metadata of an instance - * - * Provides the custom metadata stored for this instance in json format - * - * @throws ApiException if the Api call fails - */ - @Test - public void findDeviceCustomdataTest() throws ApiException { - UUID id = null; - api.findDeviceCustomdata(id); - // TODO: test validations - } - - /** - * Retrieve metadata - * - * Retrieve device metadata - * - * @throws ApiException if the Api call fails - */ - @Test - public void findDeviceMetadataByIDTest() throws ApiException { - UUID id = null; - Metadata response = api.findDeviceMetadataByID(id); - // TODO: test validations - } - - /** - * Retrieve userdata - * - * Retrieve device userdata - * - * @throws ApiException if the Api call fails - */ - @Test - public void findDeviceUserdataByIDTest() throws ApiException { - UUID id = null; - Userdata response = api.findDeviceUserdataByID(id); - // TODO: test validations - } - - /** - * Retrieve the custom metadata of an IP Assignment - * - * Provides the custom metadata stored for this IP Assignment in json format - * - * @throws ApiException if the Api call fails - */ - @Test - public void findIPAssignmentCustomdataTest() throws ApiException { - UUID instanceId = null; - UUID id = null; - api.findIPAssignmentCustomdata(instanceId, id); - // TODO: test validations - } - - /** - * Retrieve all ip assignments - * - * Returns all ip assignments for a device. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findIPAssignmentsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - IPAssignmentList response = api.findIPAssignments(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve an instance bandwidth - * - * Retrieve an instance bandwidth for a given period of time. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findInstanceBandwidthTest() throws ApiException { - UUID id = null; - String from = null; - String until = null; - api.findInstanceBandwidth(id, from, until); - // TODO: test validations - } - - /** - * Retrieve all devices of an organization - * - * Provides a collection of devices for a given organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationDevicesTest() throws ApiException { - UUID id = null; - String search = null; - List categories = null; - String facility = null; - String hostname = null; - Boolean reserved = null; - String tag = null; - String type = null; - Boolean hasTerminationTime = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - DeviceList response = api.findOrganizationDevices(id, search, categories, facility, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve all devices of a project - * - * Provides a collection of devices for a given project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectDevicesTest() throws ApiException { - UUID id = null; - String search = null; - List categories = null; - String facility = null; - String metro = null; - String hostname = null; - Boolean reserved = null; - String tag = null; - String type = null; - Boolean hasTerminationTime = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - DeviceList response = api.findProjectDevices(id, search, categories, facility, metro, hostname, reserved, tag, type, hasTerminationTime, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve device traffic - * - * Returns traffic for a specific device. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findTrafficTest() throws ApiException { - UUID id = null; - String direction = null; - String interval = null; - String bucket = null; - FindTrafficTimeframeParameter timeframe = null; - api.findTraffic(id, direction, interval, bucket, timeframe); - // TODO: test validations - } - - /** - * Retrieve BGP neighbor data for this device - * - * Provides a summary of the BGP neighbor data associated to the BGP sessions for this device. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getBgpNeighborDataTest() throws ApiException { - UUID id = null; - List include = null; - BgpSessionNeighbors response = api.getBgpNeighborData(id, include); - // TODO: test validations - } - - /** - * Get Device's associated Firmware Set - * - * Returns the firmware set associated with the device. If a custom firmware set is associated with the device, then it is returned. Otherwise, if a default firmware set is available it is returned. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getDeviceFirmwareSetsTest() throws ApiException { - UUID id = null; - FirmwareSetResponse response = api.getDeviceFirmwareSets(id); - // TODO: test validations - } - - /** - * Get Device's Health Status - * - * Returns the health rollup status of the device. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getDeviceHealthRollupTest() throws ApiException { - UUID id = null; - DeviceHealthRollup response = api.getDeviceHealthRollup(id); - // TODO: test validations - } - - /** - * Perform an action - * - * Performs an action for the given device. Possible actions include: power_on, power_off, reboot, reinstall, and rescue (reboot the device into rescue OS.) - * - * @throws ApiException if the Api call fails - */ - @Test - public void performActionTest() throws ApiException { - UUID id = null; - DeviceActionInput deviceActionInput = null; - api.performAction(id, deviceActionInput); - // TODO: test validations - } - - /** - * Update the device - * - * Updates the device. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateDeviceTest() throws ApiException { - UUID id = null; - DeviceUpdateInput deviceUpdateInput = null; - List include = null; - List exclude = null; - Device response = api.updateDevice(id, deviceUpdateInput, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/EmailsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/EmailsApiTest.java deleted file mode 100644 index 49b76e2f7..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/EmailsApiTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.CreateEmailInput; -import com.equinix.openapi.metal.v1.model.Email; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.UpdateEmailInput; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for EmailsApi - */ -@Disabled -public class EmailsApiTest { - - private final EmailsApi api = new EmailsApi(); - - /** - * Create an email - * - * Add a new email address to the current user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createEmailTest() throws ApiException { - CreateEmailInput createEmailInput = null; - Email response = api.createEmail(createEmailInput); - // TODO: test validations - } - - /** - * Delete the email - * - * Deletes the email. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteEmailTest() throws ApiException { - UUID id = null; - api.deleteEmail(id); - // TODO: test validations - } - - /** - * Retrieve an email - * - * Provides one of the user’s emails. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findEmailByIdTest() throws ApiException { - UUID id = null; - Email response = api.findEmailById(id); - // TODO: test validations - } - - /** - * Update the email - * - * Updates the email. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateEmailTest() throws ApiException { - UUID id = null; - UpdateEmailInput updateEmailInput = null; - Email response = api.updateEmail(id, updateEmailInput); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/EventsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/EventsApiTest.java deleted file mode 100644 index e81cff63d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/EventsApiTest.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Event; -import com.equinix.openapi.metal.v1.model.EventList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for EventsApi - */ -@Disabled -public class EventsApiTest { - - private final EventsApi api = new EventsApi(); - - /** - * Retrieve device's events - * - * Returns a list of events pertaining to a specific device - * - * @throws ApiException if the Api call fails - */ - @Test - public void findDeviceEventsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - EventList response = api.findDeviceEvents(id, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve an event - * - * Returns a single event if the user has access - * - * @throws ApiException if the Api call fails - */ - @Test - public void findEventByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Event response = api.findEventById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve current user's events - * - * Returns a list of the current user’s events - * - * @throws ApiException if the Api call fails - */ - @Test - public void findEventsTest() throws ApiException { - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - EventList response = api.findEvents(include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve interconnection events - * - * Returns a list of the interconnection events - * - * @throws ApiException if the Api call fails - */ - @Test - public void findInterconnectionEventsTest() throws ApiException { - UUID connectionId = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - EventList response = api.findInterconnectionEvents(connectionId, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve interconnection port events - * - * Returns a list of the interconnection port events - * - * @throws ApiException if the Api call fails - */ - @Test - public void findInterconnectionPortEventsTest() throws ApiException { - UUID connectionId = null; - UUID id = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - Event response = api.findInterconnectionPortEvents(connectionId, id, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve organization's events - * - * Returns a list of events for a single organization - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationEventsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - EventList response = api.findOrganizationEvents(id, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve project's events - * - * Returns a list of events for a single project - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectEventsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - EventList response = api.findProjectEvents(id, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve virtual circuit events - * - * Returns a list of the virtual circuit events - * - * @throws ApiException if the Api call fails - */ - @Test - public void findVirtualCircuitEventsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - Event response = api.findVirtualCircuitEvents(id, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve VRF route events - * - * Returns a list of the VRF route events - * - * @throws ApiException if the Api call fails - */ - @Test - public void findVrfRouteEventsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - Event response = api.findVrfRouteEvents(id, include, exclude, page, perPage); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/FacilitiesApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/FacilitiesApiTest.java deleted file mode 100644 index d758f6916..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/FacilitiesApiTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FacilityList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FacilitiesApi - */ -@Disabled -public class FacilitiesApiTest { - - private final FacilitiesApi api = new FacilitiesApi(); - - /** - * Retrieve all facilities - * - * Provides a listing of available datacenters where you can provision Packet devices. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findFacilitiesTest() throws ApiException { - List include = null; - List exclude = null; - FacilityList response = api.findFacilities(include, exclude); - // TODO: test validations - } - - /** - * Retrieve all facilities visible by the organization - * - * Returns a listing of available datacenters for the given organization - * - * @throws ApiException if the Api call fails - */ - @Test - public void findFacilitiesByOrganizationTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - FacilityList response = api.findFacilitiesByOrganization(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all facilities visible by the project - * - * Returns a listing of available datacenters for the given project - * - * @throws ApiException if the Api call fails - */ - @Test - public void findFacilitiesByProjectTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - FacilityList response = api.findFacilitiesByProject(id, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/FirmwareSetsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/FirmwareSetsApiTest.java deleted file mode 100644 index ace67f9cb..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/FirmwareSetsApiTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FirmwareSetListResponse; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FirmwareSetsApi - */ -@Disabled -public class FirmwareSetsApiTest { - - private final FirmwareSetsApi api = new FirmwareSetsApi(); - - /** - * Get Organization's Firmware Sets - * - * Returns all firmware sets associated with the organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getOrganizationFirmwareSetsTest() throws ApiException { - UUID id = null; - Integer page = null; - Integer perPage = null; - FirmwareSetListResponse response = api.getOrganizationFirmwareSets(id, page, perPage); - // TODO: test validations - } - - /** - * Get Project's Firmware Sets - * - * Returns all firmware sets associated with the project or organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getProjectFirmwareSetsTest() throws ApiException { - UUID id = null; - Integer page = null; - Integer perPage = null; - FirmwareSetListResponse response = api.getProjectFirmwareSets(id, page, perPage); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApiTest.java deleted file mode 100644 index 5e9066271..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/HardwareReservationsApiTest.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.ActivateHardwareReservationRequest; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.HardwareReservation; -import com.equinix.openapi.metal.v1.model.HardwareReservationList; -import com.equinix.openapi.metal.v1.model.MoveHardwareReservationRequest; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for HardwareReservationsApi - */ -@Disabled -public class HardwareReservationsApiTest { - - private final HardwareReservationsApi api = new HardwareReservationsApi(); - - /** - * Activate a spare hardware reservation - * - * Activate a spare hardware reservation - * - * @throws ApiException if the Api call fails - */ - @Test - public void activateHardwareReservationTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - ActivateHardwareReservationRequest activateHardwareReservationRequest = null; - HardwareReservation response = api.activateHardwareReservation(id, include, exclude, activateHardwareReservationRequest); - // TODO: test validations - } - - /** - * Retrieve a hardware reservation - * - * Returns a single hardware reservation - * - * @throws ApiException if the Api call fails - */ - @Test - public void findHardwareReservationByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - HardwareReservation response = api.findHardwareReservationById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all hardware reservations for a given project - * - * Provides a collection of hardware reservations for a given project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectHardwareReservationsTest() throws ApiException { - UUID id = null; - String query = null; - String state = null; - String provisionable = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - HardwareReservationList response = api.findProjectHardwareReservations(id, query, state, provisionable, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Move a hardware reservation - * - * Move a hardware reservation to another project - * - * @throws ApiException if the Api call fails - */ - @Test - public void moveHardwareReservationTest() throws ApiException { - UUID id = null; - MoveHardwareReservationRequest moveHardwareReservationRequest = null; - List include = null; - List exclude = null; - HardwareReservation response = api.moveHardwareReservation(id, moveHardwareReservationRequest, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/IncidentsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/IncidentsApiTest.java deleted file mode 100644 index 8cd310694..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/IncidentsApiTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for IncidentsApi - */ -@Disabled -public class IncidentsApiTest { - - private final IncidentsApi api = new IncidentsApi(); - - /** - * Retrieve the number of incidents - * - * Retrieve the number of incidents. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findIncidentsTest() throws ApiException { - List include = null; - List exclude = null; - api.findIncidents(include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InterconnectionsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InterconnectionsApiTest.java deleted file mode 100644 index 3c8fa03cb..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InterconnectionsApiTest.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.CreateOrganizationInterconnectionRequest; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Interconnection; -import com.equinix.openapi.metal.v1.model.InterconnectionList; -import com.equinix.openapi.metal.v1.model.InterconnectionPort; -import com.equinix.openapi.metal.v1.model.InterconnectionPortList; -import com.equinix.openapi.metal.v1.model.InterconnectionUpdateInput; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.VirtualCircuit; -import com.equinix.openapi.metal.v1.model.VirtualCircuitCreateInput; -import com.equinix.openapi.metal.v1.model.VirtualCircuitList; -import com.equinix.openapi.metal.v1.model.VirtualCircuitUpdateInput; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for InterconnectionsApi - */ -@Disabled -public class InterconnectionsApiTest { - - private final InterconnectionsApi api = new InterconnectionsApi(); - - /** - * Create a new Virtual Circuit - * - * Create a new Virtual Circuit on a Dedicated Port. To create a regular Virtual Circuit, specify a Virtual Network record and an NNI VLAN value. To create a VRF-based Virtual Circuit, specify the VRF ID and subnet, along with the NNI VLAN value. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createInterconnectionPortVirtualCircuitTest() throws ApiException { - UUID connectionId = null; - UUID portId = null; - VirtualCircuitCreateInput virtualCircuitCreateInput = null; - VirtualCircuit response = api.createInterconnectionPortVirtualCircuit(connectionId, portId, virtualCircuitCreateInput); - // TODO: test validations - } - - /** - * Request a new interconnection for the organization - * - * Creates a new interconnection request. A Project ID must be specified in the request body for connections on shared ports. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createOrganizationInterconnectionTest() throws ApiException { - UUID organizationId = null; - CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest = null; - List include = null; - List exclude = null; - Interconnection response = api.createOrganizationInterconnection(organizationId, createOrganizationInterconnectionRequest, include, exclude); - // TODO: test validations - } - - /** - * Request a new interconnection for the project's organization - * - * Creates a new interconnection request - * - * @throws ApiException if the Api call fails - */ - @Test - public void createProjectInterconnectionTest() throws ApiException { - UUID projectId = null; - CreateOrganizationInterconnectionRequest createOrganizationInterconnectionRequest = null; - List include = null; - List exclude = null; - Interconnection response = api.createProjectInterconnection(projectId, createOrganizationInterconnectionRequest, include, exclude); - // TODO: test validations - } - - /** - * Delete interconnection - * - * Delete a interconnection, its associated ports and virtual circuits. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteInterconnectionTest() throws ApiException { - UUID connectionId = null; - List include = null; - List exclude = null; - Interconnection response = api.deleteInterconnection(connectionId, include, exclude); - // TODO: test validations - } - - /** - * Delete a virtual circuit - * - * Delete a virtual circuit from a Dedicated Port. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteVirtualCircuitTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - VirtualCircuit response = api.deleteVirtualCircuit(id, include, exclude); - // TODO: test validations - } - - /** - * Get interconnection - * - * Get the details of a interconnection - * - * @throws ApiException if the Api call fails - */ - @Test - public void getInterconnectionTest() throws ApiException { - UUID connectionId = null; - List include = null; - List exclude = null; - Interconnection response = api.getInterconnection(connectionId, include, exclude); - // TODO: test validations - } - - /** - * Get a interconnection port - * - * Get the details of an interconnection port. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getInterconnectionPortTest() throws ApiException { - UUID connectionId = null; - UUID id = null; - List include = null; - List exclude = null; - InterconnectionPort response = api.getInterconnectionPort(connectionId, id, include, exclude); - // TODO: test validations - } - - /** - * Get a virtual circuit - * - * Get the details of a virtual circuit - * - * @throws ApiException if the Api call fails - */ - @Test - public void getVirtualCircuitTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - VirtualCircuit response = api.getVirtualCircuit(id, include, exclude); - // TODO: test validations - } - - /** - * List a interconnection port's virtual circuits - * - * List the virtual circuit record(s) associatiated with a particular interconnection port. - * - * @throws ApiException if the Api call fails - */ - @Test - public void listInterconnectionPortVirtualCircuitsTest() throws ApiException { - UUID connectionId = null; - UUID portId = null; - List include = null; - List exclude = null; - VirtualCircuitList response = api.listInterconnectionPortVirtualCircuits(connectionId, portId, include, exclude); - // TODO: test validations - } - - /** - * List a interconnection's ports - * - * List the ports associated to an interconnection. - * - * @throws ApiException if the Api call fails - */ - @Test - public void listInterconnectionPortsTest() throws ApiException { - UUID connectionId = null; - InterconnectionPortList response = api.listInterconnectionPorts(connectionId); - // TODO: test validations - } - - /** - * List a interconnection's virtual circuits - * - * List the virtual circuit record(s) associated with a particular interconnection id. - * - * @throws ApiException if the Api call fails - */ - @Test - public void listInterconnectionVirtualCircuitsTest() throws ApiException { - UUID connectionId = null; - VirtualCircuitList response = api.listInterconnectionVirtualCircuits(connectionId); - // TODO: test validations - } - - /** - * List organization connections - * - * List the connections belonging to the organization - * - * @throws ApiException if the Api call fails - */ - @Test - public void organizationListInterconnectionsTest() throws ApiException { - UUID organizationId = null; - List include = null; - List exclude = null; - InterconnectionList response = api.organizationListInterconnections(organizationId, include, exclude); - // TODO: test validations - } - - /** - * List project connections - * - * List the connections belonging to the project - * - * @throws ApiException if the Api call fails - */ - @Test - public void projectListInterconnectionsTest() throws ApiException { - UUID projectId = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - InterconnectionList response = api.projectListInterconnections(projectId, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Update interconnection - * - * Update the details of a interconnection - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateInterconnectionTest() throws ApiException { - UUID connectionId = null; - InterconnectionUpdateInput interconnectionUpdateInput = null; - List include = null; - List exclude = null; - Interconnection response = api.updateInterconnection(connectionId, interconnectionUpdateInput, include, exclude); - // TODO: test validations - } - - /** - * Update a virtual circuit - * - * Update the details of a virtual circuit. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateVirtualCircuitTest() throws ApiException { - UUID id = null; - VirtualCircuitUpdateInput virtualCircuitUpdateInput = null; - List include = null; - List exclude = null; - VirtualCircuit response = api.updateVirtualCircuit(id, virtualCircuitUpdateInput, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InvitationsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InvitationsApiTest.java deleted file mode 100644 index bd442cd4b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InvitationsApiTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Invitation; -import com.equinix.openapi.metal.v1.model.Membership; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for InvitationsApi - */ -@Disabled -public class InvitationsApiTest { - - private final InvitationsApi api = new InvitationsApi(); - - /** - * Accept an invitation - * - * Accept an invitation. - * - * @throws ApiException if the Api call fails - */ - @Test - public void acceptInvitationTest() throws ApiException { - UUID id = null; - List include = null; - Membership response = api.acceptInvitation(id, include); - // TODO: test validations - } - - /** - * Decline an invitation - * - * Decline an invitation. - * - * @throws ApiException if the Api call fails - */ - @Test - public void declineInvitationTest() throws ApiException { - UUID id = null; - api.declineInvitation(id); - // TODO: test validations - } - - /** - * View an invitation - * - * Returns a single invitation. (It include the `invitable` to maintain backward compatibility but will be removed soon) - * - * @throws ApiException if the Api call fails - */ - @Test - public void findInvitationByIdTest() throws ApiException { - UUID id = null; - List include = null; - Invitation response = api.findInvitationById(id, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InvoicesApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InvoicesApiTest.java deleted file mode 100644 index 3b192dff4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/InvoicesApiTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Invoice; -import com.equinix.openapi.metal.v1.model.InvoiceList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for InvoicesApi - */ -@Disabled -public class InvoicesApiTest { - - private final InvoicesApi api = new InvoicesApi(); - - /** - * Retrieve all invoices for an organization - * - * Returns all invoices for an organization - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationInvoicesTest() throws ApiException { - UUID id = null; - Integer page = null; - Integer perPage = null; - String status = null; - InvoiceList response = api.findOrganizationInvoices(id, page, perPage, status); - // TODO: test validations - } - - /** - * Retrieve an invoice - * - * Returns the invoice identified by the provided id - * - * @throws ApiException if the Api call fails - */ - @Test - public void getInvoiceByIdTest() throws ApiException { - UUID id = null; - Invoice response = api.getInvoiceById(id); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/IpAddressesApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/IpAddressesApiTest.java deleted file mode 100644 index a11b81ea6..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/IpAddressesApiTest.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FindIPAddressById200Response; -import com.equinix.openapi.metal.v1.model.IPAssignmentUpdateInput; -import com.equinix.openapi.metal.v1.model.IPAvailabilitiesList; -import com.equinix.openapi.metal.v1.model.IPReservationList; -import com.equinix.openapi.metal.v1.model.RequestIPReservation201Response; -import com.equinix.openapi.metal.v1.model.RequestIPReservationRequest; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for IpAddressesApi - */ -@Disabled -public class IpAddressesApiTest { - - private final IpAddressesApi api = new IpAddressesApi(); - - /** - * Unassign an ip address - * - * This call can be used to un-assign an IP assignment or delete an IP reservation. Un-assign an IP address record. Use the assignment UUID you get after attaching the IP. This will remove the relationship between an IP and the device or metal gateway and will make the IP address available to be assigned to another device, once the IP has been un-configured from the network. Delete an IP reservation. Use the reservation UUID you get after adding the IP to the project. This will permanently delete the IP block reservation from the project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteIPAddressTest() throws ApiException { - UUID id = null; - api.deleteIPAddress(id); - // TODO: test validations - } - - /** - * Retrieve an ip address - * - * Returns a single ip address if the user has access. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findIPAddressByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - FindIPAddressById200Response response = api.findIPAddressById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve the custom metadata of an IP Reservation or IP Assignment - * - * Provides the custom metadata stored for this IP Reservation or IP Assignment in json format - * - * @throws ApiException if the Api call fails - */ - @Test - public void findIPAddressCustomdataTest() throws ApiException { - UUID id = null; - api.findIPAddressCustomdata(id); - // TODO: test validations - } - - /** - * Retrieve all available subnets of a particular reservation - * - * Provides a list of IP resevations for a single project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findIPAvailabilitiesTest() throws ApiException { - UUID id = null; - String cidr = null; - IPAvailabilitiesList response = api.findIPAvailabilities(id, cidr); - // TODO: test validations - } - - /** - * Retrieve all ip reservations - * - * Provides a paginated list of IP reservations for a single project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findIPReservationsTest() throws ApiException { - UUID id = null; - List types = null; - List include = null; - List exclude = null; - Integer perPage = null; - IPReservationList response = api.findIPReservations(id, types, include, exclude, perPage); - // TODO: test validations - } - - /** - * Requesting IP reservations - * - * Request more IP space for a project in order to have additional IP addresses to assign to devices. If the request is within the max quota, an IP reservation will be created. If the project will exceed its IP quota, a request will be submitted for review, and will return an IP Reservation with a `state` of `pending`. You can automatically have the request fail with HTTP status 422 instead of triggering the review process by providing the `fail_on_approval_required` parameter set to `true` in the request. - * - * @throws ApiException if the Api call fails - */ - @Test - public void requestIPReservationTest() throws ApiException { - UUID id = null; - RequestIPReservationRequest requestIPReservationRequest = null; - List include = null; - List exclude = null; - RequestIPReservation201Response response = api.requestIPReservation(id, requestIPReservationRequest, include, exclude); - // TODO: test validations - } - - /** - * Update an ip address - * - * Update details about an ip address - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateIPAddressTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - IPAssignmentUpdateInput ipAssignmentUpdateInput = null; - FindIPAddressById200Response response = api.updateIPAddress(id, include, exclude, ipAssignmentUpdateInput); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/LicensesApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/LicensesApiTest.java deleted file mode 100644 index 16bfb24c7..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/LicensesApiTest.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.License; -import com.equinix.openapi.metal.v1.model.LicenseCreateInput; -import com.equinix.openapi.metal.v1.model.LicenseList; -import com.equinix.openapi.metal.v1.model.LicenseUpdateInput; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for LicensesApi - */ -@Disabled -public class LicensesApiTest { - - private final LicensesApi api = new LicensesApi(); - - /** - * Create a License - * - * Creates a new license for the given project - * - * @throws ApiException if the Api call fails - */ - @Test - public void createLicenseTest() throws ApiException { - UUID id = null; - LicenseCreateInput licenseCreateInput = null; - List include = null; - List exclude = null; - License response = api.createLicense(id, licenseCreateInput, include, exclude); - // TODO: test validations - } - - /** - * Delete the license - * - * Deletes a license. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteLicenseTest() throws ApiException { - UUID id = null; - api.deleteLicense(id); - // TODO: test validations - } - - /** - * Retrieve a license - * - * Returns a license - * - * @throws ApiException if the Api call fails - */ - @Test - public void findLicenseByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - License response = api.findLicenseById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all licenses - * - * Provides a collection of licenses for a given project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectLicensesTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - LicenseList response = api.findProjectLicenses(id, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Update the license - * - * Updates the license. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateLicenseTest() throws ApiException { - UUID id = null; - LicenseUpdateInput licenseUpdateInput = null; - List include = null; - List exclude = null; - License response = api.updateLicense(id, licenseUpdateInput, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MembershipsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MembershipsApiTest.java deleted file mode 100644 index 0aaac59b6..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MembershipsApiTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Membership; -import com.equinix.openapi.metal.v1.model.MembershipInput; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for MembershipsApi - */ -@Disabled -public class MembershipsApiTest { - - private final MembershipsApi api = new MembershipsApi(); - - /** - * Delete the membership - * - * Deletes the membership. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteMembershipTest() throws ApiException { - UUID id = null; - api.deleteMembership(id); - // TODO: test validations - } - - /** - * Retrieve a membership - * - * Returns a single membership. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findMembershipByIdTest() throws ApiException { - UUID id = null; - List include = null; - Membership response = api.findMembershipById(id, include); - // TODO: test validations - } - - /** - * Update the membership - * - * Updates the membership. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateMembershipTest() throws ApiException { - UUID id = null; - MembershipInput membershipInput = null; - List include = null; - Membership response = api.updateMembership(id, membershipInput, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApiTest.java deleted file mode 100644 index 1b68daacd..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MetalGatewaysApiTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.CreateMetalGatewayRequest; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.FindMetalGatewayById200Response; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPAssignmentList; -import com.equinix.openapi.metal.v1.model.MetalGatewayElasticIpCreateInput; -import com.equinix.openapi.metal.v1.model.MetalGatewayList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for MetalGatewaysApi - */ -@Disabled -public class MetalGatewaysApiTest { - - private final MetalGatewaysApi api = new MetalGatewaysApi(); - - /** - * Create a metal gateway - * - * Create a metal gateway in a project - * - * @throws ApiException if the Api call fails - */ - @Test - public void createMetalGatewayTest() throws ApiException { - UUID projectId = null; - CreateMetalGatewayRequest createMetalGatewayRequest = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - FindMetalGatewayById200Response response = api.createMetalGateway(projectId, createMetalGatewayRequest, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Create a Metal Gateway Elastic IP - * - * Create a new Elastic IP on this Metal Gateway. Assign an IPv4 range as an elastic IP to the Metal Gateway, with a specified next-hop address contained within the Metal Gateway. Notice: Elastic IPs on Metal Gateways are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createMetalGatewayElasticIpTest() throws ApiException { - UUID id = null; - MetalGatewayElasticIpCreateInput metalGatewayElasticIpCreateInput = null; - List include = null; - List exclude = null; - IPAssignment response = api.createMetalGatewayElasticIp(id, metalGatewayElasticIpCreateInput, include, exclude); - // TODO: test validations - } - - /** - * Deletes the metal gateway - * - * Deletes a metal gateway and any elastic IP assignments associated with this metal gateway. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteMetalGatewayTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - FindMetalGatewayById200Response response = api.deleteMetalGateway(id, include, exclude); - // TODO: test validations - } - - /** - * Returns the metal gateway - * - * Returns a specific metal gateway - * - * @throws ApiException if the Api call fails - */ - @Test - public void findMetalGatewayByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - FindMetalGatewayById200Response response = api.findMetalGatewayById(id, include, exclude); - // TODO: test validations - } - - /** - * Returns all metal gateways for a project - * - * Return all metal gateways for a project - * - * @throws ApiException if the Api call fails - */ - @Test - public void findMetalGatewaysByProjectTest() throws ApiException { - UUID projectId = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - MetalGatewayList response = api.findMetalGatewaysByProject(projectId, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * List Metal Gateway Elastic IPs - * - * Returns the list of Elastic IPs assigned to this Metal Gateway - * - * @throws ApiException if the Api call fails - */ - @Test - public void getMetalGatewayElasticIpsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - IPAssignmentList response = api.getMetalGatewayElasticIps(id, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MetrosApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MetrosApiTest.java deleted file mode 100644 index 265b75ed9..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/MetrosApiTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.MetroList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for MetrosApi - */ -@Disabled -public class MetrosApiTest { - - private final MetrosApi api = new MetrosApi(); - - /** - * Retrieve all metros - * - * Provides a listing of available metros - * - * @throws ApiException if the Api call fails - */ - @Test - public void findMetrosTest() throws ApiException { - MetroList response = api.findMetros(); - // TODO: test validations - } - - /** - * Retrieve a specific Metro's details - * - * Show the details for a metro, including name, code, and country. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getMetroTest() throws ApiException { - UUID id = null; - Metro response = api.getMetro(id); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApiTest.java deleted file mode 100644 index da4e8c317..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OperatingSystemsApiTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.OperatingSystemList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for OperatingSystemsApi - */ -@Disabled -public class OperatingSystemsApiTest { - - private final OperatingSystemsApi api = new OperatingSystemsApi(); - - /** - * Retrieve all operating system versions - * - * Provides a listing of available operating system versions. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOperatingSystemVersionTest() throws ApiException { - OperatingSystemList response = api.findOperatingSystemVersion(); - // TODO: test validations - } - - /** - * Retrieve all operating systems - * - * Provides a listing of available operating systems to provision your new device with. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOperatingSystemsTest() throws ApiException { - OperatingSystemList response = api.findOperatingSystems(); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OrganizationsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OrganizationsApiTest.java deleted file mode 100644 index 49a5cd1c6..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OrganizationsApiTest.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Invitation; -import com.equinix.openapi.metal.v1.model.InvitationInput; -import com.equinix.openapi.metal.v1.model.InvitationList; -import com.equinix.openapi.metal.v1.model.OperatingSystemList; -import com.equinix.openapi.metal.v1.model.Organization; -import com.equinix.openapi.metal.v1.model.OrganizationInput; -import com.equinix.openapi.metal.v1.model.OrganizationList; -import com.equinix.openapi.metal.v1.model.PaymentMethod; -import com.equinix.openapi.metal.v1.model.PaymentMethodCreateInput; -import com.equinix.openapi.metal.v1.model.PaymentMethodList; -import com.equinix.openapi.metal.v1.model.PlanList; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.ProjectCreateInput; -import com.equinix.openapi.metal.v1.model.ProjectList; -import com.equinix.openapi.metal.v1.model.TransferRequestList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for OrganizationsApi - */ -@Disabled -public class OrganizationsApiTest { - - private final OrganizationsApi api = new OrganizationsApi(); - - /** - * Create an organization - * - * Creates an organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createOrganizationTest() throws ApiException { - OrganizationInput organizationInput = null; - List include = null; - List exclude = null; - Organization response = api.createOrganization(organizationInput, include, exclude); - // TODO: test validations - } - - /** - * Create an invitation for an organization - * - * In order to add a user to an organization, they must first be invited. To invite to several projects the parameter `projects_ids:[a,b,c]` can be used - * - * @throws ApiException if the Api call fails - */ - @Test - public void createOrganizationInvitationTest() throws ApiException { - UUID id = null; - InvitationInput invitationInput = null; - List include = null; - Invitation response = api.createOrganizationInvitation(id, invitationInput, include); - // TODO: test validations - } - - /** - * Create a project for the organization - * - * Creates a new project for the organization - * - * @throws ApiException if the Api call fails - */ - @Test - public void createOrganizationProjectTest() throws ApiException { - UUID id = null; - ProjectCreateInput projectCreateInput = null; - List include = null; - List exclude = null; - Project response = api.createOrganizationProject(id, projectCreateInput, include, exclude); - // TODO: test validations - } - - /** - * Create a payment method for the given organization - * - * Creates a payment method. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createPaymentMethodTest() throws ApiException { - UUID id = null; - PaymentMethodCreateInput paymentMethodCreateInput = null; - List include = null; - PaymentMethod response = api.createPaymentMethod(id, paymentMethodCreateInput, include); - // TODO: test validations - } - - /** - * Delete the organization - * - * Deletes the organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteOrganizationTest() throws ApiException { - UUID id = null; - api.deleteOrganization(id); - // TODO: test validations - } - - /** - * Retrieve all operating systems visible by the organization - * - * Returns a listing of available operating systems for the given organization - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOperatingSystemsByOrganizationTest() throws ApiException { - UUID id = null; - List include = null; - OperatingSystemList response = api.findOperatingSystemsByOrganization(id, include); - // TODO: test validations - } - - /** - * Retrieve an organization's details - * - * Returns a single organization's details, if the user is authorized to view it. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Organization response = api.findOrganizationById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve the custom metadata of an organization - * - * Provides the custom metadata stored for this organization in json format - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationCustomdataTest() throws ApiException { - UUID id = null; - api.findOrganizationCustomdata(id); - // TODO: test validations - } - - /** - * Retrieve organization invitations - * - * Returns all invitations in an organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationInvitationsTest() throws ApiException { - UUID id = null; - List include = null; - Integer page = null; - Integer perPage = null; - InvitationList response = api.findOrganizationInvitations(id, include, page, perPage); - // TODO: test validations - } - - /** - * Retrieve all payment methods of an organization - * - * Returns all payment methods of an organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationPaymentMethodsTest() throws ApiException { - UUID id = null; - List include = null; - Integer page = null; - Integer perPage = null; - PaymentMethodList response = api.findOrganizationPaymentMethods(id, include, page, perPage); - // TODO: test validations - } - - /** - * Retrieve all projects of an organization - * - * Returns a collection of projects that belong to the organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationProjectsTest() throws ApiException { - UUID id = null; - String name = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - ProjectList response = api.findOrganizationProjects(id, name, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve all project transfer requests from or to an organization - * - * Provides a collection of project transfer requests from or to the organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationTransfersTest() throws ApiException { - UUID id = null; - List include = null; - TransferRequestList response = api.findOrganizationTransfers(id, include); - // TODO: test validations - } - - /** - * Retrieve all organizations - * - * Returns a list of organizations that are accessible to the current user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findOrganizationsTest() throws ApiException { - String personal = null; - String withoutProjects = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - OrganizationList response = api.findOrganizations(personal, withoutProjects, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Retrieve all plans visible by the organization - * - * Returns a listing of available plans for the given organization - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPlansByOrganizationTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - PlanList response = api.findPlansByOrganization(id, include, exclude); - // TODO: test validations - } - - /** - * Update the organization - * - * Updates the organization. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateOrganizationTest() throws ApiException { - UUID id = null; - OrganizationInput organizationInput = null; - List include = null; - List exclude = null; - Organization response = api.updateOrganization(id, organizationInput, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OtpsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OtpsApiTest.java deleted file mode 100644 index 1ba9bdfe8..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/OtpsApiTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.RecoveryCodeList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for OtpsApi - */ -@Disabled -public class OtpsApiTest { - - private final OtpsApi api = new OtpsApi(); - - /** - * Verify user by providing an OTP - * - * It verifies the user once a valid OTP is provided. It gives back a session token, essentially logging in the user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findEnsureOtpTest() throws ApiException { - String otp = null; - api.findEnsureOtp(otp); - // TODO: test validations - } - - /** - * Retrieve my recovery codes - * - * Returns my recovery codes. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findRecoveryCodesTest() throws ApiException { - RecoveryCodeList response = api.findRecoveryCodes(); - // TODO: test validations - } - - /** - * Receive an OTP per sms - * - * Sends an OTP to the user's mobile phone. - * - * @throws ApiException if the Api call fails - */ - @Test - public void receiveCodesTest() throws ApiException { - api.receiveCodes(); - // TODO: test validations - } - - /** - * Generate new recovery codes - * - * Generate a new set of recovery codes. - * - * @throws ApiException if the Api call fails - */ - @Test - public void regenerateCodesTest() throws ApiException { - RecoveryCodeList response = api.regenerateCodes(); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApiTest.java deleted file mode 100644 index 43e27900b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PasswordResetTokensApiTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.NewPassword; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PasswordResetTokensApi - */ -@Disabled -public class PasswordResetTokensApiTest { - - private final PasswordResetTokensApi api = new PasswordResetTokensApi(); - - /** - * Create a password reset token - * - * Creates a password reset token - * - * @throws ApiException if the Api call fails - */ - @Test - public void createPasswordResetTokenTest() throws ApiException { - String email = null; - api.createPasswordResetToken(email); - // TODO: test validations - } - - /** - * Reset current user password - * - * Resets current user password. - * - * @throws ApiException if the Api call fails - */ - @Test - public void resetPasswordTest() throws ApiException { - NewPassword response = api.resetPassword(); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApiTest.java deleted file mode 100644 index fdb6b5da9..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PaymentMethodsApiTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.PaymentMethod; -import com.equinix.openapi.metal.v1.model.PaymentMethodUpdateInput; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PaymentMethodsApi - */ -@Disabled -public class PaymentMethodsApiTest { - - private final PaymentMethodsApi api = new PaymentMethodsApi(); - - /** - * Delete the payment method - * - * Deletes the payment method. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deletePaymentMethodTest() throws ApiException { - UUID id = null; - api.deletePaymentMethod(id); - // TODO: test validations - } - - /** - * Retrieve a payment method - * - * Returns a payment method - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPaymentMethodByIdTest() throws ApiException { - UUID id = null; - List include = null; - PaymentMethod response = api.findPaymentMethodById(id, include); - // TODO: test validations - } - - /** - * Update the payment method - * - * Updates the payment method. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updatePaymentMethodTest() throws ApiException { - UUID id = null; - PaymentMethodUpdateInput paymentMethodUpdateInput = null; - List include = null; - PaymentMethod response = api.updatePaymentMethod(id, paymentMethodUpdateInput, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PlansApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PlansApiTest.java deleted file mode 100644 index cde5c8392..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PlansApiTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.PlanList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PlansApi - */ -@Disabled -public class PlansApiTest { - - private final PlansApi api = new PlansApi(); - - /** - * Retrieve all plans - * - * Provides a listing of available plans to provision your device on. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPlansTest() throws ApiException { - List categories = null; - String type = null; - String slug = null; - List include = null; - List exclude = null; - PlanList response = api.findPlans(categories, type, slug, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all plans visible by the project - * - * Returns a listing of available plans for the given project - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPlansByProjectTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - PlanList response = api.findPlansByProject(id, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PortsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PortsApiTest.java deleted file mode 100644 index a209f8208..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/PortsApiTest.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Port; -import com.equinix.openapi.metal.v1.model.PortAssignInput; -import com.equinix.openapi.metal.v1.model.PortConvertLayer3Input; -import com.equinix.openapi.metal.v1.model.PortVlanAssignment; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatch; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchCreateInput; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchList; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PortsApi - */ -@Disabled -public class PortsApiTest { - - private final PortsApi api = new PortsApi(); - - /** - * Assign a native VLAN - * - * Sets a virtual network on this port as a \"native VLAN\". The VLAN must have already been assigned using the using the \"Assign a port to a virtual network\" operation. - * - * @throws ApiException if the Api call fails - */ - @Test - public void assignNativeVlanTest() throws ApiException { - UUID id = null; - String vnid = null; - List include = null; - Port response = api.assignNativeVlan(id, vnid, include); - // TODO: test validations - } - - /** - * Assign a port to virtual network - * - * Assign a hardware port to a virtual network. - * - * @throws ApiException if the Api call fails - */ - @Test - public void assignPortTest() throws ApiException { - UUID id = null; - PortAssignInput portAssignInput = null; - List include = null; - Port response = api.assignPort(id, portAssignInput, include); - // TODO: test validations - } - - /** - * Enabling bonding - * - * Enabling bonding for one or all ports - * - * @throws ApiException if the Api call fails - */ - @Test - public void bondPortTest() throws ApiException { - UUID id = null; - Boolean bulkEnable = null; - List include = null; - Port response = api.bondPort(id, bulkEnable, include); - // TODO: test validations - } - - /** - * Convert to Layer 2 - * - * Converts a bond port to Layer 2. IP assignments of the port will be removed. - * - * @throws ApiException if the Api call fails - */ - @Test - public void convertLayer2Test() throws ApiException { - UUID id = null; - PortAssignInput portAssignInput = null; - List include = null; - Port response = api.convertLayer2(id, portAssignInput, include); - // TODO: test validations - } - - /** - * Convert to Layer 3 - * - * Converts a bond port to Layer 3. VLANs must first be unassigned. - * - * @throws ApiException if the Api call fails - */ - @Test - public void convertLayer3Test() throws ApiException { - UUID id = null; - List include = null; - PortConvertLayer3Input portConvertLayer3Input = null; - Port response = api.convertLayer3(id, include, portConvertLayer3Input); - // TODO: test validations - } - - /** - * Create a new Port-VLAN Assignment management batch - * - * Create a new asynchronous batch request which handles adding and/or removing the VLANs to which the port is assigned. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createPortVlanAssignmentBatchTest() throws ApiException { - UUID id = null; - PortVlanAssignmentBatchCreateInput portVlanAssignmentBatchCreateInput = null; - List include = null; - PortVlanAssignmentBatch response = api.createPortVlanAssignmentBatch(id, portVlanAssignmentBatchCreateInput, include); - // TODO: test validations - } - - /** - * Remove native VLAN - * - * Removes the native VLAN from this port - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteNativeVlanTest() throws ApiException { - UUID id = null; - List include = null; - Port response = api.deleteNativeVlan(id, include); - // TODO: test validations - } - - /** - * Disabling bonding - * - * Disabling bonding for one or all ports - * - * @throws ApiException if the Api call fails - */ - @Test - public void disbondPortTest() throws ApiException { - UUID id = null; - Boolean bulkDisable = null; - List include = null; - Port response = api.disbondPort(id, bulkDisable, include); - // TODO: test validations - } - - /** - * Retrieve a port - * - * Returns a port - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPortByIdTest() throws ApiException { - UUID id = null; - List include = null; - Port response = api.findPortById(id, include); - // TODO: test validations - } - - /** - * Retrieve a VLAN Assignment Batch's details - * - * Returns the details of an existing Port-VLAN Assignment batch, including the list of VLANs to assign or unassign, and the current state of the batch. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPortVlanAssignmentBatchByPortIdAndBatchIdTest() throws ApiException { - UUID id = null; - UUID batchId = null; - List include = null; - PortVlanAssignmentBatch response = api.findPortVlanAssignmentBatchByPortIdAndBatchId(id, batchId, include); - // TODO: test validations - } - - /** - * List the VLAN Assignment Batches for a port - * - * Show all the VLAN assignment batches that have been created for managing this port's VLAN assignments - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPortVlanAssignmentBatchesTest() throws ApiException { - UUID id = null; - PortVlanAssignmentBatchList response = api.findPortVlanAssignmentBatches(id); - // TODO: test validations - } - - /** - * Show a particular Port VLAN assignment's details - * - * Show the details of a specific Port-VLAN assignment, including the current state and if the VLAN is set as native. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPortVlanAssignmentByPortIdAndAssignmentIdTest() throws ApiException { - UUID id = null; - UUID assignmentId = null; - List include = null; - PortVlanAssignment response = api.findPortVlanAssignmentByPortIdAndAssignmentId(id, assignmentId, include); - // TODO: test validations - } - - /** - * List Current VLAN assignments for a port - * - * Show the port's current VLAN assignments, including if this VLAN is set as native, and the current state of the assignment (ex. 'assigned' or 'unassigning') - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPortVlanAssignmentsTest() throws ApiException { - UUID id = null; - List include = null; - PortVlanAssignmentList response = api.findPortVlanAssignments(id, include); - // TODO: test validations - } - - /** - * Unassign a port - * - * Unassign a port for a hardware. - * - * @throws ApiException if the Api call fails - */ - @Test - public void unassignPortTest() throws ApiException { - UUID id = null; - PortAssignInput portAssignInput = null; - List include = null; - Port response = api.unassignPort(id, portAssignInput, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/ProjectsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/ProjectsApiTest.java deleted file mode 100644 index 3ed59ec2c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/ProjectsApiTest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.Invitation; -import com.equinix.openapi.metal.v1.model.InvitationInput; -import com.equinix.openapi.metal.v1.model.InvitationList; -import com.equinix.openapi.metal.v1.model.MembershipList; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.ProjectCreateFromRootInput; -import com.equinix.openapi.metal.v1.model.ProjectList; -import com.equinix.openapi.metal.v1.model.ProjectUpdateInput; -import com.equinix.openapi.metal.v1.model.TransferRequest; -import com.equinix.openapi.metal.v1.model.TransferRequestInput; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ProjectsApi - */ -@Disabled -public class ProjectsApiTest { - - private final ProjectsApi api = new ProjectsApi(); - - /** - * Create a project - * - * Creates a new project for the user default organization. If the user don't have an organization, a new one will be created. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createProjectTest() throws ApiException { - ProjectCreateFromRootInput projectCreateFromRootInput = null; - List include = null; - List exclude = null; - Project response = api.createProject(projectCreateFromRootInput, include, exclude); - // TODO: test validations - } - - /** - * Create an invitation for a project - * - * In order to add a user to a project, they must first be invited. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createProjectInvitationTest() throws ApiException { - UUID projectId = null; - InvitationInput invitationInput = null; - List include = null; - Invitation response = api.createProjectInvitation(projectId, invitationInput, include); - // TODO: test validations - } - - /** - * Create a transfer request - * - * Organization owners can transfer their projects to other organizations. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createTransferRequestTest() throws ApiException { - UUID id = null; - TransferRequestInput transferRequestInput = null; - List include = null; - TransferRequest response = api.createTransferRequest(id, transferRequestInput, include); - // TODO: test validations - } - - /** - * Delete the project - * - * Deletes the project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteProjectTest() throws ApiException { - UUID id = null; - api.deleteProject(id); - // TODO: test validations - } - - /** - * Retrieve the custom metadata of an IP Reservation - * - * Provides the custom metadata stored for this IP Reservation in json format - * - * @throws ApiException if the Api call fails - */ - @Test - public void findIPReservationCustomdataTest() throws ApiException { - UUID projectId = null; - UUID id = null; - api.findIPReservationCustomdata(projectId, id); - // TODO: test validations - } - - /** - * Retrieve a project - * - * Returns a single project if the user has access - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Project response = api.findProjectById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve the custom metadata of a project - * - * Provides the custom metadata stored for this project in json format - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectCustomdataTest() throws ApiException { - UUID id = null; - api.findProjectCustomdata(id); - // TODO: test validations - } - - /** - * Retrieve project invitations - * - * Returns all invitations in a project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectInvitationsTest() throws ApiException { - UUID projectId = null; - List include = null; - Integer page = null; - Integer perPage = null; - InvitationList response = api.findProjectInvitations(projectId, include, page, perPage); - // TODO: test validations - } - - /** - * Retrieve project memberships - * - * Returns all memberships in a project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectMembershipsTest() throws ApiException { - UUID projectId = null; - String search = null; - List include = null; - Integer page = null; - Integer perPage = null; - MembershipList response = api.findProjectMemberships(projectId, search, include, page, perPage); - // TODO: test validations - } - - /** - * Retrieve all projects - * - * Returns a collection of projects that the current user is a member of. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectsTest() throws ApiException { - String name = null; - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - ProjectList response = api.findProjects(name, include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Update the project - * - * Updates the project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateProjectTest() throws ApiException { - UUID id = null; - ProjectUpdateInput projectUpdateInput = null; - List include = null; - List exclude = null; - Project response = api.updateProject(id, projectUpdateInput, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApiTest.java deleted file mode 100644 index 5e5ae3187..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SelfServiceReservationsApiTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.CreateSelfServiceReservationRequest; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationList; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationResponse; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for SelfServiceReservationsApi - */ -@Disabled -public class SelfServiceReservationsApiTest { - - private final SelfServiceReservationsApi api = new SelfServiceReservationsApi(); - - /** - * Create a reservation - * - * Creates a reservation. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createSelfServiceReservationTest() throws ApiException { - UUID projectId = null; - CreateSelfServiceReservationRequest createSelfServiceReservationRequest = null; - SelfServiceReservationResponse response = api.createSelfServiceReservation(projectId, createSelfServiceReservationRequest); - // TODO: test validations - } - - /** - * Retrieve a reservation - * - * Returns a reservation - * - * @throws ApiException if the Api call fails - */ - @Test - public void findSelfServiceReservationTest() throws ApiException { - UUID id = null; - UUID projectId = null; - SelfServiceReservationResponse response = api.findSelfServiceReservation(id, projectId); - // TODO: test validations - } - - /** - * Retrieve all reservations - * - * Returns all reservations. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findSelfServiceReservationsTest() throws ApiException { - UUID projectId = null; - Integer page = null; - Integer perPage = null; - List categories = null; - SelfServiceReservationList response = api.findSelfServiceReservations(projectId, page, perPage, categories); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SpotMarketApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SpotMarketApiTest.java deleted file mode 100644 index d06d07bf7..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SpotMarketApiTest.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.SpotMarketPricesList; -import com.equinix.openapi.metal.v1.model.SpotMarketPricesPerMetroList; -import com.equinix.openapi.metal.v1.model.SpotMarketRequest; -import com.equinix.openapi.metal.v1.model.SpotMarketRequestCreateInput; -import com.equinix.openapi.metal.v1.model.SpotMarketRequestList; -import com.equinix.openapi.metal.v1.model.SpotPricesHistoryReport; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for SpotMarketApi - */ -@Disabled -public class SpotMarketApiTest { - - private final SpotMarketApi api = new SpotMarketApi(); - - /** - * Create a spot market request - * - * Creates a new spot market request. Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan. The features attribute allows you to optionally specify what features your server should have. For example, if you require a server with a TPM chip, you may specify `{ \"features\": { \"tpm\": \"required\" } }` (or `{ \"features\": [\"tpm\"] }` in shorthand). The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below). The request will not fail if we have no servers with that feature in our inventory. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createSpotMarketRequestTest() throws ApiException { - UUID id = null; - SpotMarketRequestCreateInput spotMarketRequestCreateInput = null; - SpotMarketRequest response = api.createSpotMarketRequest(id, spotMarketRequestCreateInput); - // TODO: test validations - } - - /** - * Delete the spot market request - * - * Deletes the spot market request. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteSpotMarketRequestTest() throws ApiException { - UUID id = null; - Boolean forceTermination = null; - api.deleteSpotMarketRequest(id, forceTermination); - // TODO: test validations - } - - /** - * Get current spot market prices for metros - * - * Get Equinix Metal current spot market prices for all metros. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findMetroSpotMarketPricesTest() throws ApiException { - String metro = null; - String plan = null; - SpotMarketPricesPerMetroList response = api.findMetroSpotMarketPrices(metro, plan); - // TODO: test validations - } - - /** - * Get current spot market prices - * - * Get Equinix Metal current spot market prices. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findSpotMarketPricesTest() throws ApiException { - String facility = null; - String plan = null; - SpotMarketPricesList response = api.findSpotMarketPrices(facility, plan); - // TODO: test validations - } - - /** - * Get spot market prices for a given period of time - * - * Get spot market prices for a given plan and facility in a fixed period of time *Note: In the `200` response, the property `datapoints` contains arrays of `[float, integer]`.* - * - * @throws ApiException if the Api call fails - */ - @Test - public void findSpotMarketPricesHistoryTest() throws ApiException { - String facility = null; - String plan = null; - String from = null; - String until = null; - String metro = null; - SpotPricesHistoryReport response = api.findSpotMarketPricesHistory(facility, plan, from, until, metro); - // TODO: test validations - } - - /** - * Retrieve a spot market request - * - * Returns a single spot market request - * - * @throws ApiException if the Api call fails - */ - @Test - public void findSpotMarketRequestByIdTest() throws ApiException { - UUID id = null; - List include = null; - SpotMarketRequest response = api.findSpotMarketRequestById(id, include); - // TODO: test validations - } - - /** - * List spot market requests - * - * View all spot market requests for a given project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void listSpotMarketRequestsTest() throws ApiException { - UUID id = null; - SpotMarketRequestList response = api.listSpotMarketRequests(id); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SshKeysApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SshKeysApiTest.java deleted file mode 100644 index 6d49fb864..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SshKeysApiTest.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.SSHKey; -import com.equinix.openapi.metal.v1.model.SSHKeyCreateInput; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.SSHKeyList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for SshKeysApi - */ -@Disabled -public class SshKeysApiTest { - - private final SshKeysApi api = new SshKeysApi(); - - /** - * Create a ssh key for the given project - * - * Creates a ssh key. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createProjectSSHKeyTest() throws ApiException { - UUID id = null; - SSHKeyCreateInput ssHKeyCreateInput = null; - List include = null; - SSHKey response = api.createProjectSSHKey(id, ssHKeyCreateInput, include); - // TODO: test validations - } - - /** - * Create a ssh key for the current user - * - * Creates a ssh key. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createSSHKeyTest() throws ApiException { - SSHKeyCreateInput ssHKeyCreateInput = null; - List include = null; - SSHKey response = api.createSSHKey(ssHKeyCreateInput, include); - // TODO: test validations - } - - /** - * Delete the ssh key - * - * Deletes the ssh key. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteSSHKeyTest() throws ApiException { - UUID id = null; - api.deleteSSHKey(id); - // TODO: test validations - } - - /** - * Retrieve a device's ssh keys - * - * Returns a collection of the device's ssh keys. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findDeviceSSHKeysTest() throws ApiException { - UUID id = null; - String searchString = null; - List include = null; - SSHKeyList response = api.findDeviceSSHKeys(id, searchString, include); - // TODO: test validations - } - - /** - * Retrieve a project's ssh keys - * - * Returns a collection of the project's ssh keys. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectSSHKeysTest() throws ApiException { - UUID id = null; - String query = null; - List include = null; - SSHKeyList response = api.findProjectSSHKeys(id, query, include); - // TODO: test validations - } - - /** - * Retrieve a ssh key - * - * Returns a single ssh key if the user has access - * - * @throws ApiException if the Api call fails - */ - @Test - public void findSSHKeyByIdTest() throws ApiException { - UUID id = null; - List include = null; - SSHKey response = api.findSSHKeyById(id, include); - // TODO: test validations - } - - /** - * Retrieve all ssh keys - * - * Returns a collection of the user’s ssh keys. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findSSHKeysTest() throws ApiException { - String search = null; - List include = null; - SSHKeyList response = api.findSSHKeys(search, include); - // TODO: test validations - } - - /** - * Update the ssh key - * - * Updates the ssh key. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateSSHKeyTest() throws ApiException { - UUID id = null; - SSHKeyInput ssHKeyInput = null; - List include = null; - SSHKey response = api.updateSSHKey(id, ssHKeyInput, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SupportRequestApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SupportRequestApiTest.java deleted file mode 100644 index 118f3928c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/SupportRequestApiTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.SupportRequestInput; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for SupportRequestApi - */ -@Disabled -public class SupportRequestApiTest { - - private final SupportRequestApi api = new SupportRequestApi(); - - /** - * Create a support ticket - * - * Support Ticket. - * - * @throws ApiException if the Api call fails - */ - @Test - public void requestSuppertTest() throws ApiException { - SupportRequestInput supportRequestInput = null; - api.requestSuppert(supportRequestInput); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/TransferRequestsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/TransferRequestsApiTest.java deleted file mode 100644 index af1450e59..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/TransferRequestsApiTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.TransferRequest; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for TransferRequestsApi - */ -@Disabled -public class TransferRequestsApiTest { - - private final TransferRequestsApi api = new TransferRequestsApi(); - - /** - * Accept a transfer request - * - * Accept a transfer request. - * - * @throws ApiException if the Api call fails - */ - @Test - public void acceptTransferRequestTest() throws ApiException { - UUID id = null; - api.acceptTransferRequest(id); - // TODO: test validations - } - - /** - * Decline a transfer request - * - * Decline a transfer request. - * - * @throws ApiException if the Api call fails - */ - @Test - public void declineTransferRequestTest() throws ApiException { - UUID id = null; - api.declineTransferRequest(id); - // TODO: test validations - } - - /** - * View a transfer request - * - * Returns a single transfer request. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findTransferRequestByIdTest() throws ApiException { - UUID id = null; - List include = null; - TransferRequest response = api.findTransferRequestById(id, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApiTest.java deleted file mode 100644 index dd354df82..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/TwoFactorAuthApiTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for TwoFactorAuthApi - */ -@Disabled -public class TwoFactorAuthApiTest { - - private final TwoFactorAuthApi api = new TwoFactorAuthApi(); - - /** - * Disable two factor authentication - * - * Disables two factor authentication. - * - * @throws ApiException if the Api call fails - */ - @Test - public void disableTfaAppTest() throws ApiException { - api.disableTfaApp(); - // TODO: test validations - } - - /** - * Disable two factor authentication - * - * Disables two factor authentication. - * - * @throws ApiException if the Api call fails - */ - @Test - public void disableTfaSmsTest() throws ApiException { - api.disableTfaSms(); - // TODO: test validations - } - - /** - * Enable two factor auth using app - * - * Enables two factor authentication using authenticator app. - * - * @throws ApiException if the Api call fails - */ - @Test - public void enableTfaAppTest() throws ApiException { - api.enableTfaApp(); - // TODO: test validations - } - - /** - * Enable two factor auth using sms - * - * Enables two factor authentication with sms. - * - * @throws ApiException if the Api call fails - */ - @Test - public void enableTfaSmsTest() throws ApiException { - api.enableTfaSms(); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UsagesApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UsagesApiTest.java deleted file mode 100644 index 121082d18..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UsagesApiTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.DeviceUsageList; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.ProjectUsageList; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UsagesApi - */ -@Disabled -public class UsagesApiTest { - - private final UsagesApi api = new UsagesApi(); - - /** - * Retrieve all usages for device - * - * Returns all usages for a device. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findDeviceUsagesTest() throws ApiException { - UUID id = null; - String createdAfter = null; - String createdBefore = null; - DeviceUsageList response = api.findDeviceUsages(id, createdAfter, createdBefore); - // TODO: test validations - } - - /** - * Retrieve all usages for project - * - * Returns all usages for a project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findProjectUsageTest() throws ApiException { - UUID id = null; - String createdAfter = null; - String createdBefore = null; - ProjectUsageList response = api.findProjectUsage(id, createdAfter, createdBefore); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApiTest.java deleted file mode 100644 index 0cda6eb22..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UserVerificationTokensApiTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.VerifyEmail; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserVerificationTokensApi - */ -@Disabled -public class UserVerificationTokensApiTest { - - private final UserVerificationTokensApi api = new UserVerificationTokensApi(); - - /** - * Verify a user using an email verification token - * - * Consumes an email verification token and verifies the user associated with it. - * - * @throws ApiException if the Api call fails - */ - @Test - public void consumeVerificationRequestTest() throws ApiException { - VerifyEmail verifyEmail = null; - List include = null; - api.consumeVerificationRequest(verifyEmail, include); - // TODO: test validations - } - - /** - * Create an email verification request - * - * Creates an email verification request - * - * @throws ApiException if the Api call fails - */ - @Test - public void createValidationRequestTest() throws ApiException { - String login = null; - List include = null; - api.createValidationRequest(login, include); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UserdataApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UserdataApiTest.java deleted file mode 100644 index e32497460..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UserdataApiTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserdataApi - */ -@Disabled -public class UserdataApiTest { - - private final UserdataApi api = new UserdataApi(); - - /** - * Validate user data - * - * Validates user data (Userdata) - * - * @throws ApiException if the Api call fails - */ - @Test - public void validateUserdataTest() throws ApiException { - String userdata = null; - api.validateUserdata(userdata); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UsersApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UsersApiTest.java deleted file mode 100644 index 619d3fc60..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/UsersApiTest.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import com.equinix.openapi.metal.v1.model.InvitationList; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.User; -import com.equinix.openapi.metal.v1.model.UserCreateInput; -import com.equinix.openapi.metal.v1.model.UserList; -import com.equinix.openapi.metal.v1.model.UserUpdateInput; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UsersApi - */ -@Disabled -public class UsersApiTest { - - private final UsersApi api = new UsersApi(); - - /** - * Create a user - * - * Creates a user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createUserTest() throws ApiException { - UserCreateInput userCreateInput = null; - List include = null; - List exclude = null; - User response = api.createUser(userCreateInput, include, exclude); - // TODO: test validations - } - - /** - * Retrieve the current user - * - * Returns the user object for the currently logged-in user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findCurrentUserTest() throws ApiException { - List include = null; - List exclude = null; - User response = api.findCurrentUser(include, exclude); - // TODO: test validations - } - - /** - * Retrieve current user invitations - * - * Returns all invitations in current user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findInvitationsTest() throws ApiException { - List include = null; - Integer page = null; - Integer perPage = null; - InvitationList response = api.findInvitations(include, page, perPage); - // TODO: test validations - } - - /** - * Retrieve a user - * - * Returns a single user if the user has access - * - * @throws ApiException if the Api call fails - */ - @Test - public void findUserByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - User response = api.findUserById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve the custom metadata of a user - * - * Provides the custom metadata stored for this user in json format - * - * @throws ApiException if the Api call fails - */ - @Test - public void findUserCustomdataTest() throws ApiException { - UUID id = null; - api.findUserCustomdata(id); - // TODO: test validations - } - - /** - * Retrieve all users - * - * Returns a list of users that the are accessible to the current user (all users in the current user’s projects, essentially). - * - * @throws ApiException if the Api call fails - */ - @Test - public void findUsersTest() throws ApiException { - List include = null; - List exclude = null; - Integer page = null; - Integer perPage = null; - UserList response = api.findUsers(include, exclude, page, perPage); - // TODO: test validations - } - - /** - * Update the current user - * - * Updates the currently logged-in user. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateCurrentUserTest() throws ApiException { - UserUpdateInput userUpdateInput = null; - List include = null; - List exclude = null; - User response = api.updateCurrentUser(userUpdateInput, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/VlansApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/VlansApiTest.java deleted file mode 100644 index 2c4ed78ec..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/VlansApiTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.VirtualNetworkCreateInput; -import com.equinix.openapi.metal.v1.model.VirtualNetworkList; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for VlansApi - */ -@Disabled -public class VlansApiTest { - - private final VlansApi api = new VlansApi(); - - /** - * Create a virtual network - * - * Creates an virtual network. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createVirtualNetworkTest() throws ApiException { - UUID id = null; - VirtualNetworkCreateInput virtualNetworkCreateInput = null; - List include = null; - List exclude = null; - VirtualNetwork response = api.createVirtualNetwork(id, virtualNetworkCreateInput, include, exclude); - // TODO: test validations - } - - /** - * Delete a virtual network - * - * Deletes a virtual network. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteVirtualNetworkTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - VirtualNetwork response = api.deleteVirtualNetwork(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all virtual networks - * - * Provides a list of virtual networks for a single project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findVirtualNetworksTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - String facility = null; - String metro = null; - VirtualNetworkList response = api.findVirtualNetworks(id, include, exclude, facility, metro); - // TODO: test validations - } - - /** - * Get a virtual network - * - * Get a virtual network. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getVirtualNetworkTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - VirtualNetwork response = api.getVirtualNetwork(id, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/VrfsApiTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/VrfsApiTest.java deleted file mode 100644 index 1dfbc6d20..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/api/VrfsApiTest.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.api; - -import com.equinix.openapi.ApiException; -import com.equinix.openapi.metal.v1.model.BgpDynamicNeighbor; -import com.equinix.openapi.metal.v1.model.BgpDynamicNeighborCreateInput; -import com.equinix.openapi.metal.v1.model.BgpDynamicNeighborList; -import com.equinix.openapi.metal.v1.model.Error; -import java.util.UUID; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfCreateInput; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.equinix.openapi.metal.v1.model.VrfIpReservationList; -import com.equinix.openapi.metal.v1.model.VrfList; -import com.equinix.openapi.metal.v1.model.VrfRoute; -import com.equinix.openapi.metal.v1.model.VrfRouteCreateInput; -import com.equinix.openapi.metal.v1.model.VrfRouteList; -import com.equinix.openapi.metal.v1.model.VrfRouteUpdateInput; -import com.equinix.openapi.metal.v1.model.VrfUpdateInput; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for VrfsApi - */ -@Disabled -public class VrfsApiTest { - - private final VrfsApi api = new VrfsApi(); - - /** - * Retrieve a BGP Dynamic Neighbor - * - * Return a single BGP Dynamic Neighbor resource - * - * @throws ApiException if the Api call fails - */ - @Test - public void bgpDynamicNeighborsIdGetTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - BgpDynamicNeighbor response = api.bgpDynamicNeighborsIdGet(id, include, exclude); - // TODO: test validations - } - - /** - * Create a VRF BGP Dynamic Neighbor range - * - * Create a VRF BGP Dynamic Neighbor range. BGP Dynamic Neighbor records are limited to 2 per Virtual Network. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createBgpDynamicNeighborTest() throws ApiException { - UUID id = null; - BgpDynamicNeighborCreateInput bgpDynamicNeighborCreateInput = null; - List include = null; - List exclude = null; - BgpDynamicNeighbor response = api.createBgpDynamicNeighbor(id, bgpDynamicNeighborCreateInput, include, exclude); - // TODO: test validations - } - - /** - * Create a new VRF in the specified project - * - * Creates a new VRF in the specified project - * - * @throws ApiException if the Api call fails - */ - @Test - public void createVrfTest() throws ApiException { - UUID id = null; - VrfCreateInput vrfCreateInput = null; - List include = null; - List exclude = null; - Vrf response = api.createVrf(id, vrfCreateInput, include, exclude); - // TODO: test validations - } - - /** - * Create a VRF route - * - * Create a route in a VRF. Currently only static default routes are supported. Notice: VRFs are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createVrfRouteTest() throws ApiException { - UUID id = null; - VrfRouteCreateInput vrfRouteCreateInput = null; - List include = null; - List exclude = null; - VrfRoute response = api.createVrfRoute(id, vrfRouteCreateInput, include, exclude); - // TODO: test validations - } - - /** - * Delete a VRF BGP Dynamic Neighbor - * - * Trigger the removal of a BGP Neighbor range from a VRF - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteBgpDynamicNeighborByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - BgpDynamicNeighbor response = api.deleteBgpDynamicNeighborById(id, include, exclude); - // TODO: test validations - } - - /** - * Delete the VRF - * - * Deletes the VRF - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteVrfTest() throws ApiException { - UUID id = null; - api.deleteVrf(id); - // TODO: test validations - } - - /** - * Delete a VRF Route - * - * Trigger the deletion of a VRF Route resource. The status of the route will update to 'deleting', and the route resource will remain accessible while background operations remove the route from the network. Once the route has been removed from the network, the resource will be fully deleted. - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteVrfRouteByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - VrfRoute response = api.deleteVrfRouteById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve a VRF - * - * Returns a single VRF resource - * - * @throws ApiException if the Api call fails - */ - @Test - public void findVrfByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - Vrf response = api.findVrfById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all VRF IP Reservations in the VRF - * - * Returns the IP Reservation for the VRF. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findVrfIpReservationTest() throws ApiException { - UUID vrfId = null; - UUID id = null; - List include = null; - List exclude = null; - VrfIpReservation response = api.findVrfIpReservation(vrfId, id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all VRF IP Reservations in the VRF - * - * Returns the list of VRF IP Reservations for the VRF. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findVrfIpReservationsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - VrfIpReservationList response = api.findVrfIpReservations(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve a VRF Route - * - * Returns a single VRF Route resource - * - * @throws ApiException if the Api call fails - */ - @Test - public void findVrfRouteByIdTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - VrfRoute response = api.findVrfRouteById(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all VRFs in the project - * - * Returns the list of VRFs for a single project. - * - * @throws ApiException if the Api call fails - */ - @Test - public void findVrfsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - String metro = null; - VrfList response = api.findVrfs(id, include, exclude, metro); - // TODO: test validations - } - - /** - * List BGP Dynamic Neighbors - * - * Returns the list of VRF BGP Dynamic Neighbors for this Metal Gateway - * - * @throws ApiException if the Api call fails - */ - @Test - public void getBgpDynamicNeighborsTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - BgpDynamicNeighborList response = api.getBgpDynamicNeighbors(id, include, exclude); - // TODO: test validations - } - - /** - * Retrieve all routes in the VRF - * - * Returns the list of routes for the VRF - * - * @throws ApiException if the Api call fails - */ - @Test - public void getVrfRoutesTest() throws ApiException { - UUID id = null; - List include = null; - List exclude = null; - VrfRouteList response = api.getVrfRoutes(id, include, exclude); - // TODO: test validations - } - - /** - * Update the VRF - * - * Updates the VRF. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateVrfTest() throws ApiException { - UUID id = null; - VrfUpdateInput vrfUpdateInput = null; - List include = null; - List exclude = null; - Vrf response = api.updateVrf(id, vrfUpdateInput, include, exclude); - // TODO: test validations - } - - /** - * Update a VRF Route - * - * Requests a VRF Route be redeployed across the network. Updating the prefix or next-hop address on a route is not currently supported. - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateVrfRouteByIdTest() throws ApiException { - UUID id = null; - VrfRouteUpdateInput vrfRouteUpdateInput = null; - List include = null; - List exclude = null; - VrfRoute response = api.updateVrfRouteById(id, vrfRouteUpdateInput, include, exclude); - // TODO: test validations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ActivateHardwareReservationRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ActivateHardwareReservationRequestTest.java deleted file mode 100644 index 46dee211e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ActivateHardwareReservationRequestTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ActivateHardwareReservationRequest - */ -public class ActivateHardwareReservationRequestTest { - private final ActivateHardwareReservationRequest model = new ActivateHardwareReservationRequest(); - - /** - * Model tests for ActivateHardwareReservationRequest - */ - @Test - public void testActivateHardwareReservationRequest() { - // TODO: test ActivateHardwareReservationRequest - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AddressTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AddressTest.java deleted file mode 100644 index 2a8c033d2..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AddressTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Coordinates; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Address - */ -public class AddressTest { - private final Address model = new Address(); - - /** - * Model tests for Address - */ - @Test - public void testAddress() { - // TODO: test Address - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'address2' - */ - @Test - public void address2Test() { - // TODO: test address2 - } - - /** - * Test the property 'city' - */ - @Test - public void cityTest() { - // TODO: test city - } - - /** - * Test the property 'coordinates' - */ - @Test - public void coordinatesTest() { - // TODO: test coordinates - } - - /** - * Test the property 'country' - */ - @Test - public void countryTest() { - // TODO: test country - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'zipCode' - */ - @Test - public void zipCodeTest() { - // TODO: test zipCode - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AttributeDataTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AttributeDataTest.java deleted file mode 100644 index be9a2e1f7..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AttributeDataTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for AttributeData - */ -public class AttributeDataTest { - private final AttributeData model = new AttributeData(); - - /** - * Model tests for AttributeData - */ - @Test - public void testAttributeData() { - // TODO: test AttributeData - } - - /** - * Test the property 'latest' - */ - @Test - public void latestTest() { - // TODO: test latest - } - - /** - * Test the property 'model' - */ - @Test - public void modelTest() { - // TODO: test model - } - - /** - * Test the property 'vendor' - */ - @Test - public void vendorTest() { - // TODO: test vendor - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AttributeTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AttributeTest.java deleted file mode 100644 index 236d36605..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AttributeTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.AttributeData; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Attribute - */ -public class AttributeTest { - private final Attribute model = new Attribute(); - - /** - * Model tests for Attribute - */ - @Test - public void testAttribute() { - // TODO: test Attribute - } - - /** - * Test the property 'namespace' - */ - @Test - public void namespaceTest() { - // TODO: test namespace - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'data' - */ - @Test - public void dataTest() { - // TODO: test data - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenInputTest.java deleted file mode 100644 index 32d91f1ee..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenInputTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for AuthTokenInput - */ -public class AuthTokenInputTest { - private final AuthTokenInput model = new AuthTokenInput(); - - /** - * Model tests for AuthTokenInput - */ - @Test - public void testAuthTokenInput() { - // TODO: test AuthTokenInput - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'readOnly' - */ - @Test - public void readOnlyTest() { - // TODO: test readOnly - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenListTest.java deleted file mode 100644 index 0255a3f5d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.AuthToken; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for AuthTokenList - */ -public class AuthTokenListTest { - private final AuthTokenList model = new AuthTokenList(); - - /** - * Model tests for AuthTokenList - */ - @Test - public void testAuthTokenList() { - // TODO: test AuthTokenList - } - - /** - * Test the property 'apiKeys' - */ - @Test - public void apiKeysTest() { - // TODO: test apiKeys - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenProjectTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenProjectTest.java deleted file mode 100644 index b51cdd4e8..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenProjectTest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Organization; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for AuthTokenProject - */ -public class AuthTokenProjectTest { - private final AuthTokenProject model = new AuthTokenProject(); - - /** - * Model tests for AuthTokenProject - */ - @Test - public void testAuthTokenProject() { - // TODO: test AuthTokenProject - } - - /** - * Test the property 'bgpConfig' - */ - @Test - public void bgpConfigTest() { - // TODO: test bgpConfig - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'devices' - */ - @Test - public void devicesTest() { - // TODO: test devices - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'invitations' - */ - @Test - public void invitationsTest() { - // TODO: test invitations - } - - /** - * Test the property 'maxDevices' - */ - @Test - public void maxDevicesTest() { - // TODO: test maxDevices - } - - /** - * Test the property 'members' - */ - @Test - public void membersTest() { - // TODO: test members - } - - /** - * Test the property 'memberships' - */ - @Test - public void membershipsTest() { - // TODO: test memberships - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'networkStatus' - */ - @Test - public void networkStatusTest() { - // TODO: test networkStatus - } - - /** - * Test the property 'organization' - */ - @Test - public void organizationTest() { - // TODO: test organization - } - - /** - * Test the property 'paymentMethod' - */ - @Test - public void paymentMethodTest() { - // TODO: test paymentMethod - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'volumes' - */ - @Test - public void volumesTest() { - // TODO: test volumes - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenTest.java deleted file mode 100644 index f0b27d2c4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenTest.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.AuthTokenProject; -import com.equinix.openapi.metal.v1.model.AuthTokenUser; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for AuthToken - */ -public class AuthTokenTest { - private final AuthToken model = new AuthToken(); - - /** - * Model tests for AuthToken - */ - @Test - public void testAuthToken() { - // TODO: test AuthToken - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'readOnly' - */ - @Test - public void readOnlyTest() { - // TODO: test readOnly - } - - /** - * Test the property 'token' - */ - @Test - public void tokenTest() { - // TODO: test token - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'user' - */ - @Test - public void userTest() { - // TODO: test user - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenUserTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenUserTest.java deleted file mode 100644 index 5766fa507..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/AuthTokenUserTest.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for AuthTokenUser - */ -public class AuthTokenUserTest { - private final AuthTokenUser model = new AuthTokenUser(); - - /** - * Model tests for AuthTokenUser - */ - @Test - public void testAuthTokenUser() { - // TODO: test AuthTokenUser - } - - /** - * Test the property 'avatarThumbUrl' - */ - @Test - public void avatarThumbUrlTest() { - // TODO: test avatarThumbUrl - } - - /** - * Test the property 'avatarUrl' - */ - @Test - public void avatarUrlTest() { - // TODO: test avatarUrl - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'defaultOrganizationId' - */ - @Test - public void defaultOrganizationIdTest() { - // TODO: test defaultOrganizationId - } - - /** - * Test the property 'defaultProjectId' - */ - @Test - public void defaultProjectIdTest() { - // TODO: test defaultProjectId - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'emails' - */ - @Test - public void emailsTest() { - // TODO: test emails - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'fraudScore' - */ - @Test - public void fraudScoreTest() { - // TODO: test fraudScore - } - - /** - * Test the property 'fullName' - */ - @Test - public void fullNameTest() { - // TODO: test fullName - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'lastLoginAt' - */ - @Test - public void lastLoginAtTest() { - // TODO: test lastLoginAt - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'maxOrganizations' - */ - @Test - public void maxOrganizationsTest() { - // TODO: test maxOrganizations - } - - /** - * Test the property 'maxProjects' - */ - @Test - public void maxProjectsTest() { - // TODO: test maxProjects - } - - /** - * Test the property 'phoneNumber' - */ - @Test - public void phoneNumberTest() { - // TODO: test phoneNumber - } - - /** - * Test the property 'shortId' - */ - @Test - public void shortIdTest() { - // TODO: test shortId - } - - /** - * Test the property 'timezone' - */ - @Test - public void timezoneTest() { - // TODO: test timezone - } - - /** - * Test the property 'twoFactorAuth' - */ - @Test - public void twoFactorAuthTest() { - // TODO: test twoFactorAuth - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BGPSessionInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BGPSessionInputTest.java deleted file mode 100644 index 16d956e8e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BGPSessionInputTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BGPSessionInput - */ -public class BGPSessionInputTest { - private final BGPSessionInput model = new BGPSessionInput(); - - /** - * Model tests for BGPSessionInput - */ - @Test - public void testBGPSessionInput() { - // TODO: test BGPSessionInput - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'defaultRoute' - */ - @Test - public void defaultRouteTest() { - // TODO: test defaultRoute - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchTest.java deleted file mode 100644 index deec72157..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Batch - */ -public class BatchTest { - private final Batch model = new Batch(); - - /** - * Model tests for Batch - */ - @Test - public void testBatch() { - // TODO: test Batch - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'devices' - */ - @Test - public void devicesTest() { - // TODO: test devices - } - - /** - * Test the property 'errorMessages' - */ - @Test - public void errorMessagesTest() { - // TODO: test errorMessages - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchesListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchesListTest.java deleted file mode 100644 index 5a671e7a5..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BatchesListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Batch; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BatchesList - */ -public class BatchesListTest { - private final BatchesList model = new BatchesList(); - - /** - * Model tests for BatchesList - */ - @Test - public void testBatchesList() { - // TODO: test BatchesList - } - - /** - * Test the property 'batches' - */ - @Test - public void batchesTest() { - // TODO: test batches - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInputTest.java deleted file mode 100644 index 1b2b6cbe9..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigRequestInputTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpConfigRequestInput - */ -public class BgpConfigRequestInputTest { - private final BgpConfigRequestInput model = new BgpConfigRequestInput(); - - /** - * Model tests for BgpConfigRequestInput - */ - @Test - public void testBgpConfigRequestInput() { - // TODO: test BgpConfigRequestInput - } - - /** - * Test the property 'asn' - */ - @Test - public void asnTest() { - // TODO: test asn - } - - /** - * Test the property 'deploymentType' - */ - @Test - public void deploymentTypeTest() { - // TODO: test deploymentType - } - - /** - * Test the property 'md5' - */ - @Test - public void md5Test() { - // TODO: test md5 - } - - /** - * Test the property 'useCase' - */ - @Test - public void useCaseTest() { - // TODO: test useCase - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigTest.java deleted file mode 100644 index c73d5f1a4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpConfigTest.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.BgpSession; -import com.equinix.openapi.metal.v1.model.GlobalBgpRange; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpConfig - */ -public class BgpConfigTest { - private final BgpConfig model = new BgpConfig(); - - /** - * Model tests for BgpConfig - */ - @Test - public void testBgpConfig() { - // TODO: test BgpConfig - } - - /** - * Test the property 'asn' - */ - @Test - public void asnTest() { - // TODO: test asn - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'deploymentType' - */ - @Test - public void deploymentTypeTest() { - // TODO: test deploymentType - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'maxPrefix' - */ - @Test - public void maxPrefixTest() { - // TODO: test maxPrefix - } - - /** - * Test the property 'md5' - */ - @Test - public void md5Test() { - // TODO: test md5 - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'ranges' - */ - @Test - public void rangesTest() { - // TODO: test ranges - } - - /** - * Test the property 'requestedAt' - */ - @Test - public void requestedAtTest() { - // TODO: test requestedAt - } - - /** - * Test the property 'routeObject' - */ - @Test - public void routeObjectTest() { - // TODO: test routeObject - } - - /** - * Test the property 'sessions' - */ - @Test - public void sessionsTest() { - // TODO: test sessions - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborCreateInputTest.java deleted file mode 100644 index a177bd992..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborCreateInputTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpDynamicNeighborCreateInput - */ -public class BgpDynamicNeighborCreateInputTest { - private final BgpDynamicNeighborCreateInput model = new BgpDynamicNeighborCreateInput(); - - /** - * Model tests for BgpDynamicNeighborCreateInput - */ - @Test - public void testBgpDynamicNeighborCreateInput() { - // TODO: test BgpDynamicNeighborCreateInput - } - - /** - * Test the property 'bgpNeighborRange' - */ - @Test - public void bgpNeighborRangeTest() { - // TODO: test bgpNeighborRange - } - - /** - * Test the property 'bgpNeighborAsn' - */ - @Test - public void bgpNeighborAsnTest() { - // TODO: test bgpNeighborAsn - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborListTest.java deleted file mode 100644 index 01367ddd0..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.BgpDynamicNeighbor; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpDynamicNeighborList - */ -public class BgpDynamicNeighborListTest { - private final BgpDynamicNeighborList model = new BgpDynamicNeighborList(); - - /** - * Model tests for BgpDynamicNeighborList - */ - @Test - public void testBgpDynamicNeighborList() { - // TODO: test BgpDynamicNeighborList - } - - /** - * Test the property 'bgpDynamicNeighbors' - */ - @Test - public void bgpDynamicNeighborsTest() { - // TODO: test bgpDynamicNeighbors - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborTest.java deleted file mode 100644 index c6e7521d1..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpDynamicNeighborTest.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.UserLimited; -import com.equinix.openapi.metal.v1.model.VrfMetalGateway; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpDynamicNeighbor - */ -public class BgpDynamicNeighborTest { - private final BgpDynamicNeighbor model = new BgpDynamicNeighbor(); - - /** - * Model tests for BgpDynamicNeighbor - */ - @Test - public void testBgpDynamicNeighbor() { - // TODO: test BgpDynamicNeighbor - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'bgpNeighborAsn' - */ - @Test - public void bgpNeighborAsnTest() { - // TODO: test bgpNeighborAsn - } - - /** - * Test the property 'bgpNeighborRange' - */ - @Test - public void bgpNeighborRangeTest() { - // TODO: test bgpNeighborRange - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataTest.java deleted file mode 100644 index 3836ff19a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpNeighborDataTest.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.BgpRoute; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpNeighborData - */ -public class BgpNeighborDataTest { - private final BgpNeighborData model = new BgpNeighborData(); - - /** - * Model tests for BgpNeighborData - */ - @Test - public void testBgpNeighborData() { - // TODO: test BgpNeighborData - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'customerAs' - */ - @Test - public void customerAsTest() { - // TODO: test customerAs - } - - /** - * Test the property 'customerIp' - */ - @Test - public void customerIpTest() { - // TODO: test customerIp - } - - /** - * Test the property 'md5Enabled' - */ - @Test - public void md5EnabledTest() { - // TODO: test md5Enabled - } - - /** - * Test the property 'md5Password' - */ - @Test - public void md5PasswordTest() { - // TODO: test md5Password - } - - /** - * Test the property 'multihop' - */ - @Test - public void multihopTest() { - // TODO: test multihop - } - - /** - * Test the property 'peerAs' - */ - @Test - public void peerAsTest() { - // TODO: test peerAs - } - - /** - * Test the property 'peerIps' - */ - @Test - public void peerIpsTest() { - // TODO: test peerIps - } - - /** - * Test the property 'routesIn' - */ - @Test - public void routesInTest() { - // TODO: test routesIn - } - - /** - * Test the property 'routesOut' - */ - @Test - public void routesOutTest() { - // TODO: test routesOut - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpRouteTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpRouteTest.java deleted file mode 100644 index 13e377555..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpRouteTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpRoute - */ -public class BgpRouteTest { - private final BgpRoute model = new BgpRoute(); - - /** - * Model tests for BgpRoute - */ - @Test - public void testBgpRoute() { - // TODO: test BgpRoute - } - - /** - * Test the property 'exact' - */ - @Test - public void exactTest() { - // TODO: test exact - } - - /** - * Test the property 'route' - */ - @Test - public void routeTest() { - // TODO: test route - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionListTest.java deleted file mode 100644 index ada9e5f28..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.BgpSession; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpSessionList - */ -public class BgpSessionListTest { - private final BgpSessionList model = new BgpSessionList(); - - /** - * Model tests for BgpSessionList - */ - @Test - public void testBgpSessionList() { - // TODO: test BgpSessionList - } - - /** - * Test the property 'bgpSessions' - */ - @Test - public void bgpSessionsTest() { - // TODO: test bgpSessions - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighborsTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighborsTest.java deleted file mode 100644 index e2e4d8de4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionNeighborsTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.BgpNeighborData; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpSessionNeighbors - */ -public class BgpSessionNeighborsTest { - private final BgpSessionNeighbors model = new BgpSessionNeighbors(); - - /** - * Model tests for BgpSessionNeighbors - */ - @Test - public void testBgpSessionNeighbors() { - // TODO: test BgpSessionNeighbors - } - - /** - * Test the property 'bgpNeighbors' - */ - @Test - public void bgpNeighborsTest() { - // TODO: test bgpNeighbors - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionTest.java deleted file mode 100644 index a9cea5faf..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BgpSessionTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BgpSession - */ -public class BgpSessionTest { - private final BgpSession model = new BgpSession(); - - /** - * Model tests for BgpSession - */ - @Test - public void testBgpSession() { - // TODO: test BgpSession - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'defaultRoute' - */ - @Test - public void defaultRouteTest() { - // TODO: test defaultRoute - } - - /** - * Test the property 'device' - */ - @Test - public void deviceTest() { - // TODO: test device - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'learnedRoutes' - */ - @Test - public void learnedRoutesTest() { - // TODO: test learnedRoutes - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BondPortDataTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BondPortDataTest.java deleted file mode 100644 index bf39e3275..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/BondPortDataTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BondPortData - */ -public class BondPortDataTest { - private final BondPortData model = new BondPortData(); - - /** - * Model tests for BondPortData - */ - @Test - public void testBondPortData() { - // TODO: test BondPortData - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfoTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfoTest.java deleted file mode 100644 index 99d747874..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityInfoTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CapacityCheckPerFacilityInfo - */ -public class CapacityCheckPerFacilityInfoTest { - private final CapacityCheckPerFacilityInfo model = new CapacityCheckPerFacilityInfo(); - - /** - * Model tests for CapacityCheckPerFacilityInfo - */ - @Test - public void testCapacityCheckPerFacilityInfo() { - // TODO: test CapacityCheckPerFacilityInfo - } - - /** - * Test the property 'available' - */ - @Test - public void availableTest() { - // TODO: test available - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityListTest.java deleted file mode 100644 index 30a99578b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerFacilityListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.CapacityCheckPerFacilityInfo; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CapacityCheckPerFacilityList - */ -public class CapacityCheckPerFacilityListTest { - private final CapacityCheckPerFacilityList model = new CapacityCheckPerFacilityList(); - - /** - * Model tests for CapacityCheckPerFacilityList - */ - @Test - public void testCapacityCheckPerFacilityList() { - // TODO: test CapacityCheckPerFacilityList - } - - /** - * Test the property 'servers' - */ - @Test - public void serversTest() { - // TODO: test servers - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfoTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfoTest.java deleted file mode 100644 index 1f223e395..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroInfoTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CapacityCheckPerMetroInfo - */ -public class CapacityCheckPerMetroInfoTest { - private final CapacityCheckPerMetroInfo model = new CapacityCheckPerMetroInfo(); - - /** - * Model tests for CapacityCheckPerMetroInfo - */ - @Test - public void testCapacityCheckPerMetroInfo() { - // TODO: test CapacityCheckPerMetroInfo - } - - /** - * Test the property 'available' - */ - @Test - public void availableTest() { - // TODO: test available - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroListTest.java deleted file mode 100644 index 6156355a8..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityCheckPerMetroListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.CapacityCheckPerMetroInfo; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CapacityCheckPerMetroList - */ -public class CapacityCheckPerMetroListTest { - private final CapacityCheckPerMetroList model = new CapacityCheckPerMetroList(); - - /** - * Model tests for CapacityCheckPerMetroList - */ - @Test - public void testCapacityCheckPerMetroList() { - // TODO: test CapacityCheckPerMetroList - } - - /** - * Test the property 'servers' - */ - @Test - public void serversTest() { - // TODO: test servers - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityInputTest.java deleted file mode 100644 index 457839eaf..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityInputTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.ServerInfo; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CapacityInput - */ -public class CapacityInputTest { - private final CapacityInput model = new CapacityInput(); - - /** - * Model tests for CapacityInput - */ - @Test - public void testCapacityInput() { - // TODO: test CapacityInput - } - - /** - * Test the property 'servers' - */ - @Test - public void serversTest() { - // TODO: test servers - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetalTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetalTest.java deleted file mode 100644 index 4e5b30692..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityLevelPerBaremetalTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CapacityLevelPerBaremetal - */ -public class CapacityLevelPerBaremetalTest { - private final CapacityLevelPerBaremetal model = new CapacityLevelPerBaremetal(); - - /** - * Model tests for CapacityLevelPerBaremetal - */ - @Test - public void testCapacityLevelPerBaremetal() { - // TODO: test CapacityLevelPerBaremetal - } - - /** - * Test the property 'level' - */ - @Test - public void levelTest() { - // TODO: test level - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityListTest.java deleted file mode 100644 index 2b2ead4d9..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CapacityListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.CapacityLevelPerBaremetal; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CapacityList - */ -public class CapacityListTest { - private final CapacityList model = new CapacityList(); - - /** - * Model tests for CapacityList - */ - @Test - public void testCapacityList() { - // TODO: test CapacityList - } - - /** - * Test the property 'capacity' - */ - @Test - public void capacityTest() { - // TODO: test capacity - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ComponentTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ComponentTest.java deleted file mode 100644 index 5fb96f9b0..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ComponentTest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Component - */ -public class ComponentTest { - private final Component model = new Component(); - - /** - * Model tests for Component - */ - @Test - public void testComponent() { - // TODO: test Component - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'vendor' - */ - @Test - public void vendorTest() { - // TODO: test vendor - } - - /** - * Test the property 'model' - */ - @Test - public void modelTest() { - // TODO: test model - } - - /** - * Test the property 'filename' - */ - @Test - public void filenameTest() { - // TODO: test filename - } - - /** - * Test the property 'version' - */ - @Test - public void versionTest() { - // TODO: test version - } - - /** - * Test the property 'component' - */ - @Test - public void componentTest() { - // TODO: test component - } - - /** - * Test the property 'checksum' - */ - @Test - public void checksumTest() { - // TODO: test checksum - } - - /** - * Test the property 'upstreamUrl' - */ - @Test - public void upstreamUrlTest() { - // TODO: test upstreamUrl - } - - /** - * Test the property 'repositoryUrl' - */ - @Test - public void repositoryUrlTest() { - // TODO: test repositoryUrl - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CoordinatesTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CoordinatesTest.java deleted file mode 100644 index 471d7dd03..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CoordinatesTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Coordinates - */ -public class CoordinatesTest { - private final Coordinates model = new Coordinates(); - - /** - * Model tests for Coordinates - */ - @Test - public void testCoordinates() { - // TODO: test Coordinates - } - - /** - * Test the property 'latitude' - */ - @Test - public void latitudeTest() { - // TODO: test latitude - } - - /** - * Test the property 'longitude' - */ - @Test - public void longitudeTest() { - // TODO: test longitude - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateDeviceRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateDeviceRequestTest.java deleted file mode 100644 index 3c2de41cc..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateDeviceRequestTest.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.DeviceCreateInFacilityInput; -import com.equinix.openapi.metal.v1.model.DeviceCreateInMetroInput; -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CreateDeviceRequest - */ -public class CreateDeviceRequestTest { - private final CreateDeviceRequest model = new CreateDeviceRequest(); - - /** - * Model tests for CreateDeviceRequest - */ - @Test - public void testCreateDeviceRequest() { - // TODO: test CreateDeviceRequest - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'alwaysPxe' - */ - @Test - public void alwaysPxeTest() { - // TODO: test alwaysPxe - } - - /** - * Test the property 'billingCycle' - */ - @Test - public void billingCycleTest() { - // TODO: test billingCycle - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - - /** - * Test the property 'hardwareReservationId' - */ - @Test - public void hardwareReservationIdTest() { - // TODO: test hardwareReservationId - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - - /** - * Test the property 'ipxeScriptUrl' - */ - @Test - public void ipxeScriptUrlTest() { - // TODO: test ipxeScriptUrl - } - - /** - * Test the property 'locked' - */ - @Test - public void lockedTest() { - // TODO: test locked - } - - /** - * Test the property 'networkFrozen' - */ - @Test - public void networkFrozenTest() { - // TODO: test networkFrozen - } - - /** - * Test the property 'noSshKeys' - */ - @Test - public void noSshKeysTest() { - // TODO: test noSshKeys - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'privateIpv4SubnetSize' - */ - @Test - public void privateIpv4SubnetSizeTest() { - // TODO: test privateIpv4SubnetSize - } - - /** - * Test the property 'projectSshKeys' - */ - @Test - public void projectSshKeysTest() { - // TODO: test projectSshKeys - } - - /** - * Test the property 'publicIpv4SubnetSize' - */ - @Test - public void publicIpv4SubnetSizeTest() { - // TODO: test publicIpv4SubnetSize - } - - /** - * Test the property 'spotInstance' - */ - @Test - public void spotInstanceTest() { - // TODO: test spotInstance - } - - /** - * Test the property 'spotPriceMax' - */ - @Test - public void spotPriceMaxTest() { - // TODO: test spotPriceMax - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'storage' - */ - @Test - public void storageTest() { - // TODO: test storage - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'terminationTime' - */ - @Test - public void terminationTimeTest() { - // TODO: test terminationTime - } - - /** - * Test the property 'userSshKeys' - */ - @Test - public void userSshKeysTest() { - // TODO: test userSshKeys - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateEmailInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateEmailInputTest.java deleted file mode 100644 index 8303145d2..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateEmailInputTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CreateEmailInput - */ -public class CreateEmailInputTest { - private final CreateEmailInput model = new CreateEmailInput(); - - /** - * Model tests for CreateEmailInput - */ - @Test - public void testCreateEmailInput() { - // TODO: test CreateEmailInput - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequestTest.java deleted file mode 100644 index 225ea9a71..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateMetalGatewayRequestTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.MetalGatewayCreateInput; -import com.equinix.openapi.metal.v1.model.VrfMetalGatewayCreateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CreateMetalGatewayRequest - */ -public class CreateMetalGatewayRequestTest { - private final CreateMetalGatewayRequest model = new CreateMetalGatewayRequest(); - - /** - * Model tests for CreateMetalGatewayRequest - */ - @Test - public void testCreateMetalGatewayRequest() { - // TODO: test CreateMetalGatewayRequest - } - - /** - * Test the property 'ipReservationId' - */ - @Test - public void ipReservationIdTest() { - // TODO: test ipReservationId - } - - /** - * Test the property 'privateIpv4SubnetSize' - */ - @Test - public void privateIpv4SubnetSizeTest() { - // TODO: test privateIpv4SubnetSize - } - - /** - * Test the property 'virtualNetworkId' - */ - @Test - public void virtualNetworkIdTest() { - // TODO: test virtualNetworkId - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateOrganizationInterconnectionRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateOrganizationInterconnectionRequestTest.java deleted file mode 100644 index 073cbdc1e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateOrganizationInterconnectionRequestTest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.DedicatedPortCreateInput; -import com.equinix.openapi.metal.v1.model.VlanFabricVcCreateInput; -import com.equinix.openapi.metal.v1.model.VrfFabricVcCreateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CreateOrganizationInterconnectionRequest - */ -public class CreateOrganizationInterconnectionRequestTest { - private final CreateOrganizationInterconnectionRequest model = new CreateOrganizationInterconnectionRequest(); - - /** - * Model tests for CreateOrganizationInterconnectionRequest - */ - @Test - public void testCreateOrganizationInterconnectionRequest() { - // TODO: test CreateOrganizationInterconnectionRequest - } - - /** - * Test the property 'billingAccountName' - */ - @Test - public void billingAccountNameTest() { - // TODO: test billingAccountName - } - - /** - * Test the property 'contactEmail' - */ - @Test - public void contactEmailTest() { - // TODO: test contactEmail - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'mode' - */ - @Test - public void modeTest() { - // TODO: test mode - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'redundancy' - */ - @Test - public void redundancyTest() { - // TODO: test redundancy - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'useCase' - */ - @Test - public void useCaseTest() { - // TODO: test useCase - } - - /** - * Test the property 'serviceTokenType' - */ - @Test - public void serviceTokenTypeTest() { - // TODO: test serviceTokenType - } - - /** - * Test the property 'vlans' - */ - @Test - public void vlansTest() { - // TODO: test vlans - } - - /** - * Test the property 'vrfs' - */ - @Test - public void vrfsTest() { - // TODO: test vrfs - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriodTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriodTest.java deleted file mode 100644 index 5dcc42b72..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestPeriodTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CreateSelfServiceReservationRequestPeriod - */ -public class CreateSelfServiceReservationRequestPeriodTest { - private final CreateSelfServiceReservationRequestPeriod model = new CreateSelfServiceReservationRequestPeriod(); - - /** - * Model tests for CreateSelfServiceReservationRequestPeriod - */ - @Test - public void testCreateSelfServiceReservationRequestPeriod() { - // TODO: test CreateSelfServiceReservationRequestPeriod - } - - /** - * Test the property 'count' - */ - @Test - public void countTest() { - // TODO: test count - } - - /** - * Test the property 'unit' - */ - @Test - public void unitTest() { - // TODO: test unit - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestTest.java deleted file mode 100644 index ff339bbc6..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/CreateSelfServiceReservationRequestTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.CreateSelfServiceReservationRequestPeriod; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationItemRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CreateSelfServiceReservationRequest - */ -public class CreateSelfServiceReservationRequestTest { - private final CreateSelfServiceReservationRequest model = new CreateSelfServiceReservationRequest(); - - /** - * Model tests for CreateSelfServiceReservationRequest - */ - @Test - public void testCreateSelfServiceReservationRequest() { - // TODO: test CreateSelfServiceReservationRequest - } - - /** - * Test the property 'item' - */ - @Test - public void itemTest() { - // TODO: test item - } - - /** - * Test the property 'notes' - */ - @Test - public void notesTest() { - // TODO: test notes - } - - /** - * Test the property 'period' - */ - @Test - public void periodTest() { - // TODO: test period - } - - /** - * Test the property 'startDate' - */ - @Test - public void startDateTest() { - // TODO: test startDate - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DedicatedPortCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DedicatedPortCreateInputTest.java deleted file mode 100644 index 17b22a2d9..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DedicatedPortCreateInputTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DedicatedPortCreateInput - */ -public class DedicatedPortCreateInputTest { - private final DedicatedPortCreateInput model = new DedicatedPortCreateInput(); - - /** - * Model tests for DedicatedPortCreateInput - */ - @Test - public void testDedicatedPortCreateInput() { - // TODO: test DedicatedPortCreateInput - } - - /** - * Test the property 'billingAccountName' - */ - @Test - public void billingAccountNameTest() { - // TODO: test billingAccountName - } - - /** - * Test the property 'contactEmail' - */ - @Test - public void contactEmailTest() { - // TODO: test contactEmail - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'mode' - */ - @Test - public void modeTest() { - // TODO: test mode - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'redundancy' - */ - @Test - public void redundancyTest() { - // TODO: test redundancy - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'useCase' - */ - @Test - public void useCaseTest() { - // TODO: test useCase - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionInputTest.java deleted file mode 100644 index d4c1f0eb5..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionInputTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceActionInput - */ -public class DeviceActionInputTest { - private final DeviceActionInput model = new DeviceActionInput(); - - /** - * Model tests for DeviceActionInput - */ - @Test - public void testDeviceActionInput() { - // TODO: test DeviceActionInput - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'forceDelete' - */ - @Test - public void forceDeleteTest() { - // TODO: test forceDelete - } - - /** - * Test the property 'deprovisionFast' - */ - @Test - public void deprovisionFastTest() { - // TODO: test deprovisionFast - } - - /** - * Test the property 'preserveData' - */ - @Test - public void preserveDataTest() { - // TODO: test preserveData - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'ipxeScriptUrl' - */ - @Test - public void ipxeScriptUrlTest() { - // TODO: test ipxeScriptUrl - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionsInnerTest.java deleted file mode 100644 index a4f51621b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceActionsInnerTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceActionsInner - */ -public class DeviceActionsInnerTest { - private final DeviceActionsInner model = new DeviceActionsInner(); - - /** - * Model tests for DeviceActionsInner - */ - @Test - public void testDeviceActionsInner() { - // TODO: test DeviceActionsInner - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInFacilityInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInFacilityInputTest.java deleted file mode 100644 index 888f731c3..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInFacilityInputTest.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceCreateInFacilityInput - */ -public class DeviceCreateInFacilityInputTest { - private final DeviceCreateInFacilityInput model = new DeviceCreateInFacilityInput(); - - /** - * Model tests for DeviceCreateInFacilityInput - */ - @Test - public void testDeviceCreateInFacilityInput() { - // TODO: test DeviceCreateInFacilityInput - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'alwaysPxe' - */ - @Test - public void alwaysPxeTest() { - // TODO: test alwaysPxe - } - - /** - * Test the property 'billingCycle' - */ - @Test - public void billingCycleTest() { - // TODO: test billingCycle - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - - /** - * Test the property 'hardwareReservationId' - */ - @Test - public void hardwareReservationIdTest() { - // TODO: test hardwareReservationId - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - - /** - * Test the property 'ipxeScriptUrl' - */ - @Test - public void ipxeScriptUrlTest() { - // TODO: test ipxeScriptUrl - } - - /** - * Test the property 'locked' - */ - @Test - public void lockedTest() { - // TODO: test locked - } - - /** - * Test the property 'networkFrozen' - */ - @Test - public void networkFrozenTest() { - // TODO: test networkFrozen - } - - /** - * Test the property 'noSshKeys' - */ - @Test - public void noSshKeysTest() { - // TODO: test noSshKeys - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'privateIpv4SubnetSize' - */ - @Test - public void privateIpv4SubnetSizeTest() { - // TODO: test privateIpv4SubnetSize - } - - /** - * Test the property 'projectSshKeys' - */ - @Test - public void projectSshKeysTest() { - // TODO: test projectSshKeys - } - - /** - * Test the property 'publicIpv4SubnetSize' - */ - @Test - public void publicIpv4SubnetSizeTest() { - // TODO: test publicIpv4SubnetSize - } - - /** - * Test the property 'spotInstance' - */ - @Test - public void spotInstanceTest() { - // TODO: test spotInstance - } - - /** - * Test the property 'spotPriceMax' - */ - @Test - public void spotPriceMaxTest() { - // TODO: test spotPriceMax - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'storage' - */ - @Test - public void storageTest() { - // TODO: test storage - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'terminationTime' - */ - @Test - public void terminationTimeTest() { - // TODO: test terminationTime - } - - /** - * Test the property 'userSshKeys' - */ - @Test - public void userSshKeysTest() { - // TODO: test userSshKeys - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInMetroInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInMetroInputTest.java deleted file mode 100644 index 1e9c7959c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInMetroInputTest.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceCreateInMetroInput - */ -public class DeviceCreateInMetroInputTest { - private final DeviceCreateInMetroInput model = new DeviceCreateInMetroInput(); - - /** - * Model tests for DeviceCreateInMetroInput - */ - @Test - public void testDeviceCreateInMetroInput() { - // TODO: test DeviceCreateInMetroInput - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'alwaysPxe' - */ - @Test - public void alwaysPxeTest() { - // TODO: test alwaysPxe - } - - /** - * Test the property 'billingCycle' - */ - @Test - public void billingCycleTest() { - // TODO: test billingCycle - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - - /** - * Test the property 'hardwareReservationId' - */ - @Test - public void hardwareReservationIdTest() { - // TODO: test hardwareReservationId - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - - /** - * Test the property 'ipxeScriptUrl' - */ - @Test - public void ipxeScriptUrlTest() { - // TODO: test ipxeScriptUrl - } - - /** - * Test the property 'locked' - */ - @Test - public void lockedTest() { - // TODO: test locked - } - - /** - * Test the property 'networkFrozen' - */ - @Test - public void networkFrozenTest() { - // TODO: test networkFrozen - } - - /** - * Test the property 'noSshKeys' - */ - @Test - public void noSshKeysTest() { - // TODO: test noSshKeys - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'privateIpv4SubnetSize' - */ - @Test - public void privateIpv4SubnetSizeTest() { - // TODO: test privateIpv4SubnetSize - } - - /** - * Test the property 'projectSshKeys' - */ - @Test - public void projectSshKeysTest() { - // TODO: test projectSshKeys - } - - /** - * Test the property 'publicIpv4SubnetSize' - */ - @Test - public void publicIpv4SubnetSizeTest() { - // TODO: test publicIpv4SubnetSize - } - - /** - * Test the property 'spotInstance' - */ - @Test - public void spotInstanceTest() { - // TODO: test spotInstance - } - - /** - * Test the property 'spotPriceMax' - */ - @Test - public void spotPriceMaxTest() { - // TODO: test spotPriceMax - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'storage' - */ - @Test - public void storageTest() { - // TODO: test storage - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'terminationTime' - */ - @Test - public void terminationTimeTest() { - // TODO: test terminationTime - } - - /** - * Test the property 'userSshKeys' - */ - @Test - public void userSshKeysTest() { - // TODO: test userSshKeys - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java deleted file mode 100644 index da58ea16b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreateInputTest.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceCreateInput - */ -public class DeviceCreateInputTest { - private final DeviceCreateInput model = new DeviceCreateInput(); - - /** - * Model tests for DeviceCreateInput - */ - @Test - public void testDeviceCreateInput() { - // TODO: test DeviceCreateInput - } - - /** - * Test the property 'alwaysPxe' - */ - @Test - public void alwaysPxeTest() { - // TODO: test alwaysPxe - } - - /** - * Test the property 'billingCycle' - */ - @Test - public void billingCycleTest() { - // TODO: test billingCycle - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - - /** - * Test the property 'hardwareReservationId' - */ - @Test - public void hardwareReservationIdTest() { - // TODO: test hardwareReservationId - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - - /** - * Test the property 'ipxeScriptUrl' - */ - @Test - public void ipxeScriptUrlTest() { - // TODO: test ipxeScriptUrl - } - - /** - * Test the property 'locked' - */ - @Test - public void lockedTest() { - // TODO: test locked - } - - /** - * Test the property 'networkFrozen' - */ - @Test - public void networkFrozenTest() { - // TODO: test networkFrozen - } - - /** - * Test the property 'noSshKeys' - */ - @Test - public void noSshKeysTest() { - // TODO: test noSshKeys - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'privateIpv4SubnetSize' - */ - @Test - public void privateIpv4SubnetSizeTest() { - // TODO: test privateIpv4SubnetSize - } - - /** - * Test the property 'projectSshKeys' - */ - @Test - public void projectSshKeysTest() { - // TODO: test projectSshKeys - } - - /** - * Test the property 'publicIpv4SubnetSize' - */ - @Test - public void publicIpv4SubnetSizeTest() { - // TODO: test publicIpv4SubnetSize - } - - /** - * Test the property 'spotInstance' - */ - @Test - public void spotInstanceTest() { - // TODO: test spotInstance - } - - /** - * Test the property 'spotPriceMax' - */ - @Test - public void spotPriceMaxTest() { - // TODO: test spotPriceMax - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'storage' - */ - @Test - public void storageTest() { - // TODO: test storage - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'terminationTime' - */ - @Test - public void terminationTimeTest() { - // TODO: test terminationTime - } - - /** - * Test the property 'userSshKeys' - */ - @Test - public void userSshKeysTest() { - // TODO: test userSshKeys - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreatedByTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreatedByTest.java deleted file mode 100644 index 7bec841a4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceCreatedByTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceCreatedBy - */ -public class DeviceCreatedByTest { - private final DeviceCreatedBy model = new DeviceCreatedBy(); - - /** - * Model tests for DeviceCreatedBy - */ - @Test - public void testDeviceCreatedBy() { - // TODO: test DeviceCreatedBy - } - - /** - * Test the property 'avatarThumbUrl' - */ - @Test - public void avatarThumbUrlTest() { - // TODO: test avatarThumbUrl - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'fullName' - */ - @Test - public void fullNameTest() { - // TODO: test fullName - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'shortId' - */ - @Test - public void shortIdTest() { - // TODO: test shortId - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceHealthRollupTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceHealthRollupTest.java deleted file mode 100644 index a6df9c9be..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceHealthRollupTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceHealthRollup - */ -public class DeviceHealthRollupTest { - private final DeviceHealthRollup model = new DeviceHealthRollup(); - - /** - * Model tests for DeviceHealthRollup - */ - @Test - public void testDeviceHealthRollup() { - // TODO: test DeviceHealthRollup - } - - /** - * Test the property 'healthRollup' - */ - @Test - public void healthRollupTest() { - // TODO: test healthRollup - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceListTest.java deleted file mode 100644 index 868fcdc7b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Device; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceList - */ -public class DeviceListTest { - private final DeviceList model = new DeviceList(); - - /** - * Model tests for DeviceList - */ - @Test - public void testDeviceList() { - // TODO: test DeviceList - } - - /** - * Test the property 'devices' - */ - @Test - public void devicesTest() { - // TODO: test devices - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceMetroTest.java deleted file mode 100644 index 90bac5e1d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceMetroTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceMetro - */ -public class DeviceMetroTest { - private final DeviceMetro model = new DeviceMetro(); - - /** - * Model tests for DeviceMetro - */ - @Test - public void testDeviceMetro() { - // TODO: test DeviceMetro - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'country' - */ - @Test - public void countryTest() { - // TODO: test country - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectLiteTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectLiteTest.java deleted file mode 100644 index f25eab784..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectLiteTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceProjectLite - */ -public class DeviceProjectLiteTest { - private final DeviceProjectLite model = new DeviceProjectLite(); - - /** - * Model tests for DeviceProjectLite - */ - @Test - public void testDeviceProjectLite() { - // TODO: test DeviceProjectLite - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectTest.java deleted file mode 100644 index 9d475fdf3..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceProjectTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceProject - */ -public class DeviceProjectTest { - private final DeviceProject model = new DeviceProject(); - - /** - * Model tests for DeviceProject - */ - @Test - public void testDeviceProject() { - // TODO: test DeviceProject - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java deleted file mode 100644 index e50271514..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceTest.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.DeviceActionsInner; -import com.equinix.openapi.metal.v1.model.DeviceCreatedBy; -import com.equinix.openapi.metal.v1.model.DeviceMetro; -import com.equinix.openapi.metal.v1.model.DeviceProject; -import com.equinix.openapi.metal.v1.model.DeviceProjectLite; -import com.equinix.openapi.metal.v1.model.Event; -import com.equinix.openapi.metal.v1.model.Facility; -import com.equinix.openapi.metal.v1.model.HardwareReservation; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.OperatingSystem; -import com.equinix.openapi.metal.v1.model.Plan; -import com.equinix.openapi.metal.v1.model.Port; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Device - */ -public class DeviceTest { - private final Device model = new Device(); - - /** - * Model tests for Device - */ - @Test - public void testDevice() { - // TODO: test Device - } - - /** - * Test the property 'alwaysPxe' - */ - @Test - public void alwaysPxeTest() { - // TODO: test alwaysPxe - } - - /** - * Test the property 'billingCycle' - */ - @Test - public void billingCycleTest() { - // TODO: test billingCycle - } - - /** - * Test the property 'bondingMode' - */ - @Test - public void bondingModeTest() { - // TODO: test bondingMode - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'firmwareSetId' - */ - @Test - public void firmwareSetIdTest() { - // TODO: test firmwareSetId - } - - /** - * Test the property 'hardwareReservation' - */ - @Test - public void hardwareReservationTest() { - // TODO: test hardwareReservation - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'imageUrl' - */ - @Test - public void imageUrlTest() { - // TODO: test imageUrl - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - - /** - * Test the property 'ipxeScriptUrl' - */ - @Test - public void ipxeScriptUrlTest() { - // TODO: test ipxeScriptUrl - } - - /** - * Test the property 'iqn' - */ - @Test - public void iqnTest() { - // TODO: test iqn - } - - /** - * Test the property 'locked' - */ - @Test - public void lockedTest() { - // TODO: test locked - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'networkFrozen' - */ - @Test - public void networkFrozenTest() { - // TODO: test networkFrozen - } - - /** - * Test the property 'networkPorts' - */ - @Test - public void networkPortsTest() { - // TODO: test networkPorts - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'actions' - */ - @Test - public void actionsTest() { - // TODO: test actions - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'projectLite' - */ - @Test - public void projectLiteTest() { - // TODO: test projectLite - } - - /** - * Test the property 'provisioningEvents' - */ - @Test - public void provisioningEventsTest() { - // TODO: test provisioningEvents - } - - /** - * Test the property 'provisioningPercentage' - */ - @Test - public void provisioningPercentageTest() { - // TODO: test provisioningPercentage - } - - /** - * Test the property 'rootPassword' - */ - @Test - public void rootPasswordTest() { - // TODO: test rootPassword - } - - /** - * Test the property 'shortId' - */ - @Test - public void shortIdTest() { - // TODO: test shortId - } - - /** - * Test the property 'spotInstance' - */ - @Test - public void spotInstanceTest() { - // TODO: test spotInstance - } - - /** - * Test the property 'spotPriceMax' - */ - @Test - public void spotPriceMaxTest() { - // TODO: test spotPriceMax - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'storage' - */ - @Test - public void storageTest() { - // TODO: test storage - } - - /** - * Test the property 'switchUuid' - */ - @Test - public void switchUuidTest() { - // TODO: test switchUuid - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'terminationTime' - */ - @Test - public void terminationTimeTest() { - // TODO: test terminationTime - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'user' - */ - @Test - public void userTest() { - // TODO: test user - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - - /** - * Test the property 'volumes' - */ - @Test - public void volumesTest() { - // TODO: test volumes - } - - /** - * Test the property 'sos' - */ - @Test - public void sosTest() { - // TODO: test sos - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInputTest.java deleted file mode 100644 index 729014277..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUpdateInputTest.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceUpdateInput - */ -public class DeviceUpdateInputTest { - private final DeviceUpdateInput model = new DeviceUpdateInput(); - - /** - * Model tests for DeviceUpdateInput - */ - @Test - public void testDeviceUpdateInput() { - // TODO: test DeviceUpdateInput - } - - /** - * Test the property 'alwaysPxe' - */ - @Test - public void alwaysPxeTest() { - // TODO: test alwaysPxe - } - - /** - * Test the property 'billingCycle' - */ - @Test - public void billingCycleTest() { - // TODO: test billingCycle - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'firmwareSetId' - */ - @Test - public void firmwareSetIdTest() { - // TODO: test firmwareSetId - } - - /** - * Test the property 'ipxeScriptUrl' - */ - @Test - public void ipxeScriptUrlTest() { - // TODO: test ipxeScriptUrl - } - - /** - * Test the property 'locked' - */ - @Test - public void lockedTest() { - // TODO: test locked - } - - /** - * Test the property 'networkFrozen' - */ - @Test - public void networkFrozenTest() { - // TODO: test networkFrozen - } - - /** - * Test the property 'spotInstance' - */ - @Test - public void spotInstanceTest() { - // TODO: test spotInstance - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageListTest.java deleted file mode 100644 index f763b6483..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.DeviceUsage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceUsageList - */ -public class DeviceUsageListTest { - private final DeviceUsageList model = new DeviceUsageList(); - - /** - * Model tests for DeviceUsageList - */ - @Test - public void testDeviceUsageList() { - // TODO: test DeviceUsageList - } - - /** - * Test the property 'usages' - */ - @Test - public void usagesTest() { - // TODO: test usages - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageTest.java deleted file mode 100644 index 2c3e8bc9c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DeviceUsageTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DeviceUsage - */ -public class DeviceUsageTest { - private final DeviceUsage model = new DeviceUsage(); - - /** - * Model tests for DeviceUsage - */ - @Test - public void testDeviceUsage() { - // TODO: test DeviceUsage - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - - /** - * Test the property 'unit' - */ - @Test - public void unitTest() { - // TODO: test unit - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DiskTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DiskTest.java deleted file mode 100644 index f12e580fe..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/DiskTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Partition; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Disk - */ -public class DiskTest { - private final Disk model = new Disk(); - - /** - * Model tests for Disk - */ - @Test - public void testDisk() { - // TODO: test Disk - } - - /** - * Test the property 'device' - */ - @Test - public void deviceTest() { - // TODO: test device - } - - /** - * Test the property 'wipeTable' - */ - @Test - public void wipeTableTest() { - // TODO: test wipeTable - } - - /** - * Test the property 'partitions' - */ - @Test - public void partitionsTest() { - // TODO: test partitions - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailInputTest.java deleted file mode 100644 index d3ffda34d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailInputTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for EmailInput - */ -public class EmailInputTest { - private final EmailInput model = new EmailInput(); - - /** - * Model tests for EmailInput - */ - @Test - public void testEmailInput() { - // TODO: test EmailInput - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property '_default' - */ - @Test - public void _defaultTest() { - // TODO: test _default - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailTest.java deleted file mode 100644 index bcbe74b88..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EmailTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Email - */ -public class EmailTest { - private final Email model = new Email(); - - /** - * Model tests for Email - */ - @Test - public void testEmail() { - // TODO: test Email - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property '_default' - */ - @Test - public void _defaultTest() { - // TODO: test _default - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'verified' - */ - @Test - public void verifiedTest() { - // TODO: test verified - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EntitlementTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EntitlementTest.java deleted file mode 100644 index 0b425288f..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EntitlementTest.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Entitlement - */ -public class EntitlementTest { - private final Entitlement model = new Entitlement(); - - /** - * Model tests for Entitlement - */ - @Test - public void testEntitlement() { - // TODO: test Entitlement - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'featureAccess' - */ - @Test - public void featureAccessTest() { - // TODO: test featureAccess - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'instanceQuota' - */ - @Test - public void instanceQuotaTest() { - // TODO: test instanceQuota - } - - /** - * Test the property 'ipQuota' - */ - @Test - public void ipQuotaTest() { - // TODO: test ipQuota - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'projectQuota' - */ - @Test - public void projectQuotaTest() { - // TODO: test projectQuota - } - - /** - * Test the property 'slug' - */ - @Test - public void slugTest() { - // TODO: test slug - } - - /** - * Test the property 'volumeLimits' - */ - @Test - public void volumeLimitsTest() { - // TODO: test volumeLimits - } - - /** - * Test the property 'volumeQuota' - */ - @Test - public void volumeQuotaTest() { - // TODO: test volumeQuota - } - - /** - * Test the property 'weight' - */ - @Test - public void weightTest() { - // TODO: test weight - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ErrorTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ErrorTest.java deleted file mode 100644 index f43aa93b1..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ErrorTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Error - */ -public class ErrorTest { - private final Error model = new Error(); - - /** - * Model tests for Error - */ - @Test - public void testError() { - // TODO: test Error - } - - /** - * Test the property 'error' - */ - @Test - public void errorTest() { - // TODO: test error - } - - /** - * Test the property 'errors' - */ - @Test - public void errorsTest() { - // TODO: test errors - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventListTest.java deleted file mode 100644 index 2cd02a3b1..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Event; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for EventList - */ -public class EventListTest { - private final EventList model = new EventList(); - - /** - * Model tests for EventList - */ - @Test - public void testEventList() { - // TODO: test EventList - } - - /** - * Test the property 'events' - */ - @Test - public void eventsTest() { - // TODO: test events - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventTest.java deleted file mode 100644 index 51b212239..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/EventTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Event - */ -public class EventTest { - private final Event model = new Event(); - - /** - * Model tests for Event - */ - @Test - public void testEvent() { - // TODO: test Event - } - - /** - * Test the property 'body' - */ - @Test - public void bodyTest() { - // TODO: test body - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'interpolated' - */ - @Test - public void interpolatedTest() { - // TODO: test interpolated - } - - /** - * Test the property 'relationships' - */ - @Test - public void relationshipsTest() { - // TODO: test relationships - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'modifiedBy' - */ - @Test - public void modifiedByTest() { - // TODO: test modifiedBy - } - - /** - * Test the property 'ip' - */ - @Test - public void ipTest() { - // TODO: test ip - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FabricServiceTokenTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FabricServiceTokenTest.java deleted file mode 100644 index 0f83a3fb3..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FabricServiceTokenTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FabricServiceToken - */ -public class FabricServiceTokenTest { - private final FabricServiceToken model = new FabricServiceToken(); - - /** - * Model tests for FabricServiceToken - */ - @Test - public void testFabricServiceToken() { - // TODO: test FabricServiceToken - } - - /** - * Test the property 'expiresAt' - */ - @Test - public void expiresAtTest() { - // TODO: test expiresAt - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'maxAllowedSpeed' - */ - @Test - public void maxAllowedSpeedTest() { - // TODO: test maxAllowedSpeed - } - - /** - * Test the property 'role' - */ - @Test - public void roleTest() { - // TODO: test role - } - - /** - * Test the property 'serviceTokenType' - */ - @Test - public void serviceTokenTypeTest() { - // TODO: test serviceTokenType - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityInputTest.java deleted file mode 100644 index dd4bf7b0e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityInputTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FacilityInput - */ -public class FacilityInputTest { - private final FacilityInput model = new FacilityInput(); - - /** - * Model tests for FacilityInput - */ - @Test - public void testFacilityInput() { - // TODO: test FacilityInput - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityListTest.java deleted file mode 100644 index 48ffff214..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Facility; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FacilityList - */ -public class FacilityListTest { - private final FacilityList model = new FacilityList(); - - /** - * Model tests for FacilityList - */ - @Test - public void testFacilityList() { - // TODO: test FacilityList - } - - /** - * Test the property 'facilities' - */ - @Test - public void facilitiesTest() { - // TODO: test facilities - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityTest.java deleted file mode 100644 index 7e52614a5..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FacilityTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Address; -import com.equinix.openapi.metal.v1.model.DeviceMetro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Facility - */ -public class FacilityTest { - private final Facility model = new Facility(); - - /** - * Model tests for Facility - */ - @Test - public void testFacility() { - // TODO: test Facility - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'ipRanges' - */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FilesystemTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FilesystemTest.java deleted file mode 100644 index 4c6b8e922..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FilesystemTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Mount; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Filesystem - */ -public class FilesystemTest { - private final Filesystem model = new Filesystem(); - - /** - * Model tests for Filesystem - */ - @Test - public void testFilesystem() { - // TODO: test Filesystem - } - - /** - * Test the property 'mount' - */ - @Test - public void mountTest() { - // TODO: test mount - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200ResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200ResponseTest.java deleted file mode 100644 index 0f9f23b2b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindIPAddressById200ResponseTest.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservation; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.ParentBlock; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FindIPAddressById200Response - */ -public class FindIPAddressById200ResponseTest { - private final FindIPAddressById200Response model = new FindIPAddressById200Response(); - - /** - * Model tests for FindIPAddressById200Response - */ - @Test - public void testFindIPAddressById200Response() { - // TODO: test FindIPAddressById200Response - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'assignedTo' - */ - @Test - public void assignedToTest() { - // TODO: test assignedTo - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - - /** - * Test the property 'gateway' - */ - @Test - public void gatewayTest() { - // TODO: test gateway - } - - /** - * Test the property 'globalIp' - */ - @Test - public void globalIpTest() { - // TODO: test globalIp - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'manageable' - */ - @Test - public void manageableTest() { - // TODO: test manageable - } - - /** - * Test the property 'management' - */ - @Test - public void managementTest() { - // TODO: test management - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'parentBlock' - */ - @Test - public void parentBlockTest() { - // TODO: test parentBlock - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'nextHop' - */ - @Test - public void nextHopTest() { - // TODO: test nextHop - } - - /** - * Test the property 'addon' - */ - @Test - public void addonTest() { - // TODO: test addon - } - - /** - * Test the property 'assignments' - */ - @Test - public void assignmentsTest() { - // TODO: test assignments - } - - /** - * Test the property 'available' - */ - @Test - public void availableTest() { - // TODO: test available - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'projectLite' - */ - @Test - public void projectLiteTest() { - // TODO: test projectLite - } - - /** - * Test the property 'requestedBy' - */ - @Test - public void requestedByTest() { - // TODO: test requestedBy - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindMetalGatewayById200ResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindMetalGatewayById200ResponseTest.java deleted file mode 100644 index 7e5758832..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindMetalGatewayById200ResponseTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.MetalGateway; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservationOrHref; -import com.equinix.openapi.metal.v1.model.VrfMetalGateway; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FindMetalGatewayById200Response - */ -public class FindMetalGatewayById200ResponseTest { - private final FindMetalGatewayById200Response model = new FindMetalGatewayById200Response(); - - /** - * Model tests for FindMetalGatewayById200Response - */ - @Test - public void testFindMetalGatewayById200Response() { - // TODO: test FindMetalGatewayById200Response - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'ipReservation' - */ - @Test - public void ipReservationTest() { - // TODO: test ipReservation - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'virtualNetwork' - */ - @Test - public void virtualNetworkTest() { - // TODO: test virtualNetwork - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindTrafficTimeframeParameterTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindTrafficTimeframeParameterTest.java deleted file mode 100644 index 5de43e049..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FindTrafficTimeframeParameterTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FindTrafficTimeframeParameter - */ -public class FindTrafficTimeframeParameterTest { - private final FindTrafficTimeframeParameter model = new FindTrafficTimeframeParameter(); - - /** - * Model tests for FindTrafficTimeframeParameter - */ - @Test - public void testFindTrafficTimeframeParameter() { - // TODO: test FindTrafficTimeframeParameter - } - - /** - * Test the property 'endedAt' - */ - @Test - public void endedAtTest() { - // TODO: test endedAt - } - - /** - * Test the property 'startedAt' - */ - @Test - public void startedAtTest() { - // TODO: test startedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetListResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetListResponseTest.java deleted file mode 100644 index c04cbe237..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetListResponseTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.FirmwareSet; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FirmwareSetListResponse - */ -public class FirmwareSetListResponseTest { - private final FirmwareSetListResponse model = new FirmwareSetListResponse(); - - /** - * Model tests for FirmwareSetListResponse - */ - @Test - public void testFirmwareSetListResponse() { - // TODO: test FirmwareSetListResponse - } - - /** - * Test the property 'pageSize' - */ - @Test - public void pageSizeTest() { - // TODO: test pageSize - } - - /** - * Test the property 'page' - */ - @Test - public void pageTest() { - // TODO: test page - } - - /** - * Test the property 'pageCount' - */ - @Test - public void pageCountTest() { - // TODO: test pageCount - } - - /** - * Test the property 'totalPages' - */ - @Test - public void totalPagesTest() { - // TODO: test totalPages - } - - /** - * Test the property 'totalRecordCount' - */ - @Test - public void totalRecordCountTest() { - // TODO: test totalRecordCount - } - - /** - * Test the property 'records' - */ - @Test - public void recordsTest() { - // TODO: test records - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetResponseTest.java deleted file mode 100644 index d6c7a2fa6..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetResponseTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.FirmwareSet; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FirmwareSetResponse - */ -public class FirmwareSetResponseTest { - private final FirmwareSetResponse model = new FirmwareSetResponse(); - - /** - * Model tests for FirmwareSetResponse - */ - @Test - public void testFirmwareSetResponse() { - // TODO: test FirmwareSetResponse - } - - /** - * Test the property 'record' - */ - @Test - public void recordTest() { - // TODO: test record - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetTest.java deleted file mode 100644 index eae85d8f1..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/FirmwareSetTest.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Attribute; -import com.equinix.openapi.metal.v1.model.Component; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for FirmwareSet - */ -public class FirmwareSetTest { - private final FirmwareSet model = new FirmwareSet(); - - /** - * Model tests for FirmwareSet - */ - @Test - public void testFirmwareSet() { - // TODO: test FirmwareSet - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'attributes' - */ - @Test - public void attributesTest() { - // TODO: test attributes - } - - /** - * Test the property 'componentFirmware' - */ - @Test - public void componentFirmwareTest() { - // TODO: test componentFirmware - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeListTest.java deleted file mode 100644 index b62e42f19..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.GlobalBgpRange; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GlobalBgpRangeList - */ -public class GlobalBgpRangeListTest { - private final GlobalBgpRangeList model = new GlobalBgpRangeList(); - - /** - * Model tests for GlobalBgpRangeList - */ - @Test - public void testGlobalBgpRangeList() { - // TODO: test GlobalBgpRangeList - } - - /** - * Test the property 'globalBgpRanges' - */ - @Test - public void globalBgpRangesTest() { - // TODO: test globalBgpRanges - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeTest.java deleted file mode 100644 index 6ba3b0a59..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/GlobalBgpRangeTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for GlobalBgpRange - */ -public class GlobalBgpRangeTest { - private final GlobalBgpRange model = new GlobalBgpRange(); - - /** - * Model tests for GlobalBgpRange - */ - @Test - public void testGlobalBgpRange() { - // TODO: test GlobalBgpRange - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'range' - */ - @Test - public void rangeTest() { - // TODO: test range - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationListTest.java deleted file mode 100644 index 3d52f67f2..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.HardwareReservation; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for HardwareReservationList - */ -public class HardwareReservationListTest { - private final HardwareReservationList model = new HardwareReservationList(); - - /** - * Model tests for HardwareReservationList - */ - @Test - public void testHardwareReservationList() { - // TODO: test HardwareReservationList - } - - /** - * Test the property 'hardwareReservations' - */ - @Test - public void hardwareReservationsTest() { - // TODO: test hardwareReservations - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationTest.java deleted file mode 100644 index de93a9cb8..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HardwareReservationTest.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Device; -import com.equinix.openapi.metal.v1.model.Facility; -import com.equinix.openapi.metal.v1.model.Plan; -import com.equinix.openapi.metal.v1.model.Project; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for HardwareReservation - */ -public class HardwareReservationTest { - private final HardwareReservation model = new HardwareReservation(); - - /** - * Model tests for HardwareReservation - */ - @Test - public void testHardwareReservation() { - // TODO: test HardwareReservation - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customRate' - */ - @Test - public void customRateTest() { - // TODO: test customRate - } - - /** - * Test the property 'device' - */ - @Test - public void deviceTest() { - // TODO: test device - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'needOfService' - */ - @Test - public void needOfServiceTest() { - // TODO: test needOfService - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'provisionable' - */ - @Test - public void provisionableTest() { - // TODO: test provisionable - } - - /** - * Test the property 'shortId' - */ - @Test - public void shortIdTest() { - // TODO: test shortId - } - - /** - * Test the property 'spare' - */ - @Test - public void spareTest() { - // TODO: test spare - } - - /** - * Test the property 'switchUuid' - */ - @Test - public void switchUuidTest() { - // TODO: test switchUuid - } - - /** - * Test the property 'terminationTime' - */ - @Test - public void terminationTimeTest() { - // TODO: test terminationTime - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefTest.java deleted file mode 100644 index b578c59c7..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/HrefTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Href - */ -public class HrefTest { - private final Href model = new Href(); - - /** - * Model tests for Href - */ - @Test - public void testHref() { - // TODO: test Href - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAddressTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAddressTest.java deleted file mode 100644 index 9248a3c56..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAddressTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPAddress - */ -public class IPAddressTest { - private final IPAddress model = new IPAddress(); - - /** - * Model tests for IPAddress - */ - @Test - public void testIPAddress() { - // TODO: test IPAddress - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'ipReservations' - */ - @Test - public void ipReservationsTest() { - // TODO: test ipReservations - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentInputTest.java deleted file mode 100644 index a85c88867..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentInputTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPAssignmentInput - */ -public class IPAssignmentInputTest { - private final IPAssignmentInput model = new IPAssignmentInput(); - - /** - * Model tests for IPAssignmentInput - */ - @Test - public void testIPAssignmentInput() { - // TODO: test IPAssignmentInput - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentListTest.java deleted file mode 100644 index acff51c7e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPAssignmentList - */ -public class IPAssignmentListTest { - private final IPAssignmentList model = new IPAssignmentList(); - - /** - * Model tests for IPAssignmentList - */ - @Test - public void testIPAssignmentList() { - // TODO: test IPAssignmentList - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetroTest.java deleted file mode 100644 index 308d8f28d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentMetroTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPAssignmentMetro - */ -public class IPAssignmentMetroTest { - private final IPAssignmentMetro model = new IPAssignmentMetro(); - - /** - * Model tests for IPAssignmentMetro - */ - @Test - public void testIPAssignmentMetro() { - // TODO: test IPAssignmentMetro - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'country' - */ - @Test - public void countryTest() { - // TODO: test country - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentTest.java deleted file mode 100644 index 63d326c28..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentTest.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignmentMetro; -import com.equinix.openapi.metal.v1.model.ParentBlock; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPAssignment - */ -public class IPAssignmentTest { - private final IPAssignment model = new IPAssignment(); - - /** - * Model tests for IPAssignment - */ - @Test - public void testIPAssignment() { - // TODO: test IPAssignment - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'assignedTo' - */ - @Test - public void assignedToTest() { - // TODO: test assignedTo - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - - /** - * Test the property 'gateway' - */ - @Test - public void gatewayTest() { - // TODO: test gateway - } - - /** - * Test the property 'globalIp' - */ - @Test - public void globalIpTest() { - // TODO: test globalIp - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'manageable' - */ - @Test - public void manageableTest() { - // TODO: test manageable - } - - /** - * Test the property 'management' - */ - @Test - public void managementTest() { - // TODO: test management - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'parentBlock' - */ - @Test - public void parentBlockTest() { - // TODO: test parentBlock - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'nextHop' - */ - @Test - public void nextHopTest() { - // TODO: test nextHop - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentUpdateInputTest.java deleted file mode 100644 index ff63b1501..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAssignmentUpdateInputTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPAssignmentUpdateInput - */ -public class IPAssignmentUpdateInputTest { - private final IPAssignmentUpdateInput model = new IPAssignmentUpdateInput(); - - /** - * Model tests for IPAssignmentUpdateInput - */ - @Test - public void testIPAssignmentUpdateInput() { - // TODO: test IPAssignmentUpdateInput - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesListTest.java deleted file mode 100644 index ec7ce9963..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPAvailabilitiesListTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPAvailabilitiesList - */ -public class IPAvailabilitiesListTest { - private final IPAvailabilitiesList model = new IPAvailabilitiesList(); - - /** - * Model tests for IPAvailabilitiesList - */ - @Test - public void testIPAvailabilitiesList() { - // TODO: test IPAvailabilitiesList - } - - /** - * Test the property 'available' - */ - @Test - public void availableTest() { - // TODO: test available - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationFacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationFacilityTest.java deleted file mode 100644 index 13998cc86..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationFacilityTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Address; -import com.equinix.openapi.metal.v1.model.DeviceMetro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPReservationFacility - */ -public class IPReservationFacilityTest { - private final IPReservationFacility model = new IPReservationFacility(); - - /** - * Model tests for IPReservationFacility - */ - @Test - public void testIPReservationFacility() { - // TODO: test IPReservationFacility - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'ipRanges' - */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListIpAddressesInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListIpAddressesInnerTest.java deleted file mode 100644 index 8c8a09915..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListIpAddressesInnerTest.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservation; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPReservationListIpAddressesInner - */ -public class IPReservationListIpAddressesInnerTest { - private final IPReservationListIpAddressesInner model = new IPReservationListIpAddressesInner(); - - /** - * Model tests for IPReservationListIpAddressesInner - */ - @Test - public void testIPReservationListIpAddressesInner() { - // TODO: test IPReservationListIpAddressesInner - } - - /** - * Test the property 'addon' - */ - @Test - public void addonTest() { - // TODO: test addon - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'assignments' - */ - @Test - public void assignmentsTest() { - // TODO: test assignments - } - - /** - * Test the property 'available' - */ - @Test - public void availableTest() { - // TODO: test available - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'gateway' - */ - @Test - public void gatewayTest() { - // TODO: test gateway - } - - /** - * Test the property 'globalIp' - */ - @Test - public void globalIpTest() { - // TODO: test globalIp - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'manageable' - */ - @Test - public void manageableTest() { - // TODO: test manageable - } - - /** - * Test the property 'management' - */ - @Test - public void managementTest() { - // TODO: test management - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'projectLite' - */ - @Test - public void projectLiteTest() { - // TODO: test projectLite - } - - /** - * Test the property 'requestedBy' - */ - @Test - public void requestedByTest() { - // TODO: test requestedBy - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListTest.java deleted file mode 100644 index fcfb7a86e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.IPReservationListIpAddressesInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPReservationList - */ -public class IPReservationListTest { - private final IPReservationList model = new IPReservationList(); - - /** - * Model tests for IPReservationList - */ - @Test - public void testIPReservationList() { - // TODO: test IPReservationList - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationMetroTest.java deleted file mode 100644 index 2104e844c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationMetroTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPReservationMetro - */ -public class IPReservationMetroTest { - private final IPReservationMetro model = new IPReservationMetro(); - - /** - * Model tests for IPReservationMetro - */ - @Test - public void testIPReservationMetro() { - // TODO: test IPReservationMetro - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'country' - */ - @Test - public void countryTest() { - // TODO: test country - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationOrHrefTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationOrHrefTest.java deleted file mode 100644 index 7e42c6d58..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationOrHrefTest.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservation; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.IPReservationMetro; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Project; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPReservationOrHref - */ -public class IPReservationOrHrefTest { - private final IPReservationOrHref model = new IPReservationOrHref(); - - /** - * Model tests for IPReservationOrHref - */ - @Test - public void testIPReservationOrHref() { - // TODO: test IPReservationOrHref - } - - /** - * Test the property 'addon' - */ - @Test - public void addonTest() { - // TODO: test addon - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'assignments' - */ - @Test - public void assignmentsTest() { - // TODO: test assignments - } - - /** - * Test the property 'available' - */ - @Test - public void availableTest() { - // TODO: test available - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'gateway' - */ - @Test - public void gatewayTest() { - // TODO: test gateway - } - - /** - * Test the property 'globalIp' - */ - @Test - public void globalIpTest() { - // TODO: test globalIp - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'manageable' - */ - @Test - public void manageableTest() { - // TODO: test manageable - } - - /** - * Test the property 'management' - */ - @Test - public void managementTest() { - // TODO: test management - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'projectLite' - */ - @Test - public void projectLiteTest() { - // TODO: test projectLite - } - - /** - * Test the property 'requestedBy' - */ - @Test - public void requestedByTest() { - // TODO: test requestedBy - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationRequestInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationRequestInputTest.java deleted file mode 100644 index 918d9b5a3..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationRequestInputTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPReservationRequestInput - */ -public class IPReservationRequestInputTest { - private final IPReservationRequestInput model = new IPReservationRequestInput(); - - /** - * Model tests for IPReservationRequestInput - */ - @Test - public void testIPReservationRequestInput() { - // TODO: test IPReservationRequestInput - } - - /** - * Test the property 'comments' - */ - @Test - public void commentsTest() { - // TODO: test comments - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'failOnApprovalRequired' - */ - @Test - public void failOnApprovalRequiredTest() { - // TODO: test failOnApprovalRequired - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationTest.java deleted file mode 100644 index 3f0a7c5f5..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/IPReservationTest.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.IPReservationMetro; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Project; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for IPReservation - */ -public class IPReservationTest { - private final IPReservation model = new IPReservation(); - - /** - * Model tests for IPReservation - */ - @Test - public void testIPReservation() { - // TODO: test IPReservation - } - - /** - * Test the property 'addon' - */ - @Test - public void addonTest() { - // TODO: test addon - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'assignments' - */ - @Test - public void assignmentsTest() { - // TODO: test assignments - } - - /** - * Test the property 'available' - */ - @Test - public void availableTest() { - // TODO: test available - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'gateway' - */ - @Test - public void gatewayTest() { - // TODO: test gateway - } - - /** - * Test the property 'globalIp' - */ - @Test - public void globalIpTest() { - // TODO: test globalIp - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'manageable' - */ - @Test - public void manageableTest() { - // TODO: test manageable - } - - /** - * Test the property 'management' - */ - @Test - public void managementTest() { - // TODO: test management - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'projectLite' - */ - @Test - public void projectLiteTest() { - // TODO: test projectLite - } - - /** - * Test the property 'requestedBy' - */ - @Test - public void requestedByTest() { - // TODO: test requestedBy - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerTest.java deleted file mode 100644 index 9e42c05bc..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputBatchesInnerTest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.IPAddress; -import com.equinix.openapi.metal.v1.model.SSHKeyInput; -import com.equinix.openapi.metal.v1.model.Storage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InstancesBatchCreateInputBatchesInner - */ -public class InstancesBatchCreateInputBatchesInnerTest { - private final InstancesBatchCreateInputBatchesInner model = new InstancesBatchCreateInputBatchesInner(); - - /** - * Model tests for InstancesBatchCreateInputBatchesInner - */ - @Test - public void testInstancesBatchCreateInputBatchesInner() { - // TODO: test InstancesBatchCreateInputBatchesInner - } - - /** - * Test the property 'hostnames' - */ - @Test - public void hostnamesTest() { - // TODO: test hostnames - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'alwaysPxe' - */ - @Test - public void alwaysPxeTest() { - // TODO: test alwaysPxe - } - - /** - * Test the property 'billingCycle' - */ - @Test - public void billingCycleTest() { - // TODO: test billingCycle - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - - /** - * Test the property 'hardwareReservationId' - */ - @Test - public void hardwareReservationIdTest() { - // TODO: test hardwareReservationId - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - - /** - * Test the property 'ipxeScriptUrl' - */ - @Test - public void ipxeScriptUrlTest() { - // TODO: test ipxeScriptUrl - } - - /** - * Test the property 'locked' - */ - @Test - public void lockedTest() { - // TODO: test locked - } - - /** - * Test the property 'networkFrozen' - */ - @Test - public void networkFrozenTest() { - // TODO: test networkFrozen - } - - /** - * Test the property 'noSshKeys' - */ - @Test - public void noSshKeysTest() { - // TODO: test noSshKeys - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'privateIpv4SubnetSize' - */ - @Test - public void privateIpv4SubnetSizeTest() { - // TODO: test privateIpv4SubnetSize - } - - /** - * Test the property 'projectSshKeys' - */ - @Test - public void projectSshKeysTest() { - // TODO: test projectSshKeys - } - - /** - * Test the property 'publicIpv4SubnetSize' - */ - @Test - public void publicIpv4SubnetSizeTest() { - // TODO: test publicIpv4SubnetSize - } - - /** - * Test the property 'spotInstance' - */ - @Test - public void spotInstanceTest() { - // TODO: test spotInstance - } - - /** - * Test the property 'spotPriceMax' - */ - @Test - public void spotPriceMaxTest() { - // TODO: test spotPriceMax - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'storage' - */ - @Test - public void storageTest() { - // TODO: test storage - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'terminationTime' - */ - @Test - public void terminationTimeTest() { - // TODO: test terminationTime - } - - /** - * Test the property 'userSshKeys' - */ - @Test - public void userSshKeysTest() { - // TODO: test userSshKeys - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputTest.java deleted file mode 100644 index 64d91205a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InstancesBatchCreateInputTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.InstancesBatchCreateInputBatchesInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InstancesBatchCreateInput - */ -public class InstancesBatchCreateInputTest { - private final InstancesBatchCreateInput model = new InstancesBatchCreateInput(); - - /** - * Model tests for InstancesBatchCreateInput - */ - @Test - public void testInstancesBatchCreateInput() { - // TODO: test InstancesBatchCreateInput - } - - /** - * Test the property 'batches' - */ - @Test - public void batchesTest() { - // TODO: test batches - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionListTest.java deleted file mode 100644 index 7d78422cc..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Interconnection; -import com.equinix.openapi.metal.v1.model.Meta; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InterconnectionList - */ -public class InterconnectionListTest { - private final InterconnectionList model = new InterconnectionList(); - - /** - * Model tests for InterconnectionList - */ - @Test - public void testInterconnectionList() { - // TODO: test InterconnectionList - } - - /** - * Test the property 'interconnections' - */ - @Test - public void interconnectionsTest() { - // TODO: test interconnections - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortListTest.java deleted file mode 100644 index 2afda752c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.InterconnectionPort; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InterconnectionPortList - */ -public class InterconnectionPortListTest { - private final InterconnectionPortList model = new InterconnectionPortList(); - - /** - * Model tests for InterconnectionPortList - */ - @Test - public void testInterconnectionPortList() { - // TODO: test InterconnectionPortList - } - - /** - * Test the property 'ports' - */ - @Test - public void portsTest() { - // TODO: test ports - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortTest.java deleted file mode 100644 index 992685535..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionPortTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.VirtualCircuit; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InterconnectionPort - */ -public class InterconnectionPortTest { - private final InterconnectionPort model = new InterconnectionPort(); - - /** - * Model tests for InterconnectionPort - */ - @Test - public void testInterconnectionPort() { - // TODO: test InterconnectionPort - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'organization' - */ - @Test - public void organizationTest() { - // TODO: test organization - } - - /** - * Test the property 'role' - */ - @Test - public void roleTest() { - // TODO: test role - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'switchId' - */ - @Test - public void switchIdTest() { - // TODO: test switchId - } - - /** - * Test the property 'virtualCircuits' - */ - @Test - public void virtualCircuitsTest() { - // TODO: test virtualCircuits - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'linkStatus' - */ - @Test - public void linkStatusTest() { - // TODO: test linkStatus - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionTest.java deleted file mode 100644 index cb1ccdc9c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionTest.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.FabricServiceToken; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.InterconnectionPort; -import com.equinix.openapi.metal.v1.model.Metro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Interconnection - */ -public class InterconnectionTest { - private final Interconnection model = new Interconnection(); - - /** - * Model tests for Interconnection - */ - @Test - public void testInterconnection() { - // TODO: test Interconnection - } - - /** - * Test the property 'contactEmail' - */ - @Test - public void contactEmailTest() { - // TODO: test contactEmail - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'mode' - */ - @Test - public void modeTest() { - // TODO: test mode - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'organization' - */ - @Test - public void organizationTest() { - // TODO: test organization - } - - /** - * Test the property 'ports' - */ - @Test - public void portsTest() { - // TODO: test ports - } - - /** - * Test the property 'redundancy' - */ - @Test - public void redundancyTest() { - // TODO: test redundancy - } - - /** - * Test the property 'serviceTokens' - */ - @Test - public void serviceTokensTest() { - // TODO: test serviceTokens - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'token' - */ - @Test - public void tokenTest() { - // TODO: test token - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'requestedBy' - */ - @Test - public void requestedByTest() { - // TODO: test requestedBy - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInputTest.java deleted file mode 100644 index 219170ede..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InterconnectionUpdateInputTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InterconnectionUpdateInput - */ -public class InterconnectionUpdateInputTest { - private final InterconnectionUpdateInput model = new InterconnectionUpdateInput(); - - /** - * Model tests for InterconnectionUpdateInput - */ - @Test - public void testInterconnectionUpdateInput() { - // TODO: test InterconnectionUpdateInput - } - - /** - * Test the property 'contactEmail' - */ - @Test - public void contactEmailTest() { - // TODO: test contactEmail - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'mode' - */ - @Test - public void modeTest() { - // TODO: test mode - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'redundancy' - */ - @Test - public void redundancyTest() { - // TODO: test redundancy - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationInputTest.java deleted file mode 100644 index 47f6efd67..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationInputTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InvitationInput - */ -public class InvitationInputTest { - private final InvitationInput model = new InvitationInput(); - - /** - * Model tests for InvitationInput - */ - @Test - public void testInvitationInput() { - // TODO: test InvitationInput - } - - /** - * Test the property 'invitee' - */ - @Test - public void inviteeTest() { - // TODO: test invitee - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'organizationId' - */ - @Test - public void organizationIdTest() { - // TODO: test organizationId - } - - /** - * Test the property 'projectsIds' - */ - @Test - public void projectsIdsTest() { - // TODO: test projectsIds - } - - /** - * Test the property 'roles' - */ - @Test - public void rolesTest() { - // TODO: test roles - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationListTest.java deleted file mode 100644 index d3b8b68d4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Membership; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InvitationList - */ -public class InvitationListTest { - private final InvitationList model = new InvitationList(); - - /** - * Model tests for InvitationList - */ - @Test - public void testInvitationList() { - // TODO: test InvitationList - } - - /** - * Test the property 'invitations' - */ - @Test - public void invitationsTest() { - // TODO: test invitations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationTest.java deleted file mode 100644 index 9a5ca6422..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvitationTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Invitation - */ -public class InvitationTest { - private final Invitation model = new Invitation(); - - /** - * Model tests for Invitation - */ - @Test - public void testInvitation() { - // TODO: test Invitation - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'invitation' - */ - @Test - public void invitationTest() { - // TODO: test invitation - } - - /** - * Test the property 'invitedBy' - */ - @Test - public void invitedByTest() { - // TODO: test invitedBy - } - - /** - * Test the property 'invitee' - */ - @Test - public void inviteeTest() { - // TODO: test invitee - } - - /** - * Test the property 'nonce' - */ - @Test - public void nonceTest() { - // TODO: test nonce - } - - /** - * Test the property 'organization' - */ - @Test - public void organizationTest() { - // TODO: test organization - } - - /** - * Test the property 'projects' - */ - @Test - public void projectsTest() { - // TODO: test projects - } - - /** - * Test the property 'roles' - */ - @Test - public void rolesTest() { - // TODO: test roles - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvoiceListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvoiceListTest.java deleted file mode 100644 index 6dbf45251..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvoiceListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Invoice; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for InvoiceList - */ -public class InvoiceListTest { - private final InvoiceList model = new InvoiceList(); - - /** - * Model tests for InvoiceList - */ - @Test - public void testInvoiceList() { - // TODO: test InvoiceList - } - - /** - * Test the property 'invoices' - */ - @Test - public void invoicesTest() { - // TODO: test invoices - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvoiceTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvoiceTest.java deleted file mode 100644 index ee541ddfa..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/InvoiceTest.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.LineItem; -import com.equinix.openapi.metal.v1.model.ProjectIdName; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Invoice - */ -public class InvoiceTest { - private final Invoice model = new Invoice(); - - /** - * Model tests for Invoice - */ - @Test - public void testInvoice() { - // TODO: test Invoice - } - - /** - * Test the property 'amount' - */ - @Test - public void amountTest() { - // TODO: test amount - } - - /** - * Test the property 'balance' - */ - @Test - public void balanceTest() { - // TODO: test balance - } - - /** - * Test the property 'createdOn' - */ - @Test - public void createdOnTest() { - // TODO: test createdOn - } - - /** - * Test the property 'creditAmount' - */ - @Test - public void creditAmountTest() { - // TODO: test creditAmount - } - - /** - * Test the property 'creditsApplied' - */ - @Test - public void creditsAppliedTest() { - // TODO: test creditsApplied - } - - /** - * Test the property 'currency' - */ - @Test - public void currencyTest() { - // TODO: test currency - } - - /** - * Test the property 'dueOn' - */ - @Test - public void dueOnTest() { - // TODO: test dueOn - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'items' - */ - @Test - public void itemsTest() { - // TODO: test items - } - - /** - * Test the property 'number' - */ - @Test - public void numberTest() { - // TODO: test number - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'referenceNumber' - */ - @Test - public void referenceNumberTest() { - // TODO: test referenceNumber - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'targetDate' - */ - @Test - public void targetDateTest() { - // TODO: test targetDate - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseCreateInputTest.java deleted file mode 100644 index bcd18e3ac..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseCreateInputTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for LicenseCreateInput - */ -public class LicenseCreateInputTest { - private final LicenseCreateInput model = new LicenseCreateInput(); - - /** - * Model tests for LicenseCreateInput - */ - @Test - public void testLicenseCreateInput() { - // TODO: test LicenseCreateInput - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'licenseeProductId' - */ - @Test - public void licenseeProductIdTest() { - // TODO: test licenseeProductId - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseListTest.java deleted file mode 100644 index 7c7db1293..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.License; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for LicenseList - */ -public class LicenseListTest { - private final LicenseList model = new LicenseList(); - - /** - * Model tests for LicenseList - */ - @Test - public void testLicenseList() { - // TODO: test LicenseList - } - - /** - * Test the property 'licenses' - */ - @Test - public void licensesTest() { - // TODO: test licenses - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseTest.java deleted file mode 100644 index d85f7768f..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for License - */ -public class LicenseTest { - private final License model = new License(); - - /** - * Model tests for License - */ - @Test - public void testLicense() { - // TODO: test License - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'licenseKey' - */ - @Test - public void licenseKeyTest() { - // TODO: test licenseKey - } - - /** - * Test the property 'licenseeProduct' - */ - @Test - public void licenseeProductTest() { - // TODO: test licenseeProduct - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInputTest.java deleted file mode 100644 index fed847154..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LicenseUpdateInputTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for LicenseUpdateInput - */ -public class LicenseUpdateInputTest { - private final LicenseUpdateInput model = new LicenseUpdateInput(); - - /** - * Model tests for LicenseUpdateInput - */ - @Test - public void testLicenseUpdateInput() { - // TODO: test LicenseUpdateInput - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LineItemTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LineItemTest.java deleted file mode 100644 index 4227828db..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/LineItemTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Plan; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for LineItem - */ -public class LineItemTest { - private final LineItem model = new LineItem(); - - /** - * Model tests for LineItem - */ - @Test - public void testLineItem() { - // TODO: test LineItem - } - - /** - * Test the property 'amount' - */ - @Test - public void amountTest() { - // TODO: test amount - } - - /** - * Test the property 'currency' - */ - @Test - public void currencyTest() { - // TODO: test currency - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'unit' - */ - @Test - public void unitTest() { - // TODO: test unit - } - - /** - * Test the property 'unitPrice' - */ - @Test - public void unitPriceTest() { - // TODO: test unitPrice - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipInputTest.java deleted file mode 100644 index cf03db9b6..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipInputTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MembershipInput - */ -public class MembershipInputTest { - private final MembershipInput model = new MembershipInput(); - - /** - * Model tests for MembershipInput - */ - @Test - public void testMembershipInput() { - // TODO: test MembershipInput - } - - /** - * Test the property 'role' - */ - @Test - public void roleTest() { - // TODO: test role - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipListTest.java deleted file mode 100644 index 1c520466c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Membership; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MembershipList - */ -public class MembershipListTest { - private final MembershipList model = new MembershipList(); - - /** - * Model tests for MembershipList - */ - @Test - public void testMembershipList() { - // TODO: test MembershipList - } - - /** - * Test the property 'memberships' - */ - @Test - public void membershipsTest() { - // TODO: test memberships - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipTest.java deleted file mode 100644 index d35b413f8..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MembershipTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Membership - */ -public class MembershipTest { - private final Membership model = new Membership(); - - /** - * Model tests for Membership - */ - @Test - public void testMembership() { - // TODO: test Membership - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'roles' - */ - @Test - public void rolesTest() { - // TODO: test roles - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'user' - */ - @Test - public void userTest() { - // TODO: test user - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetaTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetaTest.java deleted file mode 100644 index 364e9862a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetaTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Meta - */ -public class MetaTest { - private final Meta model = new Meta(); - - /** - * Model tests for Meta - */ - @Test - public void testMeta() { - // TODO: test Meta - } - - /** - * Test the property 'first' - */ - @Test - public void firstTest() { - // TODO: test first - } - - /** - * Test the property 'last' - */ - @Test - public void lastTest() { - // TODO: test last - } - - /** - * Test the property 'next' - */ - @Test - public void nextTest() { - // TODO: test next - } - - /** - * Test the property 'previous' - */ - @Test - public void previousTest() { - // TODO: test previous - } - - /** - * Test the property 'self' - */ - @Test - public void selfTest() { - // TODO: test self - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - - /** - * Test the property 'currentPage' - */ - @Test - public void currentPageTest() { - // TODO: test currentPage - } - - /** - * Test the property 'lastPage' - */ - @Test - public void lastPageTest() { - // TODO: test lastPage - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkBondingTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkBondingTest.java deleted file mode 100644 index 1f5fd4345..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkBondingTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetadataNetworkNetworkBonding - */ -public class MetadataNetworkNetworkBondingTest { - private final MetadataNetworkNetworkBonding model = new MetadataNetworkNetworkBonding(); - - /** - * Model tests for MetadataNetworkNetworkBonding - */ - @Test - public void testMetadataNetworkNetworkBonding() { - // TODO: test MetadataNetworkNetworkBonding - } - - /** - * Test the property 'linkAggregation' - */ - @Test - public void linkAggregationTest() { - // TODO: test linkAggregation - } - - /** - * Test the property 'mac' - */ - @Test - public void macTest() { - // TODO: test mac - } - - /** - * Test the property 'mode' - */ - @Test - public void modeTest() { - // TODO: test mode - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkTest.java deleted file mode 100644 index 88db71e71..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkNetworkTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.MetadataNetworkNetworkBonding; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetadataNetworkNetwork - */ -public class MetadataNetworkNetworkTest { - private final MetadataNetworkNetwork model = new MetadataNetworkNetwork(); - - /** - * Model tests for MetadataNetworkNetwork - */ - @Test - public void testMetadataNetworkNetwork() { - // TODO: test MetadataNetworkNetwork - } - - /** - * Test the property 'bonding' - */ - @Test - public void bondingTest() { - // TODO: test bonding - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkTest.java deleted file mode 100644 index 506d607c4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataNetworkTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.MetadataNetworkNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetadataNetwork - */ -public class MetadataNetworkTest { - private final MetadataNetwork model = new MetadataNetwork(); - - /** - * Model tests for MetadataNetwork - */ - @Test - public void testMetadataNetwork() { - // TODO: test MetadataNetwork - } - - /** - * Test the property 'addresses' - */ - @Test - public void addressesTest() { - // TODO: test addresses - } - - /** - * Test the property 'interfaces' - */ - @Test - public void interfacesTest() { - // TODO: test interfaces - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataTest.java deleted file mode 100644 index a00d4ef0c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetadataTest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.MetadataNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Metadata - */ -public class MetadataTest { - private final Metadata model = new Metadata(); - - /** - * Model tests for Metadata - */ - @Test - public void testMetadata() { - // TODO: test Metadata - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'iqn' - */ - @Test - public void iqnTest() { - // TODO: test iqn - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'privateSubnets' - */ - @Test - public void privateSubnetsTest() { - // TODO: test privateSubnets - } - - /** - * Test the property 'reserved' - */ - @Test - public void reservedTest() { - // TODO: test reserved - } - - /** - * Test the property 'specs' - */ - @Test - public void specsTest() { - // TODO: test specs - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'switchShortId' - */ - @Test - public void switchShortIdTest() { - // TODO: test switchShortId - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'volumes' - */ - @Test - public void volumesTest() { - // TODO: test volumes - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInputTest.java deleted file mode 100644 index dea06a256..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayCreateInputTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetalGatewayCreateInput - */ -public class MetalGatewayCreateInputTest { - private final MetalGatewayCreateInput model = new MetalGatewayCreateInput(); - - /** - * Model tests for MetalGatewayCreateInput - */ - @Test - public void testMetalGatewayCreateInput() { - // TODO: test MetalGatewayCreateInput - } - - /** - * Test the property 'ipReservationId' - */ - @Test - public void ipReservationIdTest() { - // TODO: test ipReservationId - } - - /** - * Test the property 'privateIpv4SubnetSize' - */ - @Test - public void privateIpv4SubnetSizeTest() { - // TODO: test privateIpv4SubnetSize - } - - /** - * Test the property 'virtualNetworkId' - */ - @Test - public void virtualNetworkIdTest() { - // TODO: test virtualNetworkId - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayElasticIpCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayElasticIpCreateInputTest.java deleted file mode 100644 index 1ad1d9f62..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayElasticIpCreateInputTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetalGatewayElasticIpCreateInput - */ -public class MetalGatewayElasticIpCreateInputTest { - private final MetalGatewayElasticIpCreateInput model = new MetalGatewayElasticIpCreateInput(); - - /** - * Model tests for MetalGatewayElasticIpCreateInput - */ - @Test - public void testMetalGatewayElasticIpCreateInput() { - // TODO: test MetalGatewayElasticIpCreateInput - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'nextHop' - */ - @Test - public void nextHopTest() { - // TODO: test nextHop - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListMetalGatewaysInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListMetalGatewaysInnerTest.java deleted file mode 100644 index 1562f43f8..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListMetalGatewaysInnerTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPReservationOrHref; -import com.equinix.openapi.metal.v1.model.MetalGateway; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfMetalGateway; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetalGatewayListMetalGatewaysInner - */ -public class MetalGatewayListMetalGatewaysInnerTest { - private final MetalGatewayListMetalGatewaysInner model = new MetalGatewayListMetalGatewaysInner(); - - /** - * Model tests for MetalGatewayListMetalGatewaysInner - */ - @Test - public void testMetalGatewayListMetalGatewaysInner() { - // TODO: test MetalGatewayListMetalGatewaysInner - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'ipReservation' - */ - @Test - public void ipReservationTest() { - // TODO: test ipReservation - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'virtualNetwork' - */ - @Test - public void virtualNetworkTest() { - // TODO: test virtualNetwork - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListTest.java deleted file mode 100644 index b5f6f2023..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.MetalGatewayListMetalGatewaysInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetalGatewayList - */ -public class MetalGatewayListTest { - private final MetalGatewayList model = new MetalGatewayList(); - - /** - * Model tests for MetalGatewayList - */ - @Test - public void testMetalGatewayList() { - // TODO: test MetalGatewayList - } - - /** - * Test the property 'metalGateways' - */ - @Test - public void metalGatewaysTest() { - // TODO: test metalGateways - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayLiteTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayLiteTest.java deleted file mode 100644 index 2a04bbbaa..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayLiteTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetalGatewayLite - */ -public class MetalGatewayLiteTest { - private final MetalGatewayLite model = new MetalGatewayLite(); - - /** - * Model tests for MetalGatewayLite - */ - @Test - public void testMetalGatewayLite() { - // TODO: test MetalGatewayLite - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'gatewayAddress' - */ - @Test - public void gatewayAddressTest() { - // TODO: test gatewayAddress - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'vlan' - */ - @Test - public void vlanTest() { - // TODO: test vlan - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayTest.java deleted file mode 100644 index 6850d5de9..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetalGatewayTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPReservationOrHref; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetalGateway - */ -public class MetalGatewayTest { - private final MetalGateway model = new MetalGateway(); - - /** - * Model tests for MetalGateway - */ - @Test - public void testMetalGateway() { - // TODO: test MetalGateway - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'ipReservation' - */ - @Test - public void ipReservationTest() { - // TODO: test ipReservation - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'virtualNetwork' - */ - @Test - public void virtualNetworkTest() { - // TODO: test virtualNetwork - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroInputTest.java deleted file mode 100644 index 28257d165..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroInputTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetroInput - */ -public class MetroInputTest { - private final MetroInput model = new MetroInput(); - - /** - * Model tests for MetroInput - */ - @Test - public void testMetroInput() { - // TODO: test MetroInput - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroListTest.java deleted file mode 100644 index e7f8a5f31..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Metro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MetroList - */ -public class MetroListTest { - private final MetroList model = new MetroList(); - - /** - * Model tests for MetroList - */ - @Test - public void testMetroList() { - // TODO: test MetroList - } - - /** - * Test the property 'metros' - */ - @Test - public void metrosTest() { - // TODO: test metros - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroTest.java deleted file mode 100644 index 08f5b1885..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MetroTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Metro - */ -public class MetroTest { - private final Metro model = new Metro(); - - /** - * Model tests for Metro - */ - @Test - public void testMetro() { - // TODO: test Metro - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'country' - */ - @Test - public void countryTest() { - // TODO: test country - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MountTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MountTest.java deleted file mode 100644 index 6a3eeb2e6..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MountTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Mount - */ -public class MountTest { - private final Mount model = new Mount(); - - /** - * Model tests for Mount - */ - @Test - public void testMount() { - // TODO: test Mount - } - - /** - * Test the property 'device' - */ - @Test - public void deviceTest() { - // TODO: test device - } - - /** - * Test the property 'format' - */ - @Test - public void formatTest() { - // TODO: test format - } - - /** - * Test the property 'point' - */ - @Test - public void pointTest() { - // TODO: test point - } - - /** - * Test the property 'options' - */ - @Test - public void optionsTest() { - // TODO: test options - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MoveHardwareReservationRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MoveHardwareReservationRequestTest.java deleted file mode 100644 index 11f344d72..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/MoveHardwareReservationRequestTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MoveHardwareReservationRequest - */ -public class MoveHardwareReservationRequestTest { - private final MoveHardwareReservationRequest model = new MoveHardwareReservationRequest(); - - /** - * Model tests for MoveHardwareReservationRequest - */ - @Test - public void testMoveHardwareReservationRequest() { - // TODO: test MoveHardwareReservationRequest - } - - /** - * Test the property 'projectId' - */ - @Test - public void projectIdTest() { - // TODO: test projectId - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/NewPasswordTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/NewPasswordTest.java deleted file mode 100644 index 7c7e27b95..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/NewPasswordTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for NewPassword - */ -public class NewPasswordTest { - private final NewPassword model = new NewPassword(); - - /** - * Model tests for NewPassword - */ - @Test - public void testNewPassword() { - // TODO: test NewPassword - } - - /** - * Test the property 'newPassword' - */ - @Test - public void newPasswordTest() { - // TODO: test newPassword - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemListTest.java deleted file mode 100644 index 5bfc1e59e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.OperatingSystem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OperatingSystemList - */ -public class OperatingSystemListTest { - private final OperatingSystemList model = new OperatingSystemList(); - - /** - * Model tests for OperatingSystemList - */ - @Test - public void testOperatingSystemList() { - // TODO: test OperatingSystemList - } - - /** - * Test the property 'operatingSystems' - */ - @Test - public void operatingSystemsTest() { - // TODO: test operatingSystems - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemTest.java deleted file mode 100644 index bc6b614f9..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OperatingSystemTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OperatingSystem - */ -public class OperatingSystemTest { - private final OperatingSystem model = new OperatingSystem(); - - /** - * Model tests for OperatingSystem - */ - @Test - public void testOperatingSystem() { - // TODO: test OperatingSystem - } - - /** - * Test the property 'distro' - */ - @Test - public void distroTest() { - // TODO: test distro - } - - /** - * Test the property 'distroLabel' - */ - @Test - public void distroLabelTest() { - // TODO: test distroLabel - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'licensed' - */ - @Test - public void licensedTest() { - // TODO: test licensed - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'preinstallable' - */ - @Test - public void preinstallableTest() { - // TODO: test preinstallable - } - - /** - * Test the property 'pricing' - */ - @Test - public void pricingTest() { - // TODO: test pricing - } - - /** - * Test the property 'provisionableOn' - */ - @Test - public void provisionableOnTest() { - // TODO: test provisionableOn - } - - /** - * Test the property 'slug' - */ - @Test - public void slugTest() { - // TODO: test slug - } - - /** - * Test the property 'version' - */ - @Test - public void versionTest() { - // TODO: test version - } - - /** - * Test the property 'defaultOperatingSystem' - */ - @Test - public void defaultOperatingSystemTest() { - // TODO: test defaultOperatingSystem - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationInputTest.java deleted file mode 100644 index 62514782d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationInputTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Address; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OrganizationInput - */ -public class OrganizationInputTest { - private final OrganizationInput model = new OrganizationInput(); - - /** - * Model tests for OrganizationInput - */ - @Test - public void testOrganizationInput() { - // TODO: test OrganizationInput - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'billingAddress' - */ - @Test - public void billingAddressTest() { - // TODO: test billingAddress - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'enforce2faAt' - */ - @Test - public void enforce2faAtTest() { - // TODO: test enforce2faAt - } - - /** - * Test the property 'logo' - */ - @Test - public void logoTest() { - // TODO: test logo - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'twitter' - */ - @Test - public void twitterTest() { - // TODO: test twitter - } - - /** - * Test the property 'website' - */ - @Test - public void websiteTest() { - // TODO: test website - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationListTest.java deleted file mode 100644 index e792f0189..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.Organization; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OrganizationList - */ -public class OrganizationListTest { - private final OrganizationList model = new OrganizationList(); - - /** - * Model tests for OrganizationList - */ - @Test - public void testOrganizationList() { - // TODO: test OrganizationList - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - - /** - * Test the property 'organizations' - */ - @Test - public void organizationsTest() { - // TODO: test organizations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationTest.java deleted file mode 100644 index f45654529..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/OrganizationTest.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Address; -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Organization - */ -public class OrganizationTest { - private final Organization model = new Organization(); - - /** - * Model tests for Organization - */ - @Test - public void testOrganization() { - // TODO: test Organization - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'billingAddress' - */ - @Test - public void billingAddressTest() { - // TODO: test billingAddress - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'creditAmount' - */ - @Test - public void creditAmountTest() { - // TODO: test creditAmount - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'enforce2faAt' - */ - @Test - public void enforce2faAtTest() { - // TODO: test enforce2faAt - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'logo' - */ - @Test - public void logoTest() { - // TODO: test logo - } - - /** - * Test the property 'members' - */ - @Test - public void membersTest() { - // TODO: test members - } - - /** - * Test the property 'memberships' - */ - @Test - public void membershipsTest() { - // TODO: test memberships - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'projects' - */ - @Test - public void projectsTest() { - // TODO: test projects - } - - /** - * Test the property 'terms' - */ - @Test - public void termsTest() { - // TODO: test terms - } - - /** - * Test the property 'twitter' - */ - @Test - public void twitterTest() { - // TODO: test twitter - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'website' - */ - @Test - public void websiteTest() { - // TODO: test website - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ParentBlockTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ParentBlockTest.java deleted file mode 100644 index 3cc506555..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ParentBlockTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ParentBlock - */ -public class ParentBlockTest { - private final ParentBlock model = new ParentBlock(); - - /** - * Model tests for ParentBlock - */ - @Test - public void testParentBlock() { - // TODO: test ParentBlock - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PartitionTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PartitionTest.java deleted file mode 100644 index 263317b2d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PartitionTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Partition - */ -public class PartitionTest { - private final Partition model = new Partition(); - - /** - * Model tests for Partition - */ - @Test - public void testPartition() { - // TODO: test Partition - } - - /** - * Test the property 'label' - */ - @Test - public void labelTest() { - // TODO: test label - } - - /** - * Test the property 'number' - */ - @Test - public void numberTest() { - // TODO: test number - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddressTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddressTest.java deleted file mode 100644 index 614957e7f..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodBillingAddressTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PaymentMethodBillingAddress - */ -public class PaymentMethodBillingAddressTest { - private final PaymentMethodBillingAddress model = new PaymentMethodBillingAddress(); - - /** - * Model tests for PaymentMethodBillingAddress - */ - @Test - public void testPaymentMethodBillingAddress() { - // TODO: test PaymentMethodBillingAddress - } - - /** - * Test the property 'countryCodeAlpha2' - */ - @Test - public void countryCodeAlpha2Test() { - // TODO: test countryCodeAlpha2 - } - - /** - * Test the property 'postalCode' - */ - @Test - public void postalCodeTest() { - // TODO: test postalCode - } - - /** - * Test the property 'streetAddress' - */ - @Test - public void streetAddressTest() { - // TODO: test streetAddress - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInputTest.java deleted file mode 100644 index c52071db7..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodCreateInputTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PaymentMethodCreateInput - */ -public class PaymentMethodCreateInputTest { - private final PaymentMethodCreateInput model = new PaymentMethodCreateInput(); - - /** - * Model tests for PaymentMethodCreateInput - */ - @Test - public void testPaymentMethodCreateInput() { - // TODO: test PaymentMethodCreateInput - } - - /** - * Test the property '_default' - */ - @Test - public void _defaultTest() { - // TODO: test _default - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'nonce' - */ - @Test - public void nonceTest() { - // TODO: test nonce - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodListTest.java deleted file mode 100644 index de3664630..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PaymentMethod; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PaymentMethodList - */ -public class PaymentMethodListTest { - private final PaymentMethodList model = new PaymentMethodList(); - - /** - * Model tests for PaymentMethodList - */ - @Test - public void testPaymentMethodList() { - // TODO: test PaymentMethodList - } - - /** - * Test the property 'paymentMethods' - */ - @Test - public void paymentMethodsTest() { - // TODO: test paymentMethods - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodTest.java deleted file mode 100644 index 77657d02c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodTest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.PaymentMethodBillingAddress; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PaymentMethod - */ -public class PaymentMethodTest { - private final PaymentMethod model = new PaymentMethod(); - - /** - * Model tests for PaymentMethod - */ - @Test - public void testPaymentMethod() { - // TODO: test PaymentMethod - } - - /** - * Test the property 'billingAddress' - */ - @Test - public void billingAddressTest() { - // TODO: test billingAddress - } - - /** - * Test the property 'cardType' - */ - @Test - public void cardTypeTest() { - // TODO: test cardType - } - - /** - * Test the property 'cardholderName' - */ - @Test - public void cardholderNameTest() { - // TODO: test cardholderName - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdByUser' - */ - @Test - public void createdByUserTest() { - // TODO: test createdByUser - } - - /** - * Test the property '_default' - */ - @Test - public void _defaultTest() { - // TODO: test _default - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'expirationMonth' - */ - @Test - public void expirationMonthTest() { - // TODO: test expirationMonth - } - - /** - * Test the property 'expirationYear' - */ - @Test - public void expirationYearTest() { - // TODO: test expirationYear - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'organization' - */ - @Test - public void organizationTest() { - // TODO: test organization - } - - /** - * Test the property 'projects' - */ - @Test - public void projectsTest() { - // TODO: test projects - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInputTest.java deleted file mode 100644 index daa502738..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PaymentMethodUpdateInputTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PaymentMethodUpdateInput - */ -public class PaymentMethodUpdateInputTest { - private final PaymentMethodUpdateInput model = new PaymentMethodUpdateInput(); - - /** - * Model tests for PaymentMethodUpdateInput - */ - @Test - public void testPaymentMethodUpdateInput() { - // TODO: test PaymentMethodUpdateInput - } - - /** - * Test the property 'billingAddress' - */ - @Test - public void billingAddressTest() { - // TODO: test billingAddress - } - - /** - * Test the property 'cardholderName' - */ - @Test - public void cardholderNameTest() { - // TODO: test cardholderName - } - - /** - * Test the property '_default' - */ - @Test - public void _defaultTest() { - // TODO: test _default - } - - /** - * Test the property 'expirationMonth' - */ - @Test - public void expirationMonthTest() { - // TODO: test expirationMonth - } - - /** - * Test the property 'expirationYear' - */ - @Test - public void expirationYearTest() { - // TODO: test expirationYear - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerPriceTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerPriceTest.java deleted file mode 100644 index f963da700..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerPriceTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanAvailableInInnerPrice - */ -public class PlanAvailableInInnerPriceTest { - private final PlanAvailableInInnerPrice model = new PlanAvailableInInnerPrice(); - - /** - * Model tests for PlanAvailableInInnerPrice - */ - @Test - public void testPlanAvailableInInnerPrice() { - // TODO: test PlanAvailableInInnerPrice - } - - /** - * Test the property 'hour' - */ - @Test - public void hourTest() { - // TODO: test hour - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerTest.java deleted file mode 100644 index c89e8f169..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInInnerTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PlanAvailableInInnerPrice; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanAvailableInInner - */ -public class PlanAvailableInInnerTest { - private final PlanAvailableInInner model = new PlanAvailableInInner(); - - /** - * Model tests for PlanAvailableInInner - */ - @Test - public void testPlanAvailableInInner() { - // TODO: test PlanAvailableInInner - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'price' - */ - @Test - public void priceTest() { - // TODO: test price - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerTest.java deleted file mode 100644 index 425b7ceec..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanAvailableInMetrosInnerTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PlanAvailableInInnerPrice; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanAvailableInMetrosInner - */ -public class PlanAvailableInMetrosInnerTest { - private final PlanAvailableInMetrosInner model = new PlanAvailableInMetrosInner(); - - /** - * Model tests for PlanAvailableInMetrosInner - */ - @Test - public void testPlanAvailableInMetrosInner() { - // TODO: test PlanAvailableInMetrosInner - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'price' - */ - @Test - public void priceTest() { - // TODO: test price - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanListTest.java deleted file mode 100644 index 5ca9b9f69..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Plan; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanList - */ -public class PlanListTest { - private final PlanList model = new PlanList(); - - /** - * Model tests for PlanList - */ - @Test - public void testPlanList() { - // TODO: test PlanList - } - - /** - * Test the property 'plans' - */ - @Test - public void plansTest() { - // TODO: test plans - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsCpusInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsCpusInnerTest.java deleted file mode 100644 index fcfa3427d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsCpusInnerTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanSpecsCpusInner - */ -public class PlanSpecsCpusInnerTest { - private final PlanSpecsCpusInner model = new PlanSpecsCpusInner(); - - /** - * Model tests for PlanSpecsCpusInner - */ - @Test - public void testPlanSpecsCpusInner() { - // TODO: test PlanSpecsCpusInner - } - - /** - * Test the property 'count' - */ - @Test - public void countTest() { - // TODO: test count - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsDrivesInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsDrivesInnerTest.java deleted file mode 100644 index 3da89a34e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsDrivesInnerTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanSpecsDrivesInner - */ -public class PlanSpecsDrivesInnerTest { - private final PlanSpecsDrivesInner model = new PlanSpecsDrivesInner(); - - /** - * Model tests for PlanSpecsDrivesInner - */ - @Test - public void testPlanSpecsDrivesInner() { - // TODO: test PlanSpecsDrivesInner - } - - /** - * Test the property 'count' - */ - @Test - public void countTest() { - // TODO: test count - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - - /** - * Test the property 'category' - */ - @Test - public void categoryTest() { - // TODO: test category - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsFeaturesTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsFeaturesTest.java deleted file mode 100644 index 37d6481ce..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsFeaturesTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanSpecsFeatures - */ -public class PlanSpecsFeaturesTest { - private final PlanSpecsFeatures model = new PlanSpecsFeatures(); - - /** - * Model tests for PlanSpecsFeatures - */ - @Test - public void testPlanSpecsFeatures() { - // TODO: test PlanSpecsFeatures - } - - /** - * Test the property 'raid' - */ - @Test - public void raidTest() { - // TODO: test raid - } - - /** - * Test the property 'txt' - */ - @Test - public void txtTest() { - // TODO: test txt - } - - /** - * Test the property 'uefi' - */ - @Test - public void uefiTest() { - // TODO: test uefi - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsMemoryTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsMemoryTest.java deleted file mode 100644 index 76b42324e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsMemoryTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanSpecsMemory - */ -public class PlanSpecsMemoryTest { - private final PlanSpecsMemory model = new PlanSpecsMemory(); - - /** - * Model tests for PlanSpecsMemory - */ - @Test - public void testPlanSpecsMemory() { - // TODO: test PlanSpecsMemory - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsNicsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsNicsInnerTest.java deleted file mode 100644 index 835e938d4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsNicsInnerTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanSpecsNicsInner - */ -public class PlanSpecsNicsInnerTest { - private final PlanSpecsNicsInner model = new PlanSpecsNicsInner(); - - /** - * Model tests for PlanSpecsNicsInner - */ - @Test - public void testPlanSpecsNicsInner() { - // TODO: test PlanSpecsNicsInner - } - - /** - * Test the property 'count' - */ - @Test - public void countTest() { - // TODO: test count - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsTest.java deleted file mode 100644 index 1a12e77d2..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanSpecsTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PlanSpecsCpusInner; -import com.equinix.openapi.metal.v1.model.PlanSpecsDrivesInner; -import com.equinix.openapi.metal.v1.model.PlanSpecsFeatures; -import com.equinix.openapi.metal.v1.model.PlanSpecsMemory; -import com.equinix.openapi.metal.v1.model.PlanSpecsNicsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PlanSpecs - */ -public class PlanSpecsTest { - private final PlanSpecs model = new PlanSpecs(); - - /** - * Model tests for PlanSpecs - */ - @Test - public void testPlanSpecs() { - // TODO: test PlanSpecs - } - - /** - * Test the property 'cpus' - */ - @Test - public void cpusTest() { - // TODO: test cpus - } - - /** - * Test the property 'memory' - */ - @Test - public void memoryTest() { - // TODO: test memory - } - - /** - * Test the property 'drives' - */ - @Test - public void drivesTest() { - // TODO: test drives - } - - /** - * Test the property 'nics' - */ - @Test - public void nicsTest() { - // TODO: test nics - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanTest.java deleted file mode 100644 index f3d548d0a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PlanTest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PlanAvailableInInner; -import com.equinix.openapi.metal.v1.model.PlanAvailableInMetrosInner; -import com.equinix.openapi.metal.v1.model.PlanSpecs; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Plan - */ -public class PlanTest { - private final Plan model = new Plan(); - - /** - * Model tests for Plan - */ - @Test - public void testPlan() { - // TODO: test Plan - } - - /** - * Test the property 'availableIn' - */ - @Test - public void availableInTest() { - // TODO: test availableIn - } - - /** - * Test the property 'availableInMetros' - */ - @Test - public void availableInMetrosTest() { - // TODO: test availableInMetros - } - - /** - * Test the property 'categories' - */ - @Test - public void categoriesTest() { - // TODO: test categories - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'deploymentTypes' - */ - @Test - public void deploymentTypesTest() { - // TODO: test deploymentTypes - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'legacy' - */ - @Test - public void legacyTest() { - // TODO: test legacy - } - - /** - * Test the property 'line' - */ - @Test - public void lineTest() { - // TODO: test line - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'pricing' - */ - @Test - public void pricingTest() { - // TODO: test pricing - } - - /** - * Test the property 'slug' - */ - @Test - public void slugTest() { - // TODO: test slug - } - - /** - * Test the property 'specs' - */ - @Test - public void specsTest() { - // TODO: test specs - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortAssignInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortAssignInputTest.java deleted file mode 100644 index f79d10569..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortAssignInputTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortAssignInput - */ -public class PortAssignInputTest { - private final PortAssignInput model = new PortAssignInput(); - - /** - * Model tests for PortAssignInput - */ - @Test - public void testPortAssignInput() { - // TODO: test PortAssignInput - } - - /** - * Test the property 'vnid' - */ - @Test - public void vnidTest() { - // TODO: test vnid - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInnerTest.java deleted file mode 100644 index a0b6fe82b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputRequestIpsInnerTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortConvertLayer3InputRequestIpsInner - */ -public class PortConvertLayer3InputRequestIpsInnerTest { - private final PortConvertLayer3InputRequestIpsInner model = new PortConvertLayer3InputRequestIpsInner(); - - /** - * Model tests for PortConvertLayer3InputRequestIpsInner - */ - @Test - public void testPortConvertLayer3InputRequestIpsInner() { - // TODO: test PortConvertLayer3InputRequestIpsInner - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputTest.java deleted file mode 100644 index 6b08d626f..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortConvertLayer3InputTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PortConvertLayer3InputRequestIpsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortConvertLayer3Input - */ -public class PortConvertLayer3InputTest { - private final PortConvertLayer3Input model = new PortConvertLayer3Input(); - - /** - * Model tests for PortConvertLayer3Input - */ - @Test - public void testPortConvertLayer3Input() { - // TODO: test PortConvertLayer3Input - } - - /** - * Test the property 'requestIps' - */ - @Test - public void requestIpsTest() { - // TODO: test requestIps - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortDataTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortDataTest.java deleted file mode 100644 index 3f324077d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortDataTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortData - */ -public class PortDataTest { - private final PortData model = new PortData(); - - /** - * Model tests for PortData - */ - @Test - public void testPortData() { - // TODO: test PortData - } - - /** - * Test the property 'mac' - */ - @Test - public void macTest() { - // TODO: test mac - } - - /** - * Test the property 'bonded' - */ - @Test - public void bondedTest() { - // TODO: test bonded - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortTest.java deleted file mode 100644 index d7c23e5d3..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.BondPortData; -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.PortData; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Port - */ -public class PortTest { - private final Port model = new Port(); - - /** - * Model tests for Port - */ - @Test - public void testPort() { - // TODO: test Port - } - - /** - * Test the property 'bond' - */ - @Test - public void bondTest() { - // TODO: test bond - } - - /** - * Test the property 'data' - */ - @Test - public void dataTest() { - // TODO: test data - } - - /** - * Test the property 'disbondOperationSupported' - */ - @Test - public void disbondOperationSupportedTest() { - // TODO: test disbondOperationSupported - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'networkType' - */ - @Test - public void networkTypeTest() { - // TODO: test networkType - } - - /** - * Test the property 'nativeVirtualNetwork' - */ - @Test - public void nativeVirtualNetworkTest() { - // TODO: test nativeVirtualNetwork - } - - /** - * Test the property 'virtualNetworks' - */ - @Test - public void virtualNetworksTest() { - // TODO: test virtualNetworks - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputTest.java deleted file mode 100644 index 46babd491..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchCreateInputVlanAssignmentsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortVlanAssignmentBatchCreateInput - */ -public class PortVlanAssignmentBatchCreateInputTest { - private final PortVlanAssignmentBatchCreateInput model = new PortVlanAssignmentBatchCreateInput(); - - /** - * Model tests for PortVlanAssignmentBatchCreateInput - */ - @Test - public void testPortVlanAssignmentBatchCreateInput() { - // TODO: test PortVlanAssignmentBatchCreateInput - } - - /** - * Test the property 'vlanAssignments' - */ - @Test - public void vlanAssignmentsTest() { - // TODO: test vlanAssignments - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest.java deleted file mode 100644 index 212ced2b9..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortVlanAssignmentBatchCreateInputVlanAssignmentsInner - */ -public class PortVlanAssignmentBatchCreateInputVlanAssignmentsInnerTest { - private final PortVlanAssignmentBatchCreateInputVlanAssignmentsInner model = new PortVlanAssignmentBatchCreateInputVlanAssignmentsInner(); - - /** - * Model tests for PortVlanAssignmentBatchCreateInputVlanAssignmentsInner - */ - @Test - public void testPortVlanAssignmentBatchCreateInputVlanAssignmentsInner() { - // TODO: test PortVlanAssignmentBatchCreateInputVlanAssignmentsInner - } - - /** - * Test the property '_native' - */ - @Test - public void _nativeTest() { - // TODO: test _native - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'vlan' - */ - @Test - public void vlanTest() { - // TODO: test vlan - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchListTest.java deleted file mode 100644 index c958f612a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatch; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortVlanAssignmentBatchList - */ -public class PortVlanAssignmentBatchListTest { - private final PortVlanAssignmentBatchList model = new PortVlanAssignmentBatchList(); - - /** - * Model tests for PortVlanAssignmentBatchList - */ - @Test - public void testPortVlanAssignmentBatchList() { - // TODO: test PortVlanAssignmentBatchList - } - - /** - * Test the property 'batches' - */ - @Test - public void batchesTest() { - // TODO: test batches - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchTest.java deleted file mode 100644 index acb01793e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Port; -import com.equinix.openapi.metal.v1.model.PortVlanAssignmentBatchVlanAssignmentsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortVlanAssignmentBatch - */ -public class PortVlanAssignmentBatchTest { - private final PortVlanAssignmentBatch model = new PortVlanAssignmentBatch(); - - /** - * Model tests for PortVlanAssignmentBatch - */ - @Test - public void testPortVlanAssignmentBatch() { - // TODO: test PortVlanAssignmentBatch - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'errorMessages' - */ - @Test - public void errorMessagesTest() { - // TODO: test errorMessages - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'port' - */ - @Test - public void portTest() { - // TODO: test port - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'vlanAssignments' - */ - @Test - public void vlanAssignmentsTest() { - // TODO: test vlanAssignments - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInnerTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInnerTest.java deleted file mode 100644 index d3aa67087..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentBatchVlanAssignmentsInnerTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortVlanAssignmentBatchVlanAssignmentsInner - */ -public class PortVlanAssignmentBatchVlanAssignmentsInnerTest { - private final PortVlanAssignmentBatchVlanAssignmentsInner model = new PortVlanAssignmentBatchVlanAssignmentsInner(); - - /** - * Model tests for PortVlanAssignmentBatchVlanAssignmentsInner - */ - @Test - public void testPortVlanAssignmentBatchVlanAssignmentsInner() { - // TODO: test PortVlanAssignmentBatchVlanAssignmentsInner - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property '_native' - */ - @Test - public void _nativeTest() { - // TODO: test _native - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'vlan' - */ - @Test - public void vlanTest() { - // TODO: test vlan - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentListTest.java deleted file mode 100644 index 353489baa..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.PortVlanAssignment; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortVlanAssignmentList - */ -public class PortVlanAssignmentListTest { - private final PortVlanAssignmentList model = new PortVlanAssignmentList(); - - /** - * Model tests for PortVlanAssignmentList - */ - @Test - public void testPortVlanAssignmentList() { - // TODO: test PortVlanAssignmentList - } - - /** - * Test the property 'vlanAssignments' - */ - @Test - public void vlanAssignmentsTest() { - // TODO: test vlanAssignments - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentTest.java deleted file mode 100644 index c3f0e469f..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/PortVlanAssignmentTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for PortVlanAssignment - */ -public class PortVlanAssignmentTest { - private final PortVlanAssignment model = new PortVlanAssignment(); - - /** - * Model tests for PortVlanAssignment - */ - @Test - public void testPortVlanAssignment() { - // TODO: test PortVlanAssignment - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property '_native' - */ - @Test - public void _nativeTest() { - // TODO: test _native - } - - /** - * Test the property 'port' - */ - @Test - public void portTest() { - // TODO: test port - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'virtualNetwork' - */ - @Test - public void virtualNetworkTest() { - // TODO: test virtualNetwork - } - - /** - * Test the property 'vlan' - */ - @Test - public void vlanTest() { - // TODO: test vlan - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInputTest.java deleted file mode 100644 index 7004dda8b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateFromRootInputTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ProjectCreateFromRootInput - */ -public class ProjectCreateFromRootInputTest { - private final ProjectCreateFromRootInput model = new ProjectCreateFromRootInput(); - - /** - * Model tests for ProjectCreateFromRootInput - */ - @Test - public void testProjectCreateFromRootInput() { - // TODO: test ProjectCreateFromRootInput - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'organizationId' - */ - @Test - public void organizationIdTest() { - // TODO: test organizationId - } - - /** - * Test the property 'paymentMethodId' - */ - @Test - public void paymentMethodIdTest() { - // TODO: test paymentMethodId - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateInputTest.java deleted file mode 100644 index a756f2383..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectCreateInputTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ProjectCreateInput - */ -public class ProjectCreateInputTest { - private final ProjectCreateInput model = new ProjectCreateInput(); - - /** - * Model tests for ProjectCreateInput - */ - @Test - public void testProjectCreateInput() { - // TODO: test ProjectCreateInput - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'paymentMethodId' - */ - @Test - public void paymentMethodIdTest() { - // TODO: test paymentMethodId - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectIdNameTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectIdNameTest.java deleted file mode 100644 index 8af53aba7..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectIdNameTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ProjectIdName - */ -public class ProjectIdNameTest { - private final ProjectIdName model = new ProjectIdName(); - - /** - * Model tests for ProjectIdName - */ - @Test - public void testProjectIdName() { - // TODO: test ProjectIdName - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectListTest.java deleted file mode 100644 index f9b3e2793..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.Project; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ProjectList - */ -public class ProjectListTest { - private final ProjectList model = new ProjectList(); - - /** - * Model tests for ProjectList - */ - @Test - public void testProjectList() { - // TODO: test ProjectList - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - - /** - * Test the property 'projects' - */ - @Test - public void projectsTest() { - // TODO: test projects - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectTest.java deleted file mode 100644 index 36774d493..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectTest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Organization; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Project - */ -public class ProjectTest { - private final Project model = new Project(); - - /** - * Model tests for Project - */ - @Test - public void testProject() { - // TODO: test Project - } - - /** - * Test the property 'bgpConfig' - */ - @Test - public void bgpConfigTest() { - // TODO: test bgpConfig - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'devices' - */ - @Test - public void devicesTest() { - // TODO: test devices - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'invitations' - */ - @Test - public void invitationsTest() { - // TODO: test invitations - } - - /** - * Test the property 'maxDevices' - */ - @Test - public void maxDevicesTest() { - // TODO: test maxDevices - } - - /** - * Test the property 'members' - */ - @Test - public void membersTest() { - // TODO: test members - } - - /** - * Test the property 'memberships' - */ - @Test - public void membershipsTest() { - // TODO: test memberships - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'networkStatus' - */ - @Test - public void networkStatusTest() { - // TODO: test networkStatus - } - - /** - * Test the property 'organization' - */ - @Test - public void organizationTest() { - // TODO: test organization - } - - /** - * Test the property 'paymentMethod' - */ - @Test - public void paymentMethodTest() { - // TODO: test paymentMethod - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'volumes' - */ - @Test - public void volumesTest() { - // TODO: test volumes - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInputTest.java deleted file mode 100644 index 9b3f5f637..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUpdateInputTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ProjectUpdateInput - */ -public class ProjectUpdateInputTest { - private final ProjectUpdateInput model = new ProjectUpdateInput(); - - /** - * Model tests for ProjectUpdateInput - */ - @Test - public void testProjectUpdateInput() { - // TODO: test ProjectUpdateInput - } - - /** - * Test the property 'backendTransferEnabled' - */ - @Test - public void backendTransferEnabledTest() { - // TODO: test backendTransferEnabled - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'paymentMethodId' - */ - @Test - public void paymentMethodIdTest() { - // TODO: test paymentMethodId - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageListTest.java deleted file mode 100644 index 95186848e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.ProjectUsage; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ProjectUsageList - */ -public class ProjectUsageListTest { - private final ProjectUsageList model = new ProjectUsageList(); - - /** - * Model tests for ProjectUsageList - */ - @Test - public void testProjectUsageList() { - // TODO: test ProjectUsageList - } - - /** - * Test the property 'usages' - */ - @Test - public void usagesTest() { - // TODO: test usages - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageTest.java deleted file mode 100644 index 0c3018003..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ProjectUsageTest.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ProjectUsage - */ -public class ProjectUsageTest { - private final ProjectUsage model = new ProjectUsage(); - - /** - * Model tests for ProjectUsage - */ - @Test - public void testProjectUsage() { - // TODO: test ProjectUsage - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'planVersion' - */ - @Test - public void planVersionTest() { - // TODO: test planVersion - } - - /** - * Test the property 'price' - */ - @Test - public void priceTest() { - // TODO: test price - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'unit' - */ - @Test - public void unitTest() { - // TODO: test unit - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RaidTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RaidTest.java deleted file mode 100644 index 53a0d7528..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RaidTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Raid - */ -public class RaidTest { - private final Raid model = new Raid(); - - /** - * Model tests for Raid - */ - @Test - public void testRaid() { - // TODO: test Raid - } - - /** - * Test the property 'devices' - */ - @Test - public void devicesTest() { - // TODO: test devices - } - - /** - * Test the property 'level' - */ - @Test - public void levelTest() { - // TODO: test level - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RecoveryCodeListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RecoveryCodeListTest.java deleted file mode 100644 index 89100a05a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RecoveryCodeListTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for RecoveryCodeList - */ -public class RecoveryCodeListTest { - private final RecoveryCodeList model = new RecoveryCodeList(); - - /** - * Model tests for RecoveryCodeList - */ - @Test - public void testRecoveryCodeList() { - // TODO: test RecoveryCodeList - } - - /** - * Test the property 'recoveryCodes' - */ - @Test - public void recoveryCodesTest() { - // TODO: test recoveryCodes - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservation201ResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservation201ResponseTest.java deleted file mode 100644 index 4a61cfa0e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservation201ResponseTest.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.IPAssignment; -import com.equinix.openapi.metal.v1.model.IPReservation; -import com.equinix.openapi.metal.v1.model.IPReservationFacility; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for RequestIPReservation201Response - */ -public class RequestIPReservation201ResponseTest { - private final RequestIPReservation201Response model = new RequestIPReservation201Response(); - - /** - * Model tests for RequestIPReservation201Response - */ - @Test - public void testRequestIPReservation201Response() { - // TODO: test RequestIPReservation201Response - } - - /** - * Test the property 'addon' - */ - @Test - public void addonTest() { - // TODO: test addon - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'assignments' - */ - @Test - public void assignmentsTest() { - // TODO: test assignments - } - - /** - * Test the property 'available' - */ - @Test - public void availableTest() { - // TODO: test available - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'gateway' - */ - @Test - public void gatewayTest() { - // TODO: test gateway - } - - /** - * Test the property 'globalIp' - */ - @Test - public void globalIpTest() { - // TODO: test globalIp - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'manageable' - */ - @Test - public void manageableTest() { - // TODO: test manageable - } - - /** - * Test the property 'management' - */ - @Test - public void managementTest() { - // TODO: test management - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'projectLite' - */ - @Test - public void projectLiteTest() { - // TODO: test projectLite - } - - /** - * Test the property 'requestedBy' - */ - @Test - public void requestedByTest() { - // TODO: test requestedBy - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequestTest.java deleted file mode 100644 index 9d9cb017a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/RequestIPReservationRequestTest.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.IPReservationRequestInput; -import com.equinix.openapi.metal.v1.model.VrfIpReservationCreateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for RequestIPReservationRequest - */ -public class RequestIPReservationRequestTest { - private final RequestIPReservationRequest model = new RequestIPReservationRequest(); - - /** - * Model tests for RequestIPReservationRequest - */ - @Test - public void testRequestIPReservationRequest() { - // TODO: test RequestIPReservationRequest - } - - /** - * Test the property 'comments' - */ - @Test - public void commentsTest() { - // TODO: test comments - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'failOnApprovalRequired' - */ - @Test - public void failOnApprovalRequiredTest() { - // TODO: test failOnApprovalRequired - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'vrfId' - */ - @Test - public void vrfIdTest() { - // TODO: test vrfId - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInputTest.java deleted file mode 100644 index 648c9ea28..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyCreateInputTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SSHKeyCreateInput - */ -public class SSHKeyCreateInputTest { - private final SSHKeyCreateInput model = new SSHKeyCreateInput(); - - /** - * Model tests for SSHKeyCreateInput - */ - @Test - public void testSSHKeyCreateInput() { - // TODO: test SSHKeyCreateInput - } - - /** - * Test the property 'instancesIds' - */ - @Test - public void instancesIdsTest() { - // TODO: test instancesIds - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'label' - */ - @Test - public void labelTest() { - // TODO: test label - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyInputTest.java deleted file mode 100644 index e7c48dfba..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyInputTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SSHKeyInput - */ -public class SSHKeyInputTest { - private final SSHKeyInput model = new SSHKeyInput(); - - /** - * Model tests for SSHKeyInput - */ - @Test - public void testSSHKeyInput() { - // TODO: test SSHKeyInput - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'label' - */ - @Test - public void labelTest() { - // TODO: test label - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyListTest.java deleted file mode 100644 index 69c80bac0..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SSHKey; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SSHKeyList - */ -public class SSHKeyListTest { - private final SSHKeyList model = new SSHKeyList(); - - /** - * Model tests for SSHKeyList - */ - @Test - public void testSSHKeyList() { - // TODO: test SSHKeyList - } - - /** - * Test the property 'sshKeys' - */ - @Test - public void sshKeysTest() { - // TODO: test sshKeys - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyTest.java deleted file mode 100644 index 5802b3460..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SSHKeyTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SSHKey - */ -public class SSHKeyTest { - private final SSHKey model = new SSHKey(); - - /** - * Model tests for SSHKey - */ - @Test - public void testSSHKey() { - // TODO: test SSHKey - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'entity' - */ - @Test - public void entityTest() { - // TODO: test entity - } - - /** - * Test the property 'fingerprint' - */ - @Test - public void fingerprintTest() { - // TODO: test fingerprint - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'label' - */ - @Test - public void labelTest() { - // TODO: test label - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequestTest.java deleted file mode 100644 index 263c4382c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemRequestTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SelfServiceReservationItemRequest - */ -public class SelfServiceReservationItemRequestTest { - private final SelfServiceReservationItemRequest model = new SelfServiceReservationItemRequest(); - - /** - * Model tests for SelfServiceReservationItemRequest - */ - @Test - public void testSelfServiceReservationItemRequest() { - // TODO: test SelfServiceReservationItemRequest - } - - /** - * Test the property 'amount' - */ - @Test - public void amountTest() { - // TODO: test amount - } - - /** - * Test the property 'metroId' - */ - @Test - public void metroIdTest() { - // TODO: test metroId - } - - /** - * Test the property 'planId' - */ - @Test - public void planIdTest() { - // TODO: test planId - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'term' - */ - @Test - public void termTest() { - // TODO: test term - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponseTest.java deleted file mode 100644 index 08340aef0..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationItemResponseTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SelfServiceReservationItemResponse - */ -public class SelfServiceReservationItemResponseTest { - private final SelfServiceReservationItemResponse model = new SelfServiceReservationItemResponse(); - - /** - * Model tests for SelfServiceReservationItemResponse - */ - @Test - public void testSelfServiceReservationItemResponse() { - // TODO: test SelfServiceReservationItemResponse - } - - /** - * Test the property 'amount' - */ - @Test - public void amountTest() { - // TODO: test amount - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'metroCode' - */ - @Test - public void metroCodeTest() { - // TODO: test metroCode - } - - /** - * Test the property 'metroId' - */ - @Test - public void metroIdTest() { - // TODO: test metroId - } - - /** - * Test the property 'metroName' - */ - @Test - public void metroNameTest() { - // TODO: test metroName - } - - /** - * Test the property 'planId' - */ - @Test - public void planIdTest() { - // TODO: test planId - } - - /** - * Test the property 'planName' - */ - @Test - public void planNameTest() { - // TODO: test planName - } - - /** - * Test the property 'planSlug' - */ - @Test - public void planSlugTest() { - // TODO: test planSlug - } - - /** - * Test the property 'planCategories' - */ - @Test - public void planCategoriesTest() { - // TODO: test planCategories - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'term' - */ - @Test - public void termTest() { - // TODO: test term - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationListTest.java deleted file mode 100644 index 301a4b825..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SelfServiceReservationResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SelfServiceReservationList - */ -public class SelfServiceReservationListTest { - private final SelfServiceReservationList model = new SelfServiceReservationList(); - - /** - * Model tests for SelfServiceReservationList - */ - @Test - public void testSelfServiceReservationList() { - // TODO: test SelfServiceReservationList - } - - /** - * Test the property 'reservations' - */ - @Test - public void reservationsTest() { - // TODO: test reservations - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponseTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponseTest.java deleted file mode 100644 index 6aaf83424..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SelfServiceReservationResponseTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.CreateSelfServiceReservationRequestPeriod; -import com.equinix.openapi.metal.v1.model.SelfServiceReservationItemResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SelfServiceReservationResponse - */ -public class SelfServiceReservationResponseTest { - private final SelfServiceReservationResponse model = new SelfServiceReservationResponse(); - - /** - * Model tests for SelfServiceReservationResponse - */ - @Test - public void testSelfServiceReservationResponse() { - // TODO: test SelfServiceReservationResponse - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'item' - */ - @Test - public void itemTest() { - // TODO: test item - } - - /** - * Test the property 'notes' - */ - @Test - public void notesTest() { - // TODO: test notes - } - - /** - * Test the property 'organization' - */ - @Test - public void organizationTest() { - // TODO: test organization - } - - /** - * Test the property 'organizationId' - */ - @Test - public void organizationIdTest() { - // TODO: test organizationId - } - - /** - * Test the property 'period' - */ - @Test - public void periodTest() { - // TODO: test period - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'projectId' - */ - @Test - public void projectIdTest() { - // TODO: test projectId - } - - /** - * Test the property 'startDate' - */ - @Test - public void startDateTest() { - // TODO: test startDate - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'totalCost' - */ - @Test - public void totalCostTest() { - // TODO: test totalCost - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ServerInfoTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ServerInfoTest.java deleted file mode 100644 index 6f2bd84e5..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/ServerInfoTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ServerInfo - */ -public class ServerInfoTest { - private final ServerInfo model = new ServerInfo(); - - /** - * Model tests for ServerInfo - */ - @Test - public void testServerInfo() { - // TODO: test ServerInfo - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesListTest.java deleted file mode 100644 index 18f4f493a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesListTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotPricesReport; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotMarketPricesList - */ -public class SpotMarketPricesListTest { - private final SpotMarketPricesList model = new SpotMarketPricesList(); - - /** - * Model tests for SpotMarketPricesList - */ - @Test - public void testSpotMarketPricesList() { - // TODO: test SpotMarketPricesList - } - - /** - * Test the property 'spotMarketPrices' - */ - @Test - public void spotMarketPricesTest() { - // TODO: test spotMarketPrices - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroListTest.java deleted file mode 100644 index 5aa9fee24..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroListTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotMarketPricesPerMetroReport; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotMarketPricesPerMetroList - */ -public class SpotMarketPricesPerMetroListTest { - private final SpotMarketPricesPerMetroList model = new SpotMarketPricesPerMetroList(); - - /** - * Model tests for SpotMarketPricesPerMetroList - */ - @Test - public void testSpotMarketPricesPerMetroList() { - // TODO: test SpotMarketPricesPerMetroList - } - - /** - * Test the property 'spotMarketPrices' - */ - @Test - public void spotMarketPricesTest() { - // TODO: test spotMarketPrices - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReportTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReportTest.java deleted file mode 100644 index 36a69a49b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketPricesPerMetroReportTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotPricesPerFacility; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotMarketPricesPerMetroReport - */ -public class SpotMarketPricesPerMetroReportTest { - private final SpotMarketPricesPerMetroReport model = new SpotMarketPricesPerMetroReport(); - - /** - * Model tests for SpotMarketPricesPerMetroReport - */ - @Test - public void testSpotMarketPricesPerMetroReport() { - // TODO: test SpotMarketPricesPerMetroReport - } - - /** - * Test the property 'am' - */ - @Test - public void amTest() { - // TODO: test am - } - - /** - * Test the property 'ch' - */ - @Test - public void chTest() { - // TODO: test ch - } - - /** - * Test the property 'da' - */ - @Test - public void daTest() { - // TODO: test da - } - - /** - * Test the property 'la' - */ - @Test - public void laTest() { - // TODO: test la - } - - /** - * Test the property 'ny' - */ - @Test - public void nyTest() { - // TODO: test ny - } - - /** - * Test the property 'sg' - */ - @Test - public void sgTest() { - // TODO: test sg - } - - /** - * Test the property 'sv' - */ - @Test - public void svTest() { - // TODO: test sv - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceParametersTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceParametersTest.java deleted file mode 100644 index 547d19445..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputInstanceParametersTest.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotMarketRequestCreateInputInstanceParameters - */ -public class SpotMarketRequestCreateInputInstanceParametersTest { - private final SpotMarketRequestCreateInputInstanceParameters model = new SpotMarketRequestCreateInputInstanceParameters(); - - /** - * Model tests for SpotMarketRequestCreateInputInstanceParameters - */ - @Test - public void testSpotMarketRequestCreateInputInstanceParameters() { - // TODO: test SpotMarketRequestCreateInputInstanceParameters - } - - /** - * Test the property 'alwaysPxe' - */ - @Test - public void alwaysPxeTest() { - // TODO: test alwaysPxe - } - - /** - * Test the property 'billingCycle' - */ - @Test - public void billingCycleTest() { - // TODO: test billingCycle - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'features' - */ - @Test - public void featuresTest() { - // TODO: test features - } - - /** - * Test the property 'hostname' - */ - @Test - public void hostnameTest() { - // TODO: test hostname - } - - /** - * Test the property 'hostnames' - */ - @Test - public void hostnamesTest() { - // TODO: test hostnames - } - - /** - * Test the property 'locked' - */ - @Test - public void lockedTest() { - // TODO: test locked - } - - /** - * Test the property 'noSshKeys' - */ - @Test - public void noSshKeysTest() { - // TODO: test noSshKeys - } - - /** - * Test the property 'operatingSystem' - */ - @Test - public void operatingSystemTest() { - // TODO: test operatingSystem - } - - /** - * Test the property 'plan' - */ - @Test - public void planTest() { - // TODO: test plan - } - - /** - * Test the property 'privateIpv4SubnetSize' - */ - @Test - public void privateIpv4SubnetSizeTest() { - // TODO: test privateIpv4SubnetSize - } - - /** - * Test the property 'projectSshKeys' - */ - @Test - public void projectSshKeysTest() { - // TODO: test projectSshKeys - } - - /** - * Test the property 'publicIpv4SubnetSize' - */ - @Test - public void publicIpv4SubnetSizeTest() { - // TODO: test publicIpv4SubnetSize - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'terminationTime' - */ - @Test - public void terminationTimeTest() { - // TODO: test terminationTime - } - - /** - * Test the property 'userSshKeys' - */ - @Test - public void userSshKeysTest() { - // TODO: test userSshKeys - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputTest.java deleted file mode 100644 index e3bc81acd..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestCreateInputTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotMarketRequestCreateInputInstanceParameters; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotMarketRequestCreateInput - */ -public class SpotMarketRequestCreateInputTest { - private final SpotMarketRequestCreateInput model = new SpotMarketRequestCreateInput(); - - /** - * Model tests for SpotMarketRequestCreateInput - */ - @Test - public void testSpotMarketRequestCreateInput() { - // TODO: test SpotMarketRequestCreateInput - } - - /** - * Test the property 'devicesMax' - */ - @Test - public void devicesMaxTest() { - // TODO: test devicesMax - } - - /** - * Test the property 'devicesMin' - */ - @Test - public void devicesMinTest() { - // TODO: test devicesMin - } - - /** - * Test the property 'endAt' - */ - @Test - public void endAtTest() { - // TODO: test endAt - } - - /** - * Test the property 'facilities' - */ - @Test - public void facilitiesTest() { - // TODO: test facilities - } - - /** - * Test the property 'instanceParameters' - */ - @Test - public void instanceParametersTest() { - // TODO: test instanceParameters - } - - /** - * Test the property 'maxBidPrice' - */ - @Test - public void maxBidPriceTest() { - // TODO: test maxBidPrice - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestListTest.java deleted file mode 100644 index e98361175..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotMarketRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotMarketRequestList - */ -public class SpotMarketRequestListTest { - private final SpotMarketRequestList model = new SpotMarketRequestList(); - - /** - * Model tests for SpotMarketRequestList - */ - @Test - public void testSpotMarketRequestList() { - // TODO: test SpotMarketRequestList - } - - /** - * Test the property 'spotMarketRequests' - */ - @Test - public void spotMarketRequestsTest() { - // TODO: test spotMarketRequests - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetroTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetroTest.java deleted file mode 100644 index 273e51146..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestMetroTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotMarketRequestMetro - */ -public class SpotMarketRequestMetroTest { - private final SpotMarketRequestMetro model = new SpotMarketRequestMetro(); - - /** - * Model tests for SpotMarketRequestMetro - */ - @Test - public void testSpotMarketRequestMetro() { - // TODO: test SpotMarketRequestMetro - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'country' - */ - @Test - public void countryTest() { - // TODO: test country - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestTest.java deleted file mode 100644 index cadba602a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotMarketRequestTest.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.SpotMarketRequestMetro; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotMarketRequest - */ -public class SpotMarketRequestTest { - private final SpotMarketRequest model = new SpotMarketRequest(); - - /** - * Model tests for SpotMarketRequest - */ - @Test - public void testSpotMarketRequest() { - // TODO: test SpotMarketRequest - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'devicesMax' - */ - @Test - public void devicesMaxTest() { - // TODO: test devicesMax - } - - /** - * Test the property 'devicesMin' - */ - @Test - public void devicesMinTest() { - // TODO: test devicesMin - } - - /** - * Test the property 'endAt' - */ - @Test - public void endAtTest() { - // TODO: test endAt - } - - /** - * Test the property 'facilities' - */ - @Test - public void facilitiesTest() { - // TODO: test facilities - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'instances' - */ - @Test - public void instancesTest() { - // TODO: test instances - } - - /** - * Test the property 'maxBidPrice' - */ - @Test - public void maxBidPriceTest() { - // TODO: test maxBidPrice - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapointsTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapointsTest.java deleted file mode 100644 index b2e2e8e7c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesDatapointsTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotPricesDatapoints - */ -public class SpotPricesDatapointsTest { - private final SpotPricesDatapoints model = new SpotPricesDatapoints(); - - /** - * Model tests for SpotPricesDatapoints - */ - @Test - public void testSpotPricesDatapoints() { - // TODO: test SpotPricesDatapoints - } - - /** - * Test the property 'datapoints' - */ - @Test - public void datapointsTest() { - // TODO: test datapoints - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReportTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReportTest.java deleted file mode 100644 index 179bf782b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesHistoryReportTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotPricesDatapoints; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotPricesHistoryReport - */ -public class SpotPricesHistoryReportTest { - private final SpotPricesHistoryReport model = new SpotPricesHistoryReport(); - - /** - * Model tests for SpotPricesHistoryReport - */ - @Test - public void testSpotPricesHistoryReport() { - // TODO: test SpotPricesHistoryReport - } - - /** - * Test the property 'pricesHistory' - */ - @Test - public void pricesHistoryTest() { - // TODO: test pricesHistory - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetalTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetalTest.java deleted file mode 100644 index 273bacc30..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerBaremetalTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotPricesPerBaremetal - */ -public class SpotPricesPerBaremetalTest { - private final SpotPricesPerBaremetal model = new SpotPricesPerBaremetal(); - - /** - * Model tests for SpotPricesPerBaremetal - */ - @Test - public void testSpotPricesPerBaremetal() { - // TODO: test SpotPricesPerBaremetal - } - - /** - * Test the property 'price' - */ - @Test - public void priceTest() { - // TODO: test price - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacilityTest.java deleted file mode 100644 index 9aef588fc..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerFacilityTest.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotPricesPerBaremetal; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotPricesPerFacility - */ -public class SpotPricesPerFacilityTest { - private final SpotPricesPerFacility model = new SpotPricesPerFacility(); - - /** - * Model tests for SpotPricesPerFacility - */ - @Test - public void testSpotPricesPerFacility() { - // TODO: test SpotPricesPerFacility - } - - /** - * Test the property 'baremetal0' - */ - @Test - public void baremetal0Test() { - // TODO: test baremetal0 - } - - /** - * Test the property 'baremetal1' - */ - @Test - public void baremetal1Test() { - // TODO: test baremetal1 - } - - /** - * Test the property 'baremetal2' - */ - @Test - public void baremetal2Test() { - // TODO: test baremetal2 - } - - /** - * Test the property 'baremetal2a' - */ - @Test - public void baremetal2aTest() { - // TODO: test baremetal2a - } - - /** - * Test the property 'baremetal2a2' - */ - @Test - public void baremetal2a2Test() { - // TODO: test baremetal2a2 - } - - /** - * Test the property 'baremetal3' - */ - @Test - public void baremetal3Test() { - // TODO: test baremetal3 - } - - /** - * Test the property 'baremetalS' - */ - @Test - public void baremetalSTest() { - // TODO: test baremetalS - } - - /** - * Test the property 'c2MediumX86' - */ - @Test - public void c2MediumX86Test() { - // TODO: test c2MediumX86 - } - - /** - * Test the property 'm2XlargeX86' - */ - @Test - public void m2XlargeX86Test() { - // TODO: test m2XlargeX86 - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacilityTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacilityTest.java deleted file mode 100644 index 436cc6c81..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesPerNewFacilityTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotPricesPerBaremetal; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotPricesPerNewFacility - */ -public class SpotPricesPerNewFacilityTest { - private final SpotPricesPerNewFacility model = new SpotPricesPerNewFacility(); - - /** - * Model tests for SpotPricesPerNewFacility - */ - @Test - public void testSpotPricesPerNewFacility() { - // TODO: test SpotPricesPerNewFacility - } - - /** - * Test the property 'baremetal1e' - */ - @Test - public void baremetal1eTest() { - // TODO: test baremetal1e - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesReportTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesReportTest.java deleted file mode 100644 index 169fb2bec..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SpotPricesReportTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.SpotPricesPerFacility; -import com.equinix.openapi.metal.v1.model.SpotPricesPerNewFacility; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SpotPricesReport - */ -public class SpotPricesReportTest { - private final SpotPricesReport model = new SpotPricesReport(); - - /** - * Model tests for SpotPricesReport - */ - @Test - public void testSpotPricesReport() { - // TODO: test SpotPricesReport - } - - /** - * Test the property 'ams1' - */ - @Test - public void ams1Test() { - // TODO: test ams1 - } - - /** - * Test the property 'atl1' - */ - @Test - public void atl1Test() { - // TODO: test atl1 - } - - /** - * Test the property 'dfw1' - */ - @Test - public void dfw1Test() { - // TODO: test dfw1 - } - - /** - * Test the property 'ewr1' - */ - @Test - public void ewr1Test() { - // TODO: test ewr1 - } - - /** - * Test the property 'fra1' - */ - @Test - public void fra1Test() { - // TODO: test fra1 - } - - /** - * Test the property 'iad1' - */ - @Test - public void iad1Test() { - // TODO: test iad1 - } - - /** - * Test the property 'lax1' - */ - @Test - public void lax1Test() { - // TODO: test lax1 - } - - /** - * Test the property 'nrt1' - */ - @Test - public void nrt1Test() { - // TODO: test nrt1 - } - - /** - * Test the property 'ord1' - */ - @Test - public void ord1Test() { - // TODO: test ord1 - } - - /** - * Test the property 'sea1' - */ - @Test - public void sea1Test() { - // TODO: test sea1 - } - - /** - * Test the property 'sin1' - */ - @Test - public void sin1Test() { - // TODO: test sin1 - } - - /** - * Test the property 'sjc1' - */ - @Test - public void sjc1Test() { - // TODO: test sjc1 - } - - /** - * Test the property 'syd1' - */ - @Test - public void syd1Test() { - // TODO: test syd1 - } - - /** - * Test the property 'yyz1' - */ - @Test - public void yyz1Test() { - // TODO: test yyz1 - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/StorageTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/StorageTest.java deleted file mode 100644 index a08f1deca..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/StorageTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Disk; -import com.equinix.openapi.metal.v1.model.Filesystem; -import com.equinix.openapi.metal.v1.model.Raid; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Storage - */ -public class StorageTest { - private final Storage model = new Storage(); - - /** - * Model tests for Storage - */ - @Test - public void testStorage() { - // TODO: test Storage - } - - /** - * Test the property 'disks' - */ - @Test - public void disksTest() { - // TODO: test disks - } - - /** - * Test the property 'raid' - */ - @Test - public void raidTest() { - // TODO: test raid - } - - /** - * Test the property 'filesystems' - */ - @Test - public void filesystemsTest() { - // TODO: test filesystems - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SupportRequestInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SupportRequestInputTest.java deleted file mode 100644 index dd105c6da..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/SupportRequestInputTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for SupportRequestInput - */ -public class SupportRequestInputTest { - private final SupportRequestInput model = new SupportRequestInput(); - - /** - * Model tests for SupportRequestInput - */ - @Test - public void testSupportRequestInput() { - // TODO: test SupportRequestInput - } - - /** - * Test the property 'deviceId' - */ - @Test - public void deviceIdTest() { - // TODO: test deviceId - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'priority' - */ - @Test - public void priorityTest() { - // TODO: test priority - } - - /** - * Test the property 'projectId' - */ - @Test - public void projectIdTest() { - // TODO: test projectId - } - - /** - * Test the property 'subject' - */ - @Test - public void subjectTest() { - // TODO: test subject - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestInputTest.java deleted file mode 100644 index 935400d42..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestInputTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TransferRequestInput - */ -public class TransferRequestInputTest { - private final TransferRequestInput model = new TransferRequestInput(); - - /** - * Model tests for TransferRequestInput - */ - @Test - public void testTransferRequestInput() { - // TODO: test TransferRequestInput - } - - /** - * Test the property 'targetOrganizationId' - */ - @Test - public void targetOrganizationIdTest() { - // TODO: test targetOrganizationId - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestListTest.java deleted file mode 100644 index 982680faf..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.TransferRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TransferRequestList - */ -public class TransferRequestListTest { - private final TransferRequestList model = new TransferRequestList(); - - /** - * Model tests for TransferRequestList - */ - @Test - public void testTransferRequestList() { - // TODO: test TransferRequestList - } - - /** - * Test the property 'transfers' - */ - @Test - public void transfersTest() { - // TODO: test transfers - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestTest.java deleted file mode 100644 index d9fb2542f..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/TransferRequestTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for TransferRequest - */ -public class TransferRequestTest { - private final TransferRequest model = new TransferRequest(); - - /** - * Model tests for TransferRequest - */ - @Test - public void testTransferRequest() { - // TODO: test TransferRequest - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'targetOrganization' - */ - @Test - public void targetOrganizationTest() { - // TODO: test targetOrganization - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateEmailInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateEmailInputTest.java deleted file mode 100644 index 01b4fffbd..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UpdateEmailInputTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for UpdateEmailInput - */ -public class UpdateEmailInputTest { - private final UpdateEmailInput model = new UpdateEmailInput(); - - /** - * Model tests for UpdateEmailInput - */ - @Test - public void testUpdateEmailInput() { - // TODO: test UpdateEmailInput - } - - /** - * Test the property '_default' - */ - @Test - public void _defaultTest() { - // TODO: test _default - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserCreateInputTest.java deleted file mode 100644 index 81088fd74..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserCreateInputTest.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.EmailInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.File; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for UserCreateInput - */ -public class UserCreateInputTest { - private final UserCreateInput model = new UserCreateInput(); - - /** - * Model tests for UserCreateInput - */ - @Test - public void testUserCreateInput() { - // TODO: test UserCreateInput - } - - /** - * Test the property 'avatar' - */ - @Test - public void avatarTest() { - // TODO: test avatar - } - - /** - * Test the property 'companyName' - */ - @Test - public void companyNameTest() { - // TODO: test companyName - } - - /** - * Test the property 'companyUrl' - */ - @Test - public void companyUrlTest() { - // TODO: test companyUrl - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'emails' - */ - @Test - public void emailsTest() { - // TODO: test emails - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'level' - */ - @Test - public void levelTest() { - // TODO: test level - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'phoneNumber' - */ - @Test - public void phoneNumberTest() { - // TODO: test phoneNumber - } - - /** - * Test the property 'socialAccounts' - */ - @Test - public void socialAccountsTest() { - // TODO: test socialAccounts - } - - /** - * Test the property 'timezone' - */ - @Test - public void timezoneTest() { - // TODO: test timezone - } - - /** - * Test the property 'title' - */ - @Test - public void titleTest() { - // TODO: test title - } - - /** - * Test the property 'twoFactorAuth' - */ - @Test - public void twoFactorAuthTest() { - // TODO: test twoFactorAuth - } - - /** - * Test the property 'verifiedAt' - */ - @Test - public void verifiedAtTest() { - // TODO: test verifiedAt - } - - /** - * Test the property 'invitationId' - */ - @Test - public void invitationIdTest() { - // TODO: test invitationId - } - - /** - * Test the property 'nonce' - */ - @Test - public void nonceTest() { - // TODO: test nonce - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLimitedTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLimitedTest.java deleted file mode 100644 index c9cfa8bf4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLimitedTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for UserLimited - */ -public class UserLimitedTest { - private final UserLimited model = new UserLimited(); - - /** - * Model tests for UserLimited - */ - @Test - public void testUserLimited() { - // TODO: test UserLimited - } - - /** - * Test the property 'avatarThumbUrl' - */ - @Test - public void avatarThumbUrlTest() { - // TODO: test avatarThumbUrl - } - - /** - * Test the property 'avatarUrl' - */ - @Test - public void avatarUrlTest() { - // TODO: test avatarUrl - } - - /** - * Test the property 'fullName' - */ - @Test - public void fullNameTest() { - // TODO: test fullName - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserListTest.java deleted file mode 100644 index 7ef46e1fe..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.User; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for UserList - */ -public class UserListTest { - private final UserList model = new UserList(); - - /** - * Model tests for UserList - */ - @Test - public void testUserList() { - // TODO: test UserList - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - - /** - * Test the property 'users' - */ - @Test - public void usersTest() { - // TODO: test users - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLiteTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLiteTest.java deleted file mode 100644 index 8a3d4c8e2..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserLiteTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for UserLite - */ -public class UserLiteTest { - private final UserLite model = new UserLite(); - - /** - * Model tests for UserLite - */ - @Test - public void testUserLite() { - // TODO: test UserLite - } - - /** - * Test the property 'avatarThumbUrl' - */ - @Test - public void avatarThumbUrlTest() { - // TODO: test avatarThumbUrl - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'fullName' - */ - @Test - public void fullNameTest() { - // TODO: test fullName - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'shortId' - */ - @Test - public void shortIdTest() { - // TODO: test shortId - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserTest.java deleted file mode 100644 index d492e5940..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserTest.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for User - */ -public class UserTest { - private final User model = new User(); - - /** - * Model tests for User - */ - @Test - public void testUser() { - // TODO: test User - } - - /** - * Test the property 'avatarThumbUrl' - */ - @Test - public void avatarThumbUrlTest() { - // TODO: test avatarThumbUrl - } - - /** - * Test the property 'avatarUrl' - */ - @Test - public void avatarUrlTest() { - // TODO: test avatarUrl - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'defaultOrganizationId' - */ - @Test - public void defaultOrganizationIdTest() { - // TODO: test defaultOrganizationId - } - - /** - * Test the property 'defaultProjectId' - */ - @Test - public void defaultProjectIdTest() { - // TODO: test defaultProjectId - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'emails' - */ - @Test - public void emailsTest() { - // TODO: test emails - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'fraudScore' - */ - @Test - public void fraudScoreTest() { - // TODO: test fraudScore - } - - /** - * Test the property 'fullName' - */ - @Test - public void fullNameTest() { - // TODO: test fullName - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'lastLoginAt' - */ - @Test - public void lastLoginAtTest() { - // TODO: test lastLoginAt - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'maxOrganizations' - */ - @Test - public void maxOrganizationsTest() { - // TODO: test maxOrganizations - } - - /** - * Test the property 'maxProjects' - */ - @Test - public void maxProjectsTest() { - // TODO: test maxProjects - } - - /** - * Test the property 'phoneNumber' - */ - @Test - public void phoneNumberTest() { - // TODO: test phoneNumber - } - - /** - * Test the property 'shortId' - */ - @Test - public void shortIdTest() { - // TODO: test shortId - } - - /** - * Test the property 'timezone' - */ - @Test - public void timezoneTest() { - // TODO: test timezone - } - - /** - * Test the property 'twoFactorAuth' - */ - @Test - public void twoFactorAuthTest() { - // TODO: test twoFactorAuth - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserUpdateInputTest.java deleted file mode 100644 index fe196737e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserUpdateInputTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for UserUpdateInput - */ -public class UserUpdateInputTest { - private final UserUpdateInput model = new UserUpdateInput(); - - /** - * Model tests for UserUpdateInput - */ - @Test - public void testUserUpdateInput() { - // TODO: test UserUpdateInput - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'phoneNumber' - */ - @Test - public void phoneNumberTest() { - // TODO: test phoneNumber - } - - /** - * Test the property 'timezone' - */ - @Test - public void timezoneTest() { - // TODO: test timezone - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserdataTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserdataTest.java deleted file mode 100644 index de6e63a9e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/UserdataTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Userdata - */ -public class UserdataTest { - private final Userdata model = new Userdata(); - - /** - * Model tests for Userdata - */ - @Test - public void testUserdata() { - // TODO: test Userdata - } - - /** - * Test the property 'userdata' - */ - @Test - public void userdataTest() { - // TODO: test userdata - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VerifyEmailTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VerifyEmailTest.java deleted file mode 100644 index e6db217dd..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VerifyEmailTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VerifyEmail - */ -public class VerifyEmailTest { - private final VerifyEmail model = new VerifyEmail(); - - /** - * Model tests for VerifyEmail - */ - @Test - public void testVerifyEmail() { - // TODO: test VerifyEmail - } - - /** - * Test the property 'userToken' - */ - @Test - public void userTokenTest() { - // TODO: test userToken - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInputTest.java deleted file mode 100644 index 331458e8c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitCreateInputTest.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.VlanVirtualCircuitCreateInput; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuitCreateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VirtualCircuitCreateInput - */ -public class VirtualCircuitCreateInputTest { - private final VirtualCircuitCreateInput model = new VirtualCircuitCreateInput(); - - /** - * Model tests for VirtualCircuitCreateInput - */ - @Test - public void testVirtualCircuitCreateInput() { - // TODO: test VirtualCircuitCreateInput - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'nniVlan' - */ - @Test - public void nniVlanTest() { - // TODO: test nniVlan - } - - /** - * Test the property 'projectId' - */ - @Test - public void projectIdTest() { - // TODO: test projectId - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'vnid' - */ - @Test - public void vnidTest() { - // TODO: test vnid - } - - /** - * Test the property 'customerIp' - */ - @Test - public void customerIpTest() { - // TODO: test customerIp - } - - /** - * Test the property 'md5' - */ - @Test - public void md5Test() { - // TODO: test md5 - } - - /** - * Test the property 'metalIp' - */ - @Test - public void metalIpTest() { - // TODO: test metalIp - } - - /** - * Test the property 'peerAsn' - */ - @Test - public void peerAsnTest() { - // TODO: test peerAsn - } - - /** - * Test the property 'subnet' - */ - @Test - public void subnetTest() { - // TODO: test subnet - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListTest.java deleted file mode 100644 index 1a88799a6..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.VirtualCircuit; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VirtualCircuitList - */ -public class VirtualCircuitListTest { - private final VirtualCircuitList model = new VirtualCircuitList(); - - /** - * Model tests for VirtualCircuitList - */ - @Test - public void testVirtualCircuitList() { - // TODO: test VirtualCircuitList - } - - /** - * Test the property 'virtualCircuits' - */ - @Test - public void virtualCircuitsTest() { - // TODO: test virtualCircuits - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitTest.java deleted file mode 100644 index fdc17c28d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitTest.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.VlanVirtualCircuit; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuit; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuitType; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VirtualCircuit - */ -public class VirtualCircuitTest { - private final VirtualCircuit model = new VirtualCircuit(); - - /** - * Model tests for VirtualCircuit - */ - @Test - public void testVirtualCircuit() { - // TODO: test VirtualCircuit - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'nniVlan' - */ - @Test - public void nniVlanTest() { - // TODO: test nniVlan - } - - /** - * Test the property 'port' - */ - @Test - public void portTest() { - // TODO: test port - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'virtualNetwork' - */ - @Test - public void virtualNetworkTest() { - // TODO: test virtualNetwork - } - - /** - * Test the property 'vnid' - */ - @Test - public void vnidTest() { - // TODO: test vnid - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'customerIp' - */ - @Test - public void customerIpTest() { - // TODO: test customerIp - } - - /** - * Test the property 'md5' - */ - @Test - public void md5Test() { - // TODO: test md5 - } - - /** - * Test the property 'metalIp' - */ - @Test - public void metalIpTest() { - // TODO: test metalIp - } - - /** - * Test the property 'peerAsn' - */ - @Test - public void peerAsnTest() { - // TODO: test peerAsn - } - - /** - * Test the property 'subnet' - */ - @Test - public void subnetTest() { - // TODO: test subnet - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInputTest.java deleted file mode 100644 index 5547d06ef..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualCircuitUpdateInputTest.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.VlanVirtualCircuitUpdateInput; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuitUpdateInput; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VirtualCircuitUpdateInput - */ -public class VirtualCircuitUpdateInputTest { - private final VirtualCircuitUpdateInput model = new VirtualCircuitUpdateInput(); - - /** - * Model tests for VirtualCircuitUpdateInput - */ - @Test - public void testVirtualCircuitUpdateInput() { - // TODO: test VirtualCircuitUpdateInput - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'vnid' - */ - @Test - public void vnidTest() { - // TODO: test vnid - } - - /** - * Test the property 'customerIp' - */ - @Test - public void customerIpTest() { - // TODO: test customerIp - } - - /** - * Test the property 'md5' - */ - @Test - public void md5Test() { - // TODO: test md5 - } - - /** - * Test the property 'metalIp' - */ - @Test - public void metalIpTest() { - // TODO: test metalIp - } - - /** - * Test the property 'peerAsn' - */ - @Test - public void peerAsnTest() { - // TODO: test peerAsn - } - - /** - * Test the property 'subnet' - */ - @Test - public void subnetTest() { - // TODO: test subnet - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInputTest.java deleted file mode 100644 index 468a6f839..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkCreateInputTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VirtualNetworkCreateInput - */ -public class VirtualNetworkCreateInputTest { - private final VirtualNetworkCreateInput model = new VirtualNetworkCreateInput(); - - /** - * Model tests for VirtualNetworkCreateInput - */ - @Test - public void testVirtualNetworkCreateInput() { - // TODO: test VirtualNetworkCreateInput - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'vxlan' - */ - @Test - public void vxlanTest() { - // TODO: test vxlan - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkListTest.java deleted file mode 100644 index e82ec8459..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VirtualNetworkList - */ -public class VirtualNetworkListTest { - private final VirtualNetworkList model = new VirtualNetworkList(); - - /** - * Model tests for VirtualNetworkList - */ - @Test - public void testVirtualNetworkList() { - // TODO: test VirtualNetworkList - } - - /** - * Test the property 'virtualNetworks' - */ - @Test - public void virtualNetworksTest() { - // TODO: test virtualNetworks - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkTest.java deleted file mode 100644 index b7d55d93e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VirtualNetworkTest.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VirtualNetwork - */ -public class VirtualNetworkTest { - private final VirtualNetwork model = new VirtualNetwork(); - - /** - * Model tests for VirtualNetwork - */ - @Test - public void testVirtualNetwork() { - // TODO: test VirtualNetwork - } - - /** - * Test the property 'assignedTo' - */ - @Test - public void assignedToTest() { - // TODO: test assignedTo - } - - /** - * Test the property 'assignedToVirtualCircuit' - */ - @Test - public void assignedToVirtualCircuitTest() { - // TODO: test assignedToVirtualCircuit - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'facility' - */ - @Test - public void facilityTest() { - // TODO: test facility - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'instances' - */ - @Test - public void instancesTest() { - // TODO: test instances - } - - /** - * Test the property 'metalGateways' - */ - @Test - public void metalGatewaysTest() { - // TODO: test metalGateways - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'metroCode' - */ - @Test - public void metroCodeTest() { - // TODO: test metroCode - } - - /** - * Test the property 'vxlan' - */ - @Test - public void vxlanTest() { - // TODO: test vxlan - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanFabricVcCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanFabricVcCreateInputTest.java deleted file mode 100644 index 1bbdc68e2..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanFabricVcCreateInputTest.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VlanFabricVcCreateInput - */ -public class VlanFabricVcCreateInputTest { - private final VlanFabricVcCreateInput model = new VlanFabricVcCreateInput(); - - /** - * Model tests for VlanFabricVcCreateInput - */ - @Test - public void testVlanFabricVcCreateInput() { - // TODO: test VlanFabricVcCreateInput - } - - /** - * Test the property 'contactEmail' - */ - @Test - public void contactEmailTest() { - // TODO: test contactEmail - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'redundancy' - */ - @Test - public void redundancyTest() { - // TODO: test redundancy - } - - /** - * Test the property 'serviceTokenType' - */ - @Test - public void serviceTokenTypeTest() { - // TODO: test serviceTokenType - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'vlans' - */ - @Test - public void vlansTest() { - // TODO: test vlans - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitCreateInputTest.java deleted file mode 100644 index 5bf61cc4e..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitCreateInputTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VlanVirtualCircuitCreateInput - */ -public class VlanVirtualCircuitCreateInputTest { - private final VlanVirtualCircuitCreateInput model = new VlanVirtualCircuitCreateInput(); - - /** - * Model tests for VlanVirtualCircuitCreateInput - */ - @Test - public void testVlanVirtualCircuitCreateInput() { - // TODO: test VlanVirtualCircuitCreateInput - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'nniVlan' - */ - @Test - public void nniVlanTest() { - // TODO: test nniVlan - } - - /** - * Test the property 'projectId' - */ - @Test - public void projectIdTest() { - // TODO: test projectId - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'vnid' - */ - @Test - public void vnidTest() { - // TODO: test vnid - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTest.java deleted file mode 100644 index b3dfb73eb..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.VlanVirtualCircuitType; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VlanVirtualCircuit - */ -public class VlanVirtualCircuitTest { - private final VlanVirtualCircuit model = new VlanVirtualCircuit(); - - /** - * Model tests for VlanVirtualCircuit - */ - @Test - public void testVlanVirtualCircuit() { - // TODO: test VlanVirtualCircuit - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'nniVlan' - */ - @Test - public void nniVlanTest() { - // TODO: test nniVlan - } - - /** - * Test the property 'port' - */ - @Test - public void portTest() { - // TODO: test port - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'virtualNetwork' - */ - @Test - public void virtualNetworkTest() { - // TODO: test virtualNetwork - } - - /** - * Test the property 'vnid' - */ - @Test - public void vnidTest() { - // TODO: test vnid - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTypeTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTypeTest.java deleted file mode 100644 index dc99e3c56..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitTypeTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.annotations.SerializedName; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VlanVirtualCircuitType - */ -public class VlanVirtualCircuitTypeTest { - /** - * Model tests for VlanVirtualCircuitType - */ - @Test - public void testVlanVirtualCircuitType() { - // TODO: test VlanVirtualCircuitType - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitUpdateInputTest.java deleted file mode 100644 index 4ef306e20..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuitUpdateInputTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VlanVirtualCircuitUpdateInput - */ -public class VlanVirtualCircuitUpdateInputTest { - private final VlanVirtualCircuitUpdateInput model = new VlanVirtualCircuitUpdateInput(); - - /** - * Model tests for VlanVirtualCircuitUpdateInput - */ - @Test - public void testVlanVirtualCircuitUpdateInput() { - // TODO: test VlanVirtualCircuitUpdateInput - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'vnid' - */ - @Test - public void vnidTest() { - // TODO: test vnid - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfCreateInputTest.java deleted file mode 100644 index 74a16c7b4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfCreateInputTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfCreateInput - */ -public class VrfCreateInputTest { - private final VrfCreateInput model = new VrfCreateInput(); - - /** - * Model tests for VrfCreateInput - */ - @Test - public void testVrfCreateInput() { - // TODO: test VrfCreateInput - } - - /** - * Test the property 'bgpDynamicNeighborsEnabled' - */ - @Test - public void bgpDynamicNeighborsEnabledTest() { - // TODO: test bgpDynamicNeighborsEnabled - } - - /** - * Test the property 'bgpDynamicNeighborsExportRouteMap' - */ - @Test - public void bgpDynamicNeighborsExportRouteMapTest() { - // TODO: test bgpDynamicNeighborsExportRouteMap - } - - /** - * Test the property 'bgpDynamicNeighborsBfdEnabled' - */ - @Test - public void bgpDynamicNeighborsBfdEnabledTest() { - // TODO: test bgpDynamicNeighborsBfdEnabled - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'ipRanges' - */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** - * Test the property 'localAsn' - */ - @Test - public void localAsnTest() { - // TODO: test localAsn - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfFabricVcCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfFabricVcCreateInputTest.java deleted file mode 100644 index cfe7be883..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfFabricVcCreateInputTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfFabricVcCreateInput - */ -public class VrfFabricVcCreateInputTest { - private final VrfFabricVcCreateInput model = new VrfFabricVcCreateInput(); - - /** - * Model tests for VrfFabricVcCreateInput - */ - @Test - public void testVrfFabricVcCreateInput() { - // TODO: test VrfFabricVcCreateInput - } - - /** - * Test the property 'contactEmail' - */ - @Test - public void contactEmailTest() { - // TODO: test contactEmail - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'redundancy' - */ - @Test - public void redundancyTest() { - // TODO: test redundancy - } - - /** - * Test the property 'serviceTokenType' - */ - @Test - public void serviceTokenTypeTest() { - // TODO: test serviceTokenType - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'vrfs' - */ - @Test - public void vrfsTest() { - // TODO: test vrfs - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationCreateInputTest.java deleted file mode 100644 index 7635a3ff2..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationCreateInputTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfIpReservationCreateInput - */ -public class VrfIpReservationCreateInputTest { - private final VrfIpReservationCreateInput model = new VrfIpReservationCreateInput(); - - /** - * Model tests for VrfIpReservationCreateInput - */ - @Test - public void testVrfIpReservationCreateInput() { - // TODO: test VrfIpReservationCreateInput - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'vrfId' - */ - @Test - public void vrfIdTest() { - // TODO: test vrfId - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationListTest.java deleted file mode 100644 index c3851be59..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfIpReservationList - */ -public class VrfIpReservationListTest { - private final VrfIpReservationList model = new VrfIpReservationList(); - - /** - * Model tests for VrfIpReservationList - */ - @Test - public void testVrfIpReservationList() { - // TODO: test VrfIpReservationList - } - - /** - * Test the property 'ipAddresses' - */ - @Test - public void ipAddressesTest() { - // TODO: test ipAddresses - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationOrHrefTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationOrHrefTest.java deleted file mode 100644 index 21c7cf6fc..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationOrHrefTest.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservation; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfIpReservationOrHref - */ -public class VrfIpReservationOrHrefTest { - private final VrfIpReservationOrHref model = new VrfIpReservationOrHref(); - - /** - * Model tests for VrfIpReservationOrHref - */ - @Test - public void testVrfIpReservationOrHref() { - // TODO: test VrfIpReservationOrHref - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - - /** - * Test the property 'management' - */ - @Test - public void managementTest() { - // TODO: test management - } - - /** - * Test the property 'manageable' - */ - @Test - public void manageableTest() { - // TODO: test manageable - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'projectLite' - */ - @Test - public void projectLiteTest() { - // TODO: test projectLite - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'gateway' - */ - @Test - public void gatewayTest() { - // TODO: test gateway - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationTest.java deleted file mode 100644 index b69bbda97..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfIpReservationTest.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.MetalGatewayLite; -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfIpReservation - */ -public class VrfIpReservationTest { - private final VrfIpReservation model = new VrfIpReservation(); - - /** - * Model tests for VrfIpReservation - */ - @Test - public void testVrfIpReservation() { - // TODO: test VrfIpReservation - } - - /** - * Test the property 'addressFamily' - */ - @Test - public void addressFamilyTest() { - // TODO: test addressFamily - } - - /** - * Test the property 'cidr' - */ - @Test - public void cidrTest() { - // TODO: test cidr - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'details' - */ - @Test - public void detailsTest() { - // TODO: test details - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'netmask' - */ - @Test - public void netmaskTest() { - // TODO: test netmask - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - - /** - * Test the property '_public' - */ - @Test - public void _publicTest() { - // TODO: test _public - } - - /** - * Test the property 'management' - */ - @Test - public void managementTest() { - // TODO: test management - } - - /** - * Test the property 'manageable' - */ - @Test - public void manageableTest() { - // TODO: test manageable - } - - /** - * Test the property 'customdata' - */ - @Test - public void customdataTest() { - // TODO: test customdata - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'projectLite' - */ - @Test - public void projectLiteTest() { - // TODO: test projectLite - } - - /** - * Test the property 'address' - */ - @Test - public void addressTest() { - // TODO: test address - } - - /** - * Test the property 'gateway' - */ - @Test - public void gatewayTest() { - // TODO: test gateway - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfListTest.java deleted file mode 100644 index bc82ac59d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfListTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Vrf; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfList - */ -public class VrfListTest { - private final VrfList model = new VrfList(); - - /** - * Model tests for VrfList - */ - @Test - public void testVrfList() { - // TODO: test VrfList - } - - /** - * Test the property 'vrfs' - */ - @Test - public void vrfsTest() { - // TODO: test vrfs - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInputTest.java deleted file mode 100644 index 9499938c4..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayCreateInputTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfMetalGatewayCreateInput - */ -public class VrfMetalGatewayCreateInputTest { - private final VrfMetalGatewayCreateInput model = new VrfMetalGatewayCreateInput(); - - /** - * Model tests for VrfMetalGatewayCreateInput - */ - @Test - public void testVrfMetalGatewayCreateInput() { - // TODO: test VrfMetalGatewayCreateInput - } - - /** - * Test the property 'ipReservationId' - */ - @Test - public void ipReservationIdTest() { - // TODO: test ipReservationId - } - - /** - * Test the property 'virtualNetworkId' - */ - @Test - public void virtualNetworkIdTest() { - // TODO: test virtualNetworkId - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayTest.java deleted file mode 100644 index 2b810d60b..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfMetalGatewayTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfIpReservationOrHref; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfMetalGateway - */ -public class VrfMetalGatewayTest { - private final VrfMetalGateway model = new VrfMetalGateway(); - - /** - * Model tests for VrfMetalGateway - */ - @Test - public void testVrfMetalGateway() { - // TODO: test VrfMetalGateway - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'ipReservation' - */ - @Test - public void ipReservationTest() { - // TODO: test ipReservation - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'state' - */ - @Test - public void stateTest() { - // TODO: test state - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'virtualNetwork' - */ - @Test - public void virtualNetworkTest() { - // TODO: test virtualNetwork - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteCreateInputTest.java deleted file mode 100644 index dbe359c76..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteCreateInputTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfRouteCreateInput - */ -public class VrfRouteCreateInputTest { - private final VrfRouteCreateInput model = new VrfRouteCreateInput(); - - /** - * Model tests for VrfRouteCreateInput - */ - @Test - public void testVrfRouteCreateInput() { - // TODO: test VrfRouteCreateInput - } - - /** - * Test the property 'prefix' - */ - @Test - public void prefixTest() { - // TODO: test prefix - } - - /** - * Test the property 'nextHop' - */ - @Test - public void nextHopTest() { - // TODO: test nextHop - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteListTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteListTest.java deleted file mode 100644 index 8c2ddc365..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteListTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Meta; -import com.equinix.openapi.metal.v1.model.VrfRoute; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfRouteList - */ -public class VrfRouteListTest { - private final VrfRouteList model = new VrfRouteList(); - - /** - * Model tests for VrfRouteList - */ - @Test - public void testVrfRouteList() { - // TODO: test VrfRouteList - } - - /** - * Test the property 'routes' - */ - @Test - public void routesTest() { - // TODO: test routes - } - - /** - * Test the property 'meta' - */ - @Test - public void metaTest() { - // TODO: test meta - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteTest.java deleted file mode 100644 index 38e8e0255..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.VirtualNetwork; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfMetalGateway; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfRoute - */ -public class VrfRouteTest { - private final VrfRoute model = new VrfRoute(); - - /** - * Model tests for VrfRoute - */ - @Test - public void testVrfRoute() { - // TODO: test VrfRoute - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'prefix' - */ - @Test - public void prefixTest() { - // TODO: test prefix - } - - /** - * Test the property 'nextHop' - */ - @Test - public void nextHopTest() { - // TODO: test nextHop - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'metalGateway' - */ - @Test - public void metalGatewayTest() { - // TODO: test metalGateway - } - - /** - * Test the property 'virtualNetwork' - */ - @Test - public void virtualNetworkTest() { - // TODO: test virtualNetwork - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteUpdateInputTest.java deleted file mode 100644 index 4c9ed0654..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfRouteUpdateInputTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfRouteUpdateInput - */ -public class VrfRouteUpdateInputTest { - private final VrfRouteUpdateInput model = new VrfRouteUpdateInput(); - - /** - * Model tests for VrfRouteUpdateInput - */ - @Test - public void testVrfRouteUpdateInput() { - // TODO: test VrfRouteUpdateInput - } - - /** - * Test the property 'prefix' - */ - @Test - public void prefixTest() { - // TODO: test prefix - } - - /** - * Test the property 'nextHop' - */ - @Test - public void nextHopTest() { - // TODO: test nextHop - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfTest.java deleted file mode 100644 index 239c7103c..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfTest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Metro; -import com.equinix.openapi.metal.v1.model.Project; -import com.equinix.openapi.metal.v1.model.User; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuit; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Vrf - */ -public class VrfTest { - private final Vrf model = new Vrf(); - - /** - * Model tests for Vrf - */ - @Test - public void testVrf() { - // TODO: test Vrf - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'bill' - */ - @Test - public void billTest() { - // TODO: test bill - } - - /** - * Test the property 'bgpDynamicNeighborsEnabled' - */ - @Test - public void bgpDynamicNeighborsEnabledTest() { - // TODO: test bgpDynamicNeighborsEnabled - } - - /** - * Test the property 'bgpDynamicNeighborsExportRouteMap' - */ - @Test - public void bgpDynamicNeighborsExportRouteMapTest() { - // TODO: test bgpDynamicNeighborsExportRouteMap - } - - /** - * Test the property 'bgpDynamicNeighborsBfdEnabled' - */ - @Test - public void bgpDynamicNeighborsBfdEnabledTest() { - // TODO: test bgpDynamicNeighborsBfdEnabled - } - - /** - * Test the property 'localAsn' - */ - @Test - public void localAsnTest() { - // TODO: test localAsn - } - - /** - * Test the property 'virtualCircuits' - */ - @Test - public void virtualCircuitsTest() { - // TODO: test virtualCircuits - } - - /** - * Test the property 'ipRanges' - */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'metro' - */ - @Test - public void metroTest() { - // TODO: test metro - } - - /** - * Test the property 'createdBy' - */ - @Test - public void createdByTest() { - // TODO: test createdBy - } - - /** - * Test the property 'href' - */ - @Test - public void hrefTest() { - // TODO: test href - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfUpdateInputTest.java deleted file mode 100644 index 90615f796..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfUpdateInputTest.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfUpdateInput - */ -public class VrfUpdateInputTest { - private final VrfUpdateInput model = new VrfUpdateInput(); - - /** - * Model tests for VrfUpdateInput - */ - @Test - public void testVrfUpdateInput() { - // TODO: test VrfUpdateInput - } - - /** - * Test the property 'bgpDynamicNeighborsEnabled' - */ - @Test - public void bgpDynamicNeighborsEnabledTest() { - // TODO: test bgpDynamicNeighborsEnabled - } - - /** - * Test the property 'bgpDynamicNeighborsExportRouteMap' - */ - @Test - public void bgpDynamicNeighborsExportRouteMapTest() { - // TODO: test bgpDynamicNeighborsExportRouteMap - } - - /** - * Test the property 'bgpDynamicNeighborsBfdEnabled' - */ - @Test - public void bgpDynamicNeighborsBfdEnabledTest() { - // TODO: test bgpDynamicNeighborsBfdEnabled - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'ipRanges' - */ - @Test - public void ipRangesTest() { - // TODO: test ipRanges - } - - /** - * Test the property 'localAsn' - */ - @Test - public void localAsnTest() { - // TODO: test localAsn - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInputTest.java deleted file mode 100644 index 954c5acab..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitCreateInputTest.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfVirtualCircuitCreateInput - */ -public class VrfVirtualCircuitCreateInputTest { - private final VrfVirtualCircuitCreateInput model = new VrfVirtualCircuitCreateInput(); - - /** - * Model tests for VrfVirtualCircuitCreateInput - */ - @Test - public void testVrfVirtualCircuitCreateInput() { - // TODO: test VrfVirtualCircuitCreateInput - } - - /** - * Test the property 'customerIp' - */ - @Test - public void customerIpTest() { - // TODO: test customerIp - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'md5' - */ - @Test - public void md5Test() { - // TODO: test md5 - } - - /** - * Test the property 'metalIp' - */ - @Test - public void metalIpTest() { - // TODO: test metalIp - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'nniVlan' - */ - @Test - public void nniVlanTest() { - // TODO: test nniVlan - } - - /** - * Test the property 'peerAsn' - */ - @Test - public void peerAsnTest() { - // TODO: test peerAsn - } - - /** - * Test the property 'projectId' - */ - @Test - public void projectIdTest() { - // TODO: test projectId - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'subnet' - */ - @Test - public void subnetTest() { - // TODO: test subnet - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java deleted file mode 100644 index 6573a7d42..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTest.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.equinix.openapi.metal.v1.model.Href; -import com.equinix.openapi.metal.v1.model.Vrf; -import com.equinix.openapi.metal.v1.model.VrfVirtualCircuitType; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfVirtualCircuit - */ -public class VrfVirtualCircuitTest { - private final VrfVirtualCircuit model = new VrfVirtualCircuit(); - - /** - * Model tests for VrfVirtualCircuit - */ - @Test - public void testVrfVirtualCircuit() { - // TODO: test VrfVirtualCircuit - } - - /** - * Test the property 'customerIp' - */ - @Test - public void customerIpTest() { - // TODO: test customerIp - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'md5' - */ - @Test - public void md5Test() { - // TODO: test md5 - } - - /** - * Test the property 'metalIp' - */ - @Test - public void metalIpTest() { - // TODO: test metalIp - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'port' - */ - @Test - public void portTest() { - // TODO: test port - } - - /** - * Test the property 'nniVlan' - */ - @Test - public void nniVlanTest() { - // TODO: test nniVlan - } - - /** - * Test the property 'peerAsn' - */ - @Test - public void peerAsnTest() { - // TODO: test peerAsn - } - - /** - * Test the property 'project' - */ - @Test - public void projectTest() { - // TODO: test project - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'subnet' - */ - @Test - public void subnetTest() { - // TODO: test subnet - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'vrf' - */ - @Test - public void vrfTest() { - // TODO: test vrf - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'updatedAt' - */ - @Test - public void updatedAtTest() { - // TODO: test updatedAt - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTypeTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTypeTest.java deleted file mode 100644 index 8e03c2f1a..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitTypeTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.annotations.SerializedName; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfVirtualCircuitType - */ -public class VrfVirtualCircuitTypeTest { - /** - * Model tests for VrfVirtualCircuitType - */ - @Test - public void testVrfVirtualCircuitType() { - // TODO: test VrfVirtualCircuitType - } - -} diff --git a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInputTest.java b/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInputTest.java deleted file mode 100644 index d1fe7a36d..000000000 --- a/equinix-openapi-metal/src/test/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuitUpdateInputTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Metal API - * # Introduction Equinix Metal provides a RESTful HTTP API which can be reached at . This document describes the API and how to use it. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. Every feature of the Equinix Metal web interface is accessible through the API. The API docs are generated from the Equinix Metal OpenAPI specification and are officially hosted at . # Common Parameters The Equinix Metal API uses a few methods to minimize network traffic and improve throughput. These parameters are not used in all API calls, but are used often enough to warrant their own section. Look for these parameters in the documentation for the API calls that support them. ## Pagination Pagination is used to limit the number of results returned in a single request. The API will return a maximum of 100 results per page. To retrieve additional results, you can use the `page` and `per_page` query parameters. The `page` parameter is used to specify the page number. The first page is `1`. The `per_page` parameter is used to specify the number of results per page. The maximum number of results differs by resource type. ## Sorting Where offered, the API allows you to sort results by a specific field. To sort results use the `sort_by` query parameter with the root level field name as the value. The `sort_direction` parameter is used to specify the sort direction, either either `asc` (ascending) or `desc` (descending). ## Filtering Filtering is used to limit the results returned in a single request. The API supports filtering by certain fields in the response. To filter results, you can use the field as a query parameter. For example, to filter the IP list to only return public IPv4 addresses, you can filter by the `type` field, as in the following request: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/projects/id/ips?type=public_ipv4 ``` Only IP addresses with the `type` field set to `public_ipv4` will be returned. ## Searching Searching is used to find matching resources using multiple field comparissons. The API supports searching in resources that define this behavior. Currently the search parameter is only available on devices, ssh_keys, api_keys and memberships endpoints. To search resources you can use the `search` query parameter. ## Include and Exclude For resources that contain references to other resources, sucha as a Device that refers to the Project it resides in, the Equinix Metal API will returns `href` values (API links) to the associated resource. ```json { ... \"project\": { \"href\": \"/metal/v1/projects/f3f131c8-f302-49ef-8c44-9405022dc6dd\" } } ``` If you're going need the project details, you can avoid a second API request. Specify the contained `href` resources and collections that you'd like to have included in the response using the `include` query parameter. For example: ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=projects ``` The `include` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests where `href` resources are presented. To have multiple resources include, use a comma-separated list (e.g. `?include=emails,projects,memberships`). ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=emails,projects,memberships ``` You may also include nested associations up to three levels deep using dot notation (`?include=memberships.projects`): ```sh curl -H 'X-Auth-Token: my_authentication_token' \\ https://api.equinix.com/metal/v1/user?include=memberships.projects ``` To exclude resources, and optimize response delivery, use the `exclude` query parameter. The `exclude` parameter is generally accepted in `GET`, `POST`, `PUT`, and `PATCH` requests for fields with nested object responses. When excluded, these fields will be replaced with an object that contains only an `href` field. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@equinixmetal.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.equinix.openapi.metal.v1.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for VrfVirtualCircuitUpdateInput - */ -public class VrfVirtualCircuitUpdateInputTest { - private final VrfVirtualCircuitUpdateInput model = new VrfVirtualCircuitUpdateInput(); - - /** - * Model tests for VrfVirtualCircuitUpdateInput - */ - @Test - public void testVrfVirtualCircuitUpdateInput() { - // TODO: test VrfVirtualCircuitUpdateInput - } - - /** - * Test the property 'customerIp' - */ - @Test - public void customerIpTest() { - // TODO: test customerIp - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'md5' - */ - @Test - public void md5Test() { - // TODO: test md5 - } - - /** - * Test the property 'metalIp' - */ - @Test - public void metalIpTest() { - // TODO: test metalIp - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'peerAsn' - */ - @Test - public void peerAsnTest() { - // TODO: test peerAsn - } - - /** - * Test the property 'speed' - */ - @Test - public void speedTest() { - // TODO: test speed - } - - /** - * Test the property 'subnet' - */ - @Test - public void subnetTest() { - // TODO: test subnet - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - -} diff --git a/spec/oas3.fetched/openapi/public/components/schemas/IPReservationList.yaml b/spec/oas3.fetched/openapi/public/components/schemas/IPReservationList.yaml index cc3d18aaf..56393f254 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/IPReservationList.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/IPReservationList.yaml @@ -5,4 +5,6 @@ properties: - $ref: './IPReservation.yaml' - $ref: './VrfIpReservation.yaml' type: array + meta: + $ref: './Meta.yaml' type: object diff --git a/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml index 2d150b057..55324321d 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml @@ -49,6 +49,7 @@ properties: type: string type: array type: + type: string enum: - vlan virtual_network: diff --git a/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml index 0ab536025..2bb47b5b1 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml @@ -76,6 +76,7 @@ properties: type: string type: array type: + type: string enum: - vrf vrf: diff --git a/spec/oas3.fetched/openapi/public/paths/organizations/id/devices.yaml b/spec/oas3.fetched/openapi/public/paths/organizations/id/devices.yaml index 1db0b50df..6bced0ece 100644 --- a/spec/oas3.fetched/openapi/public/paths/organizations/id/devices.yaml +++ b/spec/oas3.fetched/openapi/public/paths/organizations/id/devices.yaml @@ -21,6 +21,8 @@ get: - compute - storage - vmce + - legacy_gen + - current_gen example: compute - description: Filter by device facility in: query diff --git a/spec/oas3.fetched/openapi/public/paths/plans.yaml b/spec/oas3.fetched/openapi/public/paths/plans.yaml index ad1255a92..1f04891e3 100644 --- a/spec/oas3.fetched/openapi/public/paths/plans.yaml +++ b/spec/oas3.fetched/openapi/public/paths/plans.yaml @@ -13,6 +13,8 @@ get: - compute - storage - vmce + - legacy_gen + - current_gen example: compute - description: Filter plans by its plan type in: query diff --git a/spec/oas3.fetched/openapi/public/paths/projects/id/devices.yaml b/spec/oas3.fetched/openapi/public/paths/projects/id/devices.yaml index 7d5d8286c..fb2e85aff 100644 --- a/spec/oas3.fetched/openapi/public/paths/projects/id/devices.yaml +++ b/spec/oas3.fetched/openapi/public/paths/projects/id/devices.yaml @@ -21,6 +21,8 @@ get: - compute - storage - vmce + - legacy_gen + - current_gen example: compute - description: Filter by device facility in: query diff --git a/spec/oas3.fetched/openapi/public/paths/projects/project_id/self-service/reservations.yaml b/spec/oas3.fetched/openapi/public/paths/projects/project_id/self-service/reservations.yaml index 9387de7eb..f3e16aa1b 100644 --- a/spec/oas3.fetched/openapi/public/paths/projects/project_id/self-service/reservations.yaml +++ b/spec/oas3.fetched/openapi/public/paths/projects/project_id/self-service/reservations.yaml @@ -22,6 +22,8 @@ get: - compute - storage - vmce + - legacy_gen + - current_gen example: compute responses: "200": diff --git a/spec/oas3.patched/openapi/public/components/schemas/IPReservationList.yaml b/spec/oas3.patched/openapi/public/components/schemas/IPReservationList.yaml index cc3d18aaf..56393f254 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/IPReservationList.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/IPReservationList.yaml @@ -5,4 +5,6 @@ properties: - $ref: './IPReservation.yaml' - $ref: './VrfIpReservation.yaml' type: array + meta: + $ref: './Meta.yaml' type: object diff --git a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml index 08d9ccdab..55324321d 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml @@ -49,7 +49,9 @@ properties: type: string type: array type: - $ref: './VlanVirtualCircuitType.yaml' + type: string + enum: + - vlan virtual_network: $ref: './Href.yaml' vnid: diff --git a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml.rej b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml.rej new file mode 100644 index 000000000..5db74e06e --- /dev/null +++ b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml.rej @@ -0,0 +1,12 @@ +--- spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml ++++ spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml +@@ -49,8 +49,7 @@ properties: + type: string + type: array + type: +- enum: +- - vlan ++ $ref: './VlanVirtualCircuitType.yaml' + virtual_network: + $ref: './Href.yaml' + vnid: diff --git a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml index 54808d42f..2bb47b5b1 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml @@ -76,7 +76,9 @@ properties: type: string type: array type: - $ref: './VrfVirtualCircuitType.yaml' + type: string + enum: + - vrf vrf: $ref: './Vrf.yaml' created_at: diff --git a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml.rej b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml.rej new file mode 100644 index 000000000..e80093f6b --- /dev/null +++ b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml.rej @@ -0,0 +1,12 @@ +--- spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml ++++ spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml +@@ -76,8 +76,7 @@ properties: + type: string + type: array + type: +- enum: +- - vrf ++ $ref: './VrfVirtualCircuitType.yaml' + vrf: + $ref: './Vrf.yaml' + created_at: diff --git a/spec/oas3.patched/openapi/public/paths/organizations/id/devices.yaml b/spec/oas3.patched/openapi/public/paths/organizations/id/devices.yaml index 1db0b50df..6bced0ece 100644 --- a/spec/oas3.patched/openapi/public/paths/organizations/id/devices.yaml +++ b/spec/oas3.patched/openapi/public/paths/organizations/id/devices.yaml @@ -21,6 +21,8 @@ get: - compute - storage - vmce + - legacy_gen + - current_gen example: compute - description: Filter by device facility in: query diff --git a/spec/oas3.patched/openapi/public/paths/plans.yaml b/spec/oas3.patched/openapi/public/paths/plans.yaml index ad1255a92..1f04891e3 100644 --- a/spec/oas3.patched/openapi/public/paths/plans.yaml +++ b/spec/oas3.patched/openapi/public/paths/plans.yaml @@ -13,6 +13,8 @@ get: - compute - storage - vmce + - legacy_gen + - current_gen example: compute - description: Filter plans by its plan type in: query diff --git a/spec/oas3.patched/openapi/public/paths/projects/id/devices.yaml b/spec/oas3.patched/openapi/public/paths/projects/id/devices.yaml index 7d5d8286c..fb2e85aff 100644 --- a/spec/oas3.patched/openapi/public/paths/projects/id/devices.yaml +++ b/spec/oas3.patched/openapi/public/paths/projects/id/devices.yaml @@ -21,6 +21,8 @@ get: - compute - storage - vmce + - legacy_gen + - current_gen example: compute - description: Filter by device facility in: query diff --git a/spec/oas3.patched/openapi/public/paths/projects/project_id/self-service/reservations.yaml b/spec/oas3.patched/openapi/public/paths/projects/project_id/self-service/reservations.yaml index 9387de7eb..f3e16aa1b 100644 --- a/spec/oas3.patched/openapi/public/paths/projects/project_id/self-service/reservations.yaml +++ b/spec/oas3.patched/openapi/public/paths/projects/project_id/self-service/reservations.yaml @@ -22,6 +22,8 @@ get: - compute - storage - vmce + - legacy_gen + - current_gen example: compute responses: "200":